/* ============================================================================
   SITE SEARCH (9 Nov 2026): the results page (search/index) and the header's
   suggestions (assets/js/site-search.js). Theme tokens only.
   ========================================================================== */

/* Results page */
.pa-sr { padding: 24px 0 64px; background: var(--site-bg-alt); color: var(--site-ink); min-height: 60vh; }
.pa-sr__form { position: relative; display: flex; gap: 8px; max-width: 760px; margin: 0 auto 22px; }
.pa-sr__icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--site-muted); }
.pa-sr__input { flex: 1; min-width: 0; height: 52px; padding-inline: 44px 14px; border: 1px solid var(--site-border); border-radius: 12px; background: var(--site-surface); color: var(--site-ink); font-size: 1rem; }
.pa-sr__input:focus { outline: 2px solid var(--site-brand); outline-offset: 1px; border-color: var(--site-brand); }
.pa-sr__submit { height: 52px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--site-brand); color: var(--site-brand-contrast); font-weight: 700; }
.pa-sr__submit:hover { background: var(--site-brand-strong); }
.pa-sr__summary { font-size: 1.25rem; font-weight: 700; color: var(--site-ink-strong); margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.pa-sr__note { color: var(--site-muted); font-size: .9rem; margin: 0 0 10px; }

.pa-sr-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 14px; margin-bottom: 8px; scrollbar-width: thin; }
.pa-sr-tabs__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--site-border-soft); border-radius: 999px; background: var(--site-surface); color: var(--site-ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.pa-sr-tabs__tab span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--site-bg-sunken); color: var(--site-muted); font-size: .78rem; text-align: center; }
.pa-sr-tabs__tab:hover { border-color: var(--site-brand); color: var(--site-brand); }
.pa-sr-tabs__tab.is-active { background: var(--site-brand); border-color: var(--site-brand); color: var(--site-brand-contrast); }
.pa-sr-tabs__tab.is-active span { background: rgba(255, 255, 255, .25); color: var(--site-brand-contrast); }
.pa-sr-tabs__tab.is-empty { opacity: .55; }

.pa-sr-section { margin-top: 22px; padding: 0; }
.pa-sr-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pa-sr-section__title { font-size: 1.1rem; font-weight: 700; color: var(--site-ink-strong); margin: 0; text-transform: none; letter-spacing: 0; }
.pa-sr-section__title span { color: var(--site-muted); font-weight: 400; font-size: .95rem; }
.pa-sr-section__all { color: var(--site-brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
[dir="rtl"] .pa-sr-section__all i { transform: scaleX(-1); }

.pa-sr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pa-sr-grid--job { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pa-sr-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--site-border-soft); border-radius: 14px; background: var(--site-surface); color: var(--site-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pa-sr-card:hover { border-color: var(--site-brand); box-shadow: var(--site-shadow); color: var(--site-ink); }
.pa-sr-card__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--site-bg-sunken); color: var(--site-faint); font-size: 2rem; }
.pa-sr-card__media img { width: 100%; height: 100%; object-fit: cover; }
.pa-sr-card--talent .pa-sr-card__media { aspect-ratio: 1 / 1; }
.pa-sr-card__body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.pa-sr-card__badge { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--site-brand-soft); color: var(--site-brand); font-size: .72rem; font-weight: 700; }
.pa-sr-card__title { font-weight: 700; color: var(--site-ink-strong); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pa-sr-card__subtitle { color: var(--site-muted); font-size: .85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pa-sr-card__price { color: var(--site-brand); font-weight: 700; font-size: .92rem; }
.pa-sr-card--job { flex-direction: row; }
.pa-sr-card--job .pa-sr-card__media { flex: 0 0 76px; aspect-ratio: auto; font-size: 1.5rem; }

.pa-sr-empty { max-width: 640px; margin: 18px auto; padding: 28px 22px; text-align: center; border: 1px solid var(--site-border-soft); border-radius: 16px; background: var(--site-surface); }
.pa-sr-empty__title { font-size: 1.4rem; font-weight: 700; color: var(--site-ink-strong); margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.pa-sr-empty p { color: var(--site-muted); margin: 0 0 14px; }
.pa-sr-empty__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pa-sr-empty__links a { padding: 7px 14px; border-radius: 999px; background: var(--site-brand-soft); color: var(--site-brand); font-weight: 600; text-decoration: none; }
.pa-sr__pages { margin-top: 22px; display: flex; justify-content: center; }

/* Header suggestions */
.pa-ss { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 1060; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border: 1px solid var(--site-border-soft); border-radius: 14px; background: var(--site-surface); box-shadow: var(--site-shadow-lg); color: var(--site-ink); text-align: start; }
.pa-ss[hidden] { display: none; }
.pa-ss__group + .pa-ss__group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--site-border-soft); }
.pa-ss__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 8px; font-size: .78rem; font-weight: 700; color: var(--site-muted); text-transform: none; }
.pa-ss__head a { color: var(--site-brand); font-weight: 600; text-decoration: none; }
.pa-ss__item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--site-ink); text-decoration: none; }
.pa-ss__item:hover, .pa-ss__item.is-active { background: var(--site-brand-soft); color: var(--site-ink); }
.pa-ss__thumb { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: var(--site-bg-sunken); color: var(--site-faint); }
.pa-ss__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pa-ss__text { min-width: 0; display: grid; }
.pa-ss__title { font-weight: 600; color: var(--site-ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ss__sub { font-size: .8rem; color: var(--site-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-ss__all { display: block; margin-top: 6px; padding: 10px; border-radius: 10px; background: var(--site-bg-sunken); color: var(--site-brand); font-weight: 700; text-align: center; text-decoration: none; }
.pa-ss__all:hover { background: var(--site-brand-soft); }
.pa-ss__empty { padding: 14px; color: var(--site-muted); font-size: .9rem; text-align: center; }

@media (max-width: 991.98px) {
    .pa-sr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .pa-sr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pa-sr-grid--job { grid-template-columns: 1fr; }
    .pa-sr__submit { padding: 0 14px; }
    .pa-sr-card__body { padding: 10px; }
    /* The phone search sheet shows the suggestions in its own flow. */
    .sh-ssheet__results .pa-ss { position: static; box-shadow: none; border: 0; max-height: none; padding: 0; }
}
