/* ============================================================
   CAREERS LISTING — Main Stylesheet
   ============================================================ */

/* ── Listing: Wrapper ── */
.careers-wrapper {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    max-width: 1020px;
    margin: 0 auto;
    background: #fff;
}

/* ── Listing: Search Bar ── */
.careers-search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f2f5;
    padding: 14px 16px;
    border: 1px solid #ddd;
}
.careers-search-input {
    flex: 1;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    outline: none;
    border-radius: 2px;
}
.careers-search-input:focus { border-color: #aaa; }

.careers-search-btn {
    height: 34px;
    padding: 0 16px;
    background: #5a5a5a;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    border-radius: 2px;
    white-space: nowrap;
    transition: background 0.2s;
}
.careers-search-btn:hover { background: #3a3a3a; }

.careers-advanced-btn {
    height: 34px;
    padding: 0 14px;
    background: transparent;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    cursor: pointer;
    font-size: 13px;
    border-radius: 2px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.careers-advanced-btn:hover { background: #1a73e8; color: #fff; }

/* ── Listing: Advanced Panel ── */
.careers-advanced-panel {
    display: none;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-top: none;
    align-items: center;
    gap: 10px;
}
.careers-advanced-panel.is-open { display: flex; }
.careers-advanced-panel label { font-size: 13px; color: #555; white-space: nowrap; }
.careers-location-filter {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #ccc;
    font-size: 13px;
    border-radius: 2px;
    outline: none;
    width: 220px;
}

/* ── Listing: Loading ── */
#careers-loading {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    color: #666;
    font-size: 13px;
    border: 1px solid #ddd;
    border-top: none;
}
#careers-loading.is-visible { display: flex; }

.careers-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #5a5a5a;
    border-radius: 50%;
    animation: careers-spin 0.7s linear infinite;
    flex-shrink: 0;
}
.careers-spinner--white {
    border-color: rgba(255,255,255,0.4);
    border-top-color: #fff;
}
@keyframes careers-spin { to { transform: rotate(360deg); } }

/* ── Listing: Results Table ── */
#careers-results { border: 1px solid #ddd; border-top: none; }
.careers-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.careers-table thead tr { background: #5a5a5a; color: #fff; }
.careers-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.careers-table .col-position { width: 65%; }
.careers-table .col-location { width: 35%; }
.careers-table tbody tr { border-bottom: 1px solid #eee; transition: background 0.15s; }
.careers-table tbody tr:last-child { border-bottom: none; }
.careers-table tbody tr:hover { background: #f7f9fc; }
.careers-table tbody td { padding: 11px 16px; font-size: 14px; vertical-align: middle; }
.careers-table tbody td a { color: #1a73e8; text-decoration: none; }
.careers-table tbody td a:hover { text-decoration: underline; }
.careers-no-results td { padding: 20px 16px !important; color: #777; font-style: italic; text-align: center; }
.careers-highlight { background: #fff3cd; font-weight: 600; border-radius: 2px; padding: 0 1px; }

/* ── Listing: Powered By ── */
.careers-powered-by { text-align: right; padding: 8px 16px 4px; font-size: 11px; color: #aaa; }
.careers-powered-by strong { color: #888; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */

.careers-detail-wrapper {
    font-family: Arial, Helvetica, sans-serif;
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 0 60px;
    color: #333;
}

/* ── Back link ── */
.careers-back-link { margin-bottom: 24px; }
.careers-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.careers-back-btn:hover { color: #0d5bcc; text-decoration: underline; }

/* ── Job Header ── */
.careers-job-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    background: #f8f9fb;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    margin-bottom: 28px;
}
.careers-job-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
}
.careers-job-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}
.careers-apply-top-btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 11px 26px;
    background: #1a73e8;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}
.careers-apply-top-btn:hover { background: #1558b0; }

/* ── Job Description ── */
.careers-job-description {
    margin-bottom: 40px;
    padding: 28px 32px;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
}
.careers-job-description h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e4ea;
}
.careers-job-body { font-size: 14px; line-height: 1.8; color: #444; }
.careers-job-body p  { margin: 0 0 12px; }
.careers-job-body ul { margin: 0 0 12px; padding-left: 20px; }
.careers-job-body li { margin-bottom: 6px; }

/* ── Apply Section ── */
.careers-apply-section {
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    overflow: hidden;
}
.careers-apply-header {
    background: #5a5a5a;
    color: #fff;
    padding: 20px 32px;
}
.careers-apply-header h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}
.careers-apply-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

/* ── Form Grid ── */
.careers-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px 32px;
    background: #fff;
}
.careers-field { display: flex; flex-direction: column; gap: 6px; }
.careers-field--full { grid-column: 1 / -1; }

.careers-field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.careers-required { color: #e53935; }
.careers-field-hint { font-weight: 400; color: #888; font-size: 12px; margin-left: auto; }

.careers-input,
.careers-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.careers-input:focus,
.careers-textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.careers-textarea { resize: vertical; min-height: 110px; }

/* ── File Upload ── */
.careers-file-upload {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 3px;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.careers-file-upload:hover,
.careers-file-upload.is-dragover {
    border-color: #1a73e8;
    background: #f0f6ff;
}
.careers-file-upload.has-file {
    border-color: #2e7d32;
    background: #f0fdf4;
}
.careers-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.careers-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    gap: 8px;
    color: #666;
    font-size: 13px;
    pointer-events: none;
    text-align: center;
}
.careers-file-label svg { color: #999; }
.careers-file-upload.has-file .careers-file-label { color: #2e7d32; }
.careers-file-upload.has-file .careers-file-label svg { color: #2e7d32; }

/* ── Submit button ── */
.careers-submit-btn {
    width: 100%;
    padding: 13px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.careers-submit-btn:hover { background: #1558b0; }
.careers-submit-btn:disabled { background: #90b8f0; cursor: not-allowed; }

/* ── Success / Error ── */
.careers-form-success {
    margin: 0;
    padding: 40px 32px;
    text-align: center;
    background: #f0fdf4;
    border-top: 1px solid #c8e6c9;
}
.careers-success-icon {
    width: 54px;
    height: 54px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    line-height: 54px;
    margin: 0 auto 16px;
}
.careers-form-success h3 { font-size: 20px; color: #1b5e20; margin: 0 0 10px; }
.careers-form-success p  { color: #388e3c; font-size: 14px; margin: 0; }

.careers-form-error {
    margin: 0 32px 0;
    padding: 12px 16px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 3px;
    color: #c62828;
    font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .careers-search-bar { flex-wrap: wrap; }
    .careers-search-input { width: 100%; flex: unset; }
    .careers-table .col-position,
    .careers-table .col-location { width: auto; }

    .careers-job-header { flex-direction: column; padding: 20px; }
    .careers-apply-top-btn { width: 100%; text-align: center; }
    .careers-form-grid { grid-template-columns: 1fr; padding: 20px; }
    .careers-apply-header { padding: 18px 20px; }
    .careers-job-description { padding: 20px; }
}
