/* ============================================================
   BHP Careers – SAP SuccessFactors career-site look & feel
   Pixel-exact recreation of career8.successfactors.com BHP portal
   (spec source: /tmp/ref_analysis/DESIGN.md)
   - white masthead 53px, orange navbar 52px #EF6E23
   - "#page" white card radius 10, 30px side margins, no footer
   - 473px left panel, right border #565656, right results panel
   - no hover recolor anywhere; focus = blue #005887 glow only
   - multiselect combos (#F0F0F0 arrow button + U+E1EF)
   - green #346310 18px live job count
   - beige #F8F7E3 help dialog with SAP X (U+E03E)
   - responsive = fixed min-width 1168 (horizontal scroll, NO stacking)
   ============================================================ */

/* ---------- Fonts (real SAP assets, downloaded to static) ---------- */
@font-face {
    font-family: '72';
    src: url('../fonts/72-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: '72';
    src: url('../fonts/72-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: '72';
    src: url('../fonts/72-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'SAP-icons';
    src: url('../fonts/SAP-icons.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 13px; }
body {
    margin: 0;
    padding: 0;
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.22;
    color: #000;
    background: #fff;
    min-width: 1168px;          /* SF floor – page scrolls horizontally below this */
}

a { color: #005887; text-decoration: none; }
a:hover { text-decoration: underline; color: #005887; }

:focus {
    outline: none;
    box-shadow: 0 0 2px 1px #005887;   /* the reference's only focus treatment */
}

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 8px 16px; z-index: 10000; }
.skip-link:focus { left: 0; }

/* ---------- SAP-icons glyphs ---------- */
.sf-sap-icon {
    font-family: 'SAP-icons';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    speak: never;
}

/* ---------- Masthead (white, BHP logo) ---------- */
.sf-masthead {
    height: 53px;
    background: #fff;
    position: relative;
}
.sf-logo {
    display: block;
    float: left;
    margin: 0 0 7px 16px;
    width: 210px;
    height: 40px;
}
.sf-logo img { display: block; width: 210px; height: 40px; border: 0; }
.sf-logo:hover { text-decoration: none; }

/* ---------- Orange navigation bar ---------- */
.sf-topnav { min-width: 1168px; margin-bottom: 45px; }  /* navbar ends y105, page starts y150 */
.sf-navbar {
    height: 52px;
    background: #ef6e23;                 /* rgb(239,110,35) */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.sf-navbar-info {
    display: flex;
    align-items: center;
    margin: 20px 0;
    margin-right: 2px;
}

/* Sign In / Sign Out – white chip with blue #005887 text, no underline at rest */
.sf-userinfo { display: flex; align-items: center; }
.sf-signin {
    color: #005887;
    font-size: 13px;
    text-decoration: none;
    float: left;
}
.sf-signin-btn {
    background: #fff;
    border: 1px solid #fff;
    padding: 2px 10px;
    margin-left: 5px;
}
.sf-signin:hover { text-decoration: none; }
.sf-user-greeting {
    margin-left: 5px;
    background: transparent;
    border: none;
    padding: 0;
}

/* Language label + white dropdown button */
.sf-lang-label { color: #000; font-size: 13px; margin-left: 24px; float: left; }
.sf-lang-dropdown {
    position: relative;
    width: 200px;
    background: #fff;
    border: 1px solid #fff;
    padding: 6px;
    height: 27px;
    margin-left: 8px;
}
.sf-lang-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: none;
    background: transparent;
    color: #000;
    font-size: 13px;
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    padding: 0 20px 0 0;
    cursor: pointer;
    height: 100%;
}
.sf-lang-form {
    margin: 0;
    height: 100%;
}
.sf-lang-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #0064D9;
    font-size: 14px;
    pointer-events: none;
}
.sf-lang-arrow::before { content: "\e1ef"; }

/* ---------- Page card ---------- */
.sf-page {
    margin: 15px 30px 0;
    background: #fff;
    border-radius: 10px;
    min-width: 1108px;                   /* 1168 - 60 side margins */
    padding: 15px;                       /* page content top inset 15 -> heading at y175 */
}
.sf-main { width: 100%; padding: 0; }

/* Flex layout mirrors the reference's td.left_panel | td.main_content,
   but keeps the left panel compact so its right border stops at the bottom
   of the search box instead of stretching to the full results height. */
.sf-search-table { width: 100%; display: flex; align-items: flex-start; }
.sf-search-table .sf-left-panel {
    flex: 0 0 473px;
    width: 473px;
    vertical-align: top;
    padding: 10px 10px 15px;
    border-right: 1px solid #565656;
    background-image: url('../img/careers_left_bkg.jpg');
    background-repeat: no-repeat;
    background-position: 0% 0%;
    background-size: auto;
}
.sf-search-table .sf-main-content {
    flex: 1 1 auto;
    min-width: 0;
    vertical-align: top;
    padding: 10px 0 15px 15px;
}

/* ---------- Search heading – U+E00D magnifier + " Search for Openings" ---------- */
.sf-search-heading {
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    font-size: 14.3px;
    font-weight: 700;
    line-height: 15.73px;
    color: #000;
    margin: 0 0 14.3px;
    text-align: left;
}
.sf-sap-icon-magnifier { font-size: 14.3px; vertical-align: -2px; }
.sf-sap-icon-magnifier::before { content: "\e00d"; }

/* ---------- Filter form rows (label w169 right-aligned, field col x174) ---------- */
.sf-search-form { margin: 0; }

.sf-form-row {
    display: flex;
    align-items: center;
}
.sf-form-row .sf-label {
    width: 169px;
    flex-shrink: 0;
    padding: 6px 5px 6px 5px;
    font-size: 13px;
    color: #000;
    text-align: right;
}

/* Keywords input – 182x19, #555 frame, Trebuchet, focus = blue glow */
.sf-field { display: flex; align-items: center; margin-left: 5px; }
.sf-input {
    width: 182px;
    height: 19px;
    border: 1px solid #555;
    border-radius: 0;
    padding: 1px 2px;
    font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
    font-size: 13px;
    color: #000;
    background: #fff;
    box-shadow: 0 0 2px 1px #005887;
}

/* Ask-help: BARE SAP glyph U+E1C3 #636363 – not a circular button */
.sf-help-icon {
    font-family: 'SAP-icons';
    background: transparent;
    border: none;
    color: #636363;
    font-size: 13px;
    padding: .25rem;
    margin-left: 4px;
    cursor: pointer;
    line-height: 1;
}
/* .sf-help-icon::before { content: "\e1c3"; } */
.sf-help-icon:hover { color: #636363; }

/* ---------- Fieldset: Exact Match checkbox + radios ---------- */
.sf-jobs-fieldset {
    border: 0;
    margin: 12px 0 4px 176px;    /* aligns under the Keywords input (input x229, +2) */
    padding: 0;
    font-size: 13px;
}
.sf-exact-row { margin: 0 0 4px; }
.sf-exact-row label {
    font-size: 12px;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
/* Exact Match: checkbox LEFT, label RIGHT (reference: box x245, text x264) */
.sf-exact-row .sf-checkbox { margin: 0 4px 0 0; vertical-align: middle; display: inline-block; }
/* Radios: radio-label LEFT (x241, w200), circle RIGHT (x446), ~5px gap */
.sf-radio-group .sf-radio-row {
    display: flex;
    align-items: center;
    margin: 0 0 2px;
}
.sf-radio-group .sf-radio-label {
    font-size: 12px;
    color: #000;
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sf-radio-group .sf-radio {
    margin: 0 0 0 5px;
    flex: 0 0 auto;
    vertical-align: middle;
}
.sf-radio-group label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #000;
    cursor: pointer;
}

/* ---------- Multiselect combos: 199x19 #555 frame, #F0F0F0 arrow (U+E1EF) ---------- */
.sf-combo {
    position: relative;
    width: 199px;
    height: 19px;
    background: #fff;
    border: 1px solid #555;
    margin: 4px 0;
    box-sizing: border-box;
}
.sf-combo .sf-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: #fff;
    padding: 1px 20px 1px 4px;
    font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
    font-size: 13px;
    color: #000;
    cursor: pointer;
}
.sf-combo-arrow {
    position: absolute;
    right: 0;
    top: 0;
    width: 17px;
    height: 19px;
    background: #F0F0F0;          /* rgb(240,240,240) */
    border: 1px solid #555;
    border-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #000;
    pointer-events: none;
}
.sf-combo-arrow::before { content: "\e1ef"; }

/* ---- SuccessFactors multiselect (rcmmultiselect): input + arrow + popup menu ---- */
.sf-mselect-input {
    width: 182px;
    height: 17px;
    border: none;
    padding: 1px 2px;
    font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
    font-size: 13px;
    color: #000;
    background: #fff;
    box-sizing: border-box;
    cursor: default;
}
.sf-mselect-btn {
    position: absolute;
    right: -1px;
    top: -1px;
    width: 17px;
    height: 19px;
    background: #F0F0F0;          /* rgb(240,240,240) */
    border: 1px solid #555;
    border-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}
.sf-mselect-btn:disabled { cursor: default; }
.sf-mselect-btn .sf-combo-arrow-glyph { font-size: 11px; line-height: 1; }
.sf-mselect-btn .sf-combo-arrow-glyph::before { content: "\e1ef"; }

/* Popup dialog – white 1px #ccc frame, options list max-height 200px */
.sf-mselect-menu {
    position: absolute;
    top: 19px;
    left: -1px;
    z-index: 3000;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: none;
    width: 157px;
    box-sizing: border-box;
}
/* "Select all" header – 25px, black bottom border, checked checkbox */
.sf-mselect-all {
    height: 25px;
    border-bottom: 1px solid #000;
    display: flex;
    align-items: center;
    padding: 0 8px;
    cursor: pointer;
    white-space: nowrap;
}
.sf-mselect-list {
    max-height: 200px;
    min-height: 50px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sf-mselect-item {
    height: 24px;
    line-height: 24px;
    padding: 0 8px;
    white-space: nowrap;
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0;
    box-sizing: border-box;
}
.sf-mselect-item.selected {
    background: #0f5c93;         /* rgb(15,92,147) */
    color: #fff;
}
.sf-mselect-item.selected .sf-mselect-check-label { color: #fff; }
.sf-mselect-item .sf-mselect-check-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Fiori-style 14x15 check box: white border, blue fill when checked */
.sf-mselect-check {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 15px;
    border: 1px solid #666;
    background: #fff;
    flex: 0 0 14px;
    margin: 0 6px 0 0;
    position: relative;
    cursor: pointer;
    padding: 0;
}
.sf-mselect-item.selected .sf-mselect-check {
    border-color: #fff;
    background: #0f5c93;
}
.sf-mselect-check:checked {
    border-color: #0f5c93;
    background: #0f5c93;
}
.sf-mselect-check:checked::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.sf-mselect-item.selected .sf-mselect-check:checked::before { border-color: #fff; }
.sf-mselect-item .sf-mselect-check-label { cursor: pointer; }
.sf-mselect-all-check-label { cursor: pointer; font-size: 12px; }

/* Anonymous ":" rows – disabled multiselect look from the reference.
   The reference keeps ALL arrow buttons rgb(240,240,240) with the
   1px solid #555 border; only the disabled INPUT gets the pale bg. */
.sf-combo-disabled .sf-mselect-input {
    background: rgba(239, 239, 239, 0.3);
    color: #545454;
    cursor: default;
}
.sf-combo-disabled .sf-mselect-btn {
    color: rgba(16, 16, 16, 0.3);
    background: #F0F0F0;          /* rgb(240,240,240) — matches active buttons */
    cursor: default;
}

/* ---------- Live job count: green 18px number + 11px note ---------- */
.sf-job-count {
    margin-left: 174px;
    padding-top: 16px;
    height: 70px;
}
.sf-job-count .count-num {
    font-size: 18px;
    line-height: 21.96px;
    color: #346310;              /* rgb(52,99,16) green */
    font-weight: normal;
}
.sf-job-count .count-text {
    font-size: 11px;
    color: #000;
    margin-left: 5px;
    margin-top: 6px;
}

/* ---------- Buttons: no hover change; focus = blue glow ---------- */
.sf-btn-row {
    display: flex;
    align-items: center;
    margin-left: 174px;                 /* Search at x234 / Clear at x347 per reference */
}
.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    font-size: 14px;
    line-height: 21px;
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    border: 1px solid #000;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    margin: 0 5px;
}
.sf-btn:hover { text-decoration: none; }
.sf-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.sf-btn-primary {
    background-color: #007BC6;   /* rgb(0,123,198) */
    color: #fff;
    font-weight: 700;
}
.sf-btn-primary:hover { background-color: #007BC6; color: #fff; }

.sf-btn-secondary {
    background-color: #6c7884;   /* rgb(108,120,132) */
    color: #fff;
    font-weight: 400;
}
.sf-btn-secondary:hover { background-color: #6c7884; color: #fff; }

.sf-btn-link {
    background: transparent;
    border: none;
    color: #005887;
    font-size: 13px;
    font-weight: 400;
    height: auto;
    padding: 4px 0;
    margin: 0;
    border-radius: 0;
}
.sf-btn-link:hover { text-decoration: underline; }

/* ---------- Results panel (right side – app's functional addition) ---------- */
.sf-results-panel { padding: 0; }
.sf-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #000;
}
.sf-results-count { font-size: 13px; }
.sf-results-count strong { font-weight: 700; }
.sf-sort-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.sf-select {
    height: 20px;
    border: 1px solid #555;
    border-radius: 0;
    padding: 1px 2px;
    font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
    font-size: 13px;
    color: #000;
    background: #fff;
    cursor: pointer;
}

.sf-job-list { border-top: 1px solid #ccc; }
.sf-job-item {
    padding: 10px 8px 12px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}
.sf-job-item:hover { background: #fff8f0; }
.sf-job-title { font-size: 18px; font-weight: 400; color: #000; margin: 0 0 4px; }
.sf-job-title a:hover { text-decoration: underline; }
.sf-job-title a:visited { color: #624BA9; }
.sf-job-meta { font-size: 12px; color: #555; line-height: 1.5; }
.sf-job-meta .sep { color: #999; margin: 0 4px; }

.sf-empty-state { text-align: center; padding: 60px 20px; color: #666; }
.sf-empty-state p { margin: 8px 0; font-size: 13px; }

/* Pagination */
.sf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 12px;
    font-size: 13px;
}
.sf-pagination a, .sf-pagination span {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #888;
    border-radius: 4px;
    color: #005887;
    min-width: 28px;
    text-align: center;
    text-decoration: none;
}
.sf-pagination a:hover { background: #f0f0f0; text-decoration: none; }
.sf-pagination .current { background: #007BC6; color: #fff; border-color: #007BC6; }
.sf-pagination .disabled { color: #aaa; border-color: #ddd; pointer-events: none; }

/* ---------- Job detail ---------- */
.sf-detail-header { padding: 10px 0 14px; border-bottom: 1px solid #ddd; }
.sf-detail-title { font-size: 22px; font-weight: 700; color: #000; margin: 0 0 8px; }
.sf-detail-meta { font-size: 13px; color: #000; }
.sf-detail-meta strong { font-weight: 700; }
.sf-detail-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sf-detail-body { max-width: 900px; margin: 0; padding: 24px 0 40px; }
.sf-detail-section { margin-bottom: 24px; }
.sf-detail-section h2 {
    font-size: 15px; font-weight: 700; color: #000;
    border-bottom: 1px solid #ddd; padding-bottom: 6px; margin: 0 0 12px;
}
.sf-detail-section p, .sf-detail-section ul { font-size: 13px; line-height: 1.55; color: #000; }
.sf-detail-section ul { padding-left: 20px; }
.sf-detail-section li { margin-bottom: 4px; }
.sf-return-link { display: inline-block; margin: 8px 0 12px; font-size: 13px; }

/* ---------- Forms (Application / Saved Search) ---------- */
.sf-form-container { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }
.sf-form-container h1 { font-size: 20px; font-weight: 700; color: #000; margin: 0 0 8px; }
.sf-form-container .job-ref { font-size: 13px; color: #666; margin-bottom: 20px; }
.sf-form-group { margin-bottom: 14px; }
.sf-form-group label { display: block; font-size: 13px; margin-bottom: 4px; color: #000; }
.sf-form-group .required { color: #c00; }
.sf-form-group .sf-input,
.sf-form-group .sf-select,
.sf-form-group .sf-textarea { width: 100%; max-width: 100%; height: auto; min-height: 19px; padding: 3px 6px; }
.sf-textarea {
    border: 1px solid #555; border-radius: 0; padding: 3px 6px;
    font-size: 13px; font-family: "Trebuchet MS", Arial, sans-serif;
    color: #000; background: #fff; resize: vertical; width: 100%;
}
.sf-file { font-size: 13px; }
.sf-error { color: #c00; font-size: 12px; margin-top: 3px; }
.sf-help-text { font-size: 12px; color: #666; margin-top: 2px; }

/* ---------- Messages / alerts ---------- */
.sf-messages { width: 100%; padding: 10px 30px 0; }
.sf-alert { padding: 9px 14px; border-radius: 4px; margin-bottom: 10px; font-size: 13px; border: 1px solid #000; }
.sf-alert-success { background: #e7f4e5; color: #1e7a34; border-color: #1e7a34; }
.sf-alert-error { background: #fdecea; color: #b3261e; border-color: #b3261e; }
.sf-alert-info { background: #e5f0fa; color: #1d5b8e; border-color: #1d5b8e; }

/* ---------- Tooltip / help dialog – beige, SAP X close ---------- */
.sf-tooltip {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #F8F7E3;           /* rgb(248,247,227) beige */
    border: 1px solid #E1E1E1;
    border-radius: 0;
    box-shadow: 0 0 30px 2px rgba(0,0,0,0.15);
    padding: 13px;
    width: 554px;
    max-height: 80vh;
    overflow: auto;
    font-family: "72", "72full", Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #000;
    line-height: 1.45;
    z-index: 3000;
    display: none;
}
.sf-tooltip.visible { display: block; }
.sf-tooltip-body { width: 500px; max-width: 100%; }
.sf-tooltip-close {
    position: absolute;
    top: 7px;
    right: 10px;
    width: 12px;
    height: 17px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
}
.sf-tooltip-close::before {
    content: "\e03e";
    font-family: 'SAP-icons';
    font-size: 16px;
    color: #666;
    line-height: 17px;
}
.sf-tooltip-close:hover { text-decoration: none; }
.sf-tooltip-close:focus { box-shadow: 0 0 2px 1px #005887; }

/* ---------- Modal (auth / confirm) ---------- */
.sf-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 2000; display: none; align-items: center; justify-content: center;
}
.sf-modal-overlay.open { display: flex; }
.sf-modal {
    background: #fff; border: 1px solid #555; border-radius: 4px;
    max-width: 480px; width: 90%; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.sf-modal-header { padding: 12px 16px; border-bottom: 1px solid #ddd; font-weight: 700; font-size: 15px; color: #000; }
.sf-modal-body { padding: 16px; font-size: 13px; color: #000; }
.sf-modal-footer {
    padding: 12px 16px; border-top: 1px solid #ddd;
    text-align: right; display: flex; gap: 8px; justify-content: flex-end;
}

/* ---------- Print ---------- */
@media print {
    .sf-masthead, .sf-navbar, .sf-btn-row { display: none; }
}
