/* Jobs page polish — loaded last (see legacy/includes/stylesheets.php).
   Hierarchy over decoration: salary and title lead, urgency is a signal not a
   wallpaper, the filter bar is compact, and Apply stays in view in the preview. */

/* — Filter bar: shorter, so the list starts higher — */
.jobs-filterbar { border-radius: 16px; box-shadow: 0 6px 22px rgba(41, 54, 129, .06); }
.jobs-filterbar .jfb-row { padding: 6px 6px 6px 2px; }
.jobs-filterbar .jfb-field { min-height: 46px; }
.jobs-filterbar .jfb-field input,
.jobs-filterbar .jfb-field select { font-size: 15px; }
.jobs-filterbar .jfb-submit { min-height: 44px; padding: 0 22px; }

/* — Row — */
.jrow {
    padding: 16px 18px;
    border-color: #e3ebf8;
    border-radius: 16px;
    align-items: flex-start;
}
.jrow:hover { border-color: #93b4e9; box-shadow: 0 10px 24px rgba(41, 54, 129, .08); }
.jrow.is-active {
    border-color: #4274d9;
    background: #f5f9ff;
    box-shadow: inset 4px 0 0 #4274d9;
}
[dir="rtl"] .jrow.is-active { box-shadow: inset -4px 0 0 #4274d9; }
.jrow-logo { width: 48px; height: 48px; border-radius: 13px; }
.jrow-body { gap: 4px; }
.jrow-title { font-size: 16.5px; font-weight: 900; letter-spacing: -.015em; line-height: 1.25; }
.jrow-company { font-size: 13px; font-weight: 700; color: #5a6485; }

/* Salary is the number people scan for: its own line, strong, never wrapped away */
.jrow-salary {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 900;
    color: #0f7b57;
    letter-spacing: -.005em;
}

.jrow-foot { margin-top: 6px; gap: 6px 10px; }
.jrow-meta { gap: 6px 10px; color: #5a6485; font-weight: 700; }
.jrow-chip { background: #eef4fc; color: #2d51a8; font-weight: 800; border-radius: 8px; padding: 3px 9px; }

/* Urgent: a quiet outlined marker, so a list full of urgent jobs doesn't shout */
.jrow-chip.is-urgent {
    background: #fff;
    color: #b4531a;
    border: 1px solid #f4c9a8;
}
.jrow-chip.is-urgent::before { background: #e8742c; }

/* "3 weeks ago" is context, not content */
.jrow-ago { color: #8a93ad; font-weight: 700; font-size: 12px; }

/* — Preview — */
/* jobs.css runs the pane 20% taller than the window; with a pinned Apply bar it must fit,
   or the bar sits below the fold until the page is scrolled. app.js sets --jobs-pane-height. */
.jobs-split-preview,
.jobs-split-preview .jprev { max-height: var(--jobs-pane-height, calc(100vh - 220px)); }
.jprev-head { padding: 24px 28px 18px; }
.jprev-title { font-size: 26px; letter-spacing: -.02em; }
.jprev-company { font-weight: 800; }
.jprev-meta { padding: 14px 28px; gap: 8px 10px; }
.jprev-meta > span { background: #f4f7fc; border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.jprev-meta .jrow-chip { border-radius: 999px; padding: 6px 12px; }
.jprev-salary { background: #e7f6ef !important; color: #0f7b57 !important; font-weight: 900 !important; }
.jprev-body { padding: 22px 28px 28px; }
.jprev-body .job-rich-text { max-width: 68ch; line-height: 1.7; }

/* Apply bar: pinned to the bottom of the pane while the description scrolls */
.jprev-foot {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    border-top: 1px solid #e3ebf8;
    background: rgba(255, 255, 255, .96);
    border-radius: 0 0 20px 20px;
}
.jprev-foot-info { display: grid; gap: 2px; min-width: 0; }
.jprev-foot-info strong { font-size: 15px; font-weight: 900; color: #0f7b57; }
.jprev-foot-info span { font-size: 12.5px; font-weight: 700; color: #8a93ad; }
.jprev-apply { flex: none; padding: 12px 28px; font-size: 15px; }

/* — Dark — */
body.theme-dark .jrow { border-color: #2a3a70; }
body.theme-dark .jrow.is-active { background: #16224b; box-shadow: inset 4px 0 0 #6693e0; }
body.theme-dark .jrow-company,
body.theme-dark .jrow-meta { color: #a8b3d1; }
body.theme-dark .jrow-salary,
body.theme-dark .jprev-foot-info strong { color: #4ade9b; }
body.theme-dark .jrow-chip { background: #172450; color: #bcd2f2; }
body.theme-dark .jrow-chip.is-urgent { background: transparent; color: #f6b588; border-color: #7a4a2a; }
body.theme-dark .jrow-ago,
body.theme-dark .jprev-foot-info span { color: #8190b8; }
body.theme-dark .jprev-meta > span { background: #172450; }
body.theme-dark .jprev-salary { background: #0f3b2c !important; color: #4ade9b !important; }
body.theme-dark .jprev-foot { background: rgba(16, 26, 61, .96); border-color: #2a3a70; }
body.theme-dark .jobs-filterbar { box-shadow: none; }

/* — Small screens: the preview pane is hidden there, rows carry everything — */
@media (max-width: 760px) {
    .jrow { padding: 14px; }
    .jrow-title { font-size: 16px; }
}

/* The body must be allowed to shrink inside the flex column, or it pushes the Apply bar out of the clipped pane */
.jprev-body { min-height: 0; }

/* Narrower page: 1560px let the list and preview stretch edge to edge on wide screens.
   The header gets the same measure so the logo and content edges still line up. */
.jobs-section > .wrap,
body.page-jobs .header > .wrap { max-width: 1280px !important; }
