/* =====================================================================
   DooJobs — Job search results page
   Supplements front-landing.css (must be loaded AFTER it).
   Reuses the --lp-* tokens + .lp-nav / .lp-footer / .lp-btn / .lp-job
   components for full visual consistency with the landing page.
   Search-specific classes are prefixed `sr-`.
   ===================================================================== */

/* ---- Page shell: nav sits over the dark search hero (same as landing) -- */
.sr-results { padding: 40px 0 72px; background: var(--lp-bg); }

/* =====================================================================
   COMPACT SEARCH HERO  (dark band, gradient-mesh — no photo)
   ===================================================================== */
.sr-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 122px 0 34px;
    background-color: #0b1b3a;
}
.sr-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(1000px 460px at 84% -30%, rgba(79,70,229,.55), transparent 60%),
        radial-gradient(760px 440px at 4% 130%,  rgba(37,99,235,.32), transparent 60%),
        linear-gradient(180deg, #0b1733 0%, #0c1a38 50%, #0b1430 100%);
    background-color: #0b1b3a;
}
.sr-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 65%);
    mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 65%);
}
/* Full container width so the search bar aligns with the full-width filter bar below.
   The headline is short and the sub-text keeps its own max-width, so they stay tidy. */
.sr-hero-inner { position: relative; z-index: 1; }
.sr-hero h1 {
    color: #fff; font-size: clamp(1.5rem, 2.4vw, 2.05rem); line-height: 1.18;
    letter-spacing: -0.025em; margin-bottom: 10px;
}
.sr-hero-sub {
    color: rgba(231,237,250,.8); font-size: clamp(.98rem, 1.4vw, 1.1rem);
    line-height: 1.6; max-width: 620px; margin-bottom: 26px;
}
/* the .lp-search bar is reused inside the hero; just widen it full */
.sr-hero .lp-search { max-width: 100%; }

/* =====================================================================
   FILTER BAR  (light band directly under the hero)
   ===================================================================== */
.sr-filterbar { background: #fff; border-bottom: 1px solid var(--lp-line); box-shadow: var(--lp-sh-sm); }
.sr-filterbar-inner { display: flex; align-items: center; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.sr-filterbar-lead { display: inline-flex; align-items: center; gap: 8px; color: var(--lp-ink-2); font-weight: 600; font-size: 14px; margin-right: 2px; }
.sr-filterbar-lead svg { width: 17px; height: 17px; color: var(--lp-brand); }

.sr-filter { position: relative; flex: 1 1 190px; min-width: 0; }
.sr-filter svg.sr-filter-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--lp-faint); pointer-events: none; }
.sr-filter svg.sr-filter-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--lp-faint); pointer-events: none; }
.sr-filter select {
    width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
    font: inherit; font-size: 14.5px; font-weight: 500; color: var(--lp-ink);
    padding: 11px 38px 11px 38px; background: var(--lp-soft); border: 1px solid var(--lp-line-2);
    border-radius: var(--lp-r-sm); transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.sr-filter select:hover { border-color: #d3d6e0; background: #fff; }
.sr-filter select:focus-visible { outline: none; border-color: var(--lp-brand); background: #fff; box-shadow: var(--lp-ring); }
/* highlight a filter that is actively narrowing results */
.sr-filter.is-active select { border-color: #c7c4f5; background: var(--lp-brand-tint); color: var(--lp-brand-800); font-weight: 600; }
.sr-filter.is-active svg { color: var(--lp-brand); }

.sr-clear { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 9px 6px; color: var(--lp-muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sr-clear:hover { color: var(--lp-brand-700); }
.sr-clear svg { width: 15px; height: 15px; }

/* =====================================================================
   RESULTS TOOLBAR  (count + sort)
   ===================================================================== */
.sr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sr-count { color: var(--lp-ink); font-family: var(--lp-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.sr-count .sr-count-q { color: var(--lp-brand-700); }
.sr-count-time { display: block; margin-top: 2px; color: var(--lp-faint); font-size: 12.5px; font-weight: 500; font-family: var(--lp-font); letter-spacing: 0; }
.sr-sort { display: inline-flex; align-items: center; gap: 7px; color: var(--lp-muted); font-size: 13.5px; font-weight: 600; padding: 8px 13px; background: var(--lp-soft); border: 1px solid var(--lp-line); border-radius: var(--lp-pill); }
.sr-sort svg { width: 15px; height: 15px; color: var(--lp-brand); }

/* ---- active filter chips -------------------------------------------- */
.sr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.sr-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 13px;
    background: var(--lp-brand-tint); border: 1px solid #e0ddfa; border-radius: var(--lp-pill);
    color: var(--lp-brand-800); font-size: 13px; font-weight: 600; max-width: 280px;
}
.sr-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(67,56,202,.12); color: var(--lp-brand-700); flex: none; transition: background-color .15s ease, color .15s ease; }
.sr-chip-x:hover { background: var(--lp-brand); color: #fff; }
.sr-chip-x svg { width: 12px; height: 12px; }

/* =====================================================================
   LAYOUT  (results + ad/promo sidebar)
   ===================================================================== */
.sr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 28px; align-items: start; }
.sr-main { min-width: 0; }
.sr-aside { min-width: 0; display: grid; gap: 18px; position: sticky; top: 92px; }

/* ---- group heading (Premium / All results) ------------------------- */
.sr-group-head { display: flex; align-items: center; gap: 9px; margin: 4px 0 12px; color: var(--lp-ink); font-family: var(--lp-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.sr-group-head svg { width: 17px; height: 17px; color: #b45309; }
.sr-group-head.sr-group-all svg { color: var(--lp-brand); }
.sr-group-head .sr-group-rule { flex: 1; height: 1px; background: var(--lp-line); }

/* ---- job list (reuses .lp-job; richer meta) ------------------------- */
.sr-job-list { display: grid; gap: 12px; margin-bottom: 26px; }
.sr-job-list:last-child { margin-bottom: 0; }
/* let job cards stretch their content top-aligned (more meta than landing) */
.sr-job-list .lp-job { align-items: flex-start; padding: 18px 20px; }
.sr-job-list .lp-job-cta { align-self: center; }
.sr-meta-row { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--lp-muted); font-size: 13.5px; }
.sr-meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.sr-meta-row svg { width: 14px; height: 14px; color: var(--lp-faint); flex: none; }
.sr-meta-row .sr-expired { color: #b42318; font-weight: 600; }
.sr-meta-row .sr-expired svg { color: #b42318; }

/* premium accent card */
.sr-job-list .lp-job.sr-premium { border-color: #fad9a8; background: linear-gradient(180deg, #fffdf8, #fff); }
.sr-job-list .lp-job.sr-premium:hover { border-color: #f3c577; box-shadow: 0 10px 30px -12px rgba(180,83,9,.28); }
.sr-job-list .lp-job.sr-premium .lp-job-logo { border-color: #f3dcb6; }

/* =====================================================================
   EMPTY STATE
   ===================================================================== */
.sr-empty { text-align: center; padding: 56px 24px; background: var(--lp-soft); border: 1px solid var(--lp-line); border-radius: var(--lp-r-lg); }
.sr-empty-ico { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--lp-line); color: var(--lp-faint); }
.sr-empty-ico svg { width: 34px; height: 34px; }
.sr-empty h3 { font-size: 1.3rem; margin-bottom: 8px; }
.sr-empty p { color: var(--lp-muted); max-width: 420px; margin: 0 auto 6px; font-size: 15px; }
.sr-empty-actions { margin-top: 22px; display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* =====================================================================
   SIDEBAR  (CV promo + ad units)
   ===================================================================== */
.sr-card { background: #fff; border: 1px solid var(--lp-line); border-radius: var(--lp-r-lg); overflow: hidden; }
.sr-promo { display: block; }
.sr-promo img { width: 100%; height: auto; display: block; transition: transform .25s ease; }
.sr-promo:hover img { transform: scale(1.02); }

.sr-ad { background: var(--lp-soft); border: 1px solid var(--lp-line); border-radius: var(--lp-r-lg); padding: 10px; }
.sr-ad-label { display: block; text-align: center; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lp-faint); margin-bottom: 8px; }
.sr-ad ins { display: block; min-height: 1px; }
.sr-ad-feed { margin: 6px 0 24px; }

/* =====================================================================
   PAGINATION  (Bootstrap markup from Paginator::useBootstrap())
   ===================================================================== */
.sr-pagination { margin-top: 30px; }
.sr-pagination nav { display: flex; justify-content: center; }
.sr-pagination .pagination { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
.sr-pagination .page-item { display: inline-flex; }
.sr-pagination .page-link {
    display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
    padding: 0 12px; border: 1px solid var(--lp-line-2); border-radius: var(--lp-r-sm);
    background: #fff; color: var(--lp-ink-2); font-weight: 600; font-size: 14px; line-height: 1;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.sr-pagination .page-link:hover { border-color: #c7c4f5; background: var(--lp-brand-tint); color: var(--lp-brand-800); }
.sr-pagination .page-item.active .page-link { background: var(--lp-brand); border-color: var(--lp-brand); color: #fff; }
.sr-pagination .page-item.disabled .page-link { color: var(--lp-faint); background: var(--lp-soft); cursor: not-allowed; opacity: .7; }
.sr-pagination .page-link:focus-visible { outline: none; box-shadow: var(--lp-ring); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
    .sr-layout { grid-template-columns: 1fr; }
    .sr-aside { position: static; order: 2; }
}
@media (max-width: 880px) {
    /* the .lp-search bar already stacks via front-landing.css mobile rules */
    .sr-hero { padding: 104px 0 28px; }
    .sr-filter { flex: 1 1 100%; }
    .sr-filterbar-lead { flex: 1 1 100%; }
    .sr-clear { margin-left: auto; }
}
@media (max-width: 560px) {
    .sr-results { padding: 26px 0 56px; }
    .sr-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
