/* =====================================================================
   Public discovery search (Phase 5)
   --------------------------------------------------------------------
   Inherits the .ad- design tokens from Landing/Index.css. Three regions:
     - hero with the search bar
     - filter sidebar (sticky on desktop)
     - card grid + pagination
   ===================================================================== */

.ld-search-hero {
    background: linear-gradient(180deg, #0B1F3F 0%, #122a52 100%);
    color: #fff;
    padding: 7rem 1.5rem 3rem;
    text-align: center;
}

.ld-search-hero h1 {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 2.6rem;
    margin: 0 0 .6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ld-search-hero p {
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 1.6rem;
    font-size: 1.05rem;
}

.ld-search-bar {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    padding: .35rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

/* Anchor for the autocomplete dropdown — toggled by JS so the dropdown
   absolutely-positions itself to the bar instead of the page. */
.ld-search-bar.is-anchored { position: relative; }

.ld-search-bar input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .8rem 1.2rem;
    font-size: 1rem;
    color: #1f2933;
    outline: none;
}

.ld-search-bar button {
    border: 0;
    border-radius: 999px;
    background: #d4af37;
    color: #0B1F3F;
    padding: .55rem 1.4rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.ld-search-bar button:hover { background: #f5d77b; }

/* ----- BODY: filters + results ------------------------------------ */

.ld-search-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem 5rem;
}

.ld-filters {
    position: sticky;
    top: 88px;
    align-self: start;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 4px 14px rgba(11, 31, 63, 0.04);
}

.ld-filter { margin-bottom: 1.1rem; }

.ld-filter label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7585;
    font-weight: 700;
    margin-bottom: .35rem;
}

.ld-filter select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: .55rem .7rem;
    background: #fff;
    color: #1f2933;
    font-size: .92rem;
}

.ld-filter__check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    color: #2b3445;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.ld-filter__check input { margin: 0; }

.ld-filter__clear {
    display: inline-block;
    margin-top: .4rem;
    color: #6b7585;
    font-size: .85rem;
    text-decoration: underline;
}

.ld-filter__clear:hover { color: #d4af37; }

/* ----- RESULTS ----------------------------------------------------- */

.ld-results__head {
    color: #4f5b6b;
    margin-bottom: 1.2rem;
    font-size: .92rem;
}

.ld-results__head strong { color: #0B1F3F; font-size: 1.1rem; }
.ld-results__head span { margin-left: .5rem; color: #6b7585; }

.ld-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.ld-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: 0 4px 14px rgba(11, 31, 63, 0.04);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.ld-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(11, 31, 63, 0.08);
    text-decoration: none;
    color: inherit;
}

.ld-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: .8rem;
    background: #f5f6f8;
}

.ld-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .15rem;
}

.ld-card__head strong {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0B1F3F;
}

.ld-card__verified {
    color: #d4af37;
    font-size: .9rem;
    margin-left: .25rem;
}

.ld-card__score {
    background: rgba(212, 175, 55, 0.16);
    color: #806c1f;
    border-radius: 999px;
    padding: .15rem .55rem;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ld-card__meta {
    color: #6b7585;
    font-size: .85rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    margin: .3rem 0 .6rem;
}

.ld-card__meta i { color: #d4af37; margin-right: .25rem; }

.ld-card__bio {
    color: #4f5b6b;
    font-size: .88rem;
    line-height: 1.55;
    margin: 0 0 .8rem;
    flex: 1;
}

.ld-card__footer {
    display: flex;
    gap: .6rem;
    border-top: 1px solid #f0f2f5;
    padding-top: .6rem;
    color: #6b7585;
    font-size: .78rem;
}

/* ----- pagination + empty ----------------------------------------- */

.ld-pager {
    display: flex;
    gap: .35rem;
    justify-content: center;
    margin-top: 2rem;
}

.ld-pager a {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    color: #4f5b6b;
    text-decoration: none;
    font-size: .9rem;
}

.ld-pager a:hover { background: #f3f5f9; color: #0B1F3F; }
.ld-pager .is-active { background: #0B1F3F; border-color: #0B1F3F; color: #fff; }

.ld-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #6b7585;
}

.ld-empty i { font-size: 3rem; color: #d4af37; margin-bottom: 1rem; }
.ld-empty p { margin: 0 0 1.4rem; font-size: 1rem; }

/* ----- responsive -------------------------------------------------- */

@media (max-width: 880px) {
    .ld-search-hero { padding: 6rem 1.2rem 2.4rem; }
    .ld-search-hero h1 { font-size: 1.9rem; }
    .ld-search-body { grid-template-columns: 1fr; gap: 1.4rem; padding: 2rem 1rem 3rem; }
    .ld-filters { position: static; }
}

/* ----- Phase 8: filter chips + court multi-select ------------------ */

.ld-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.2rem;
}

.ld-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .75rem;
    border: 1px solid #d8deea;
    border-radius: 999px;
    background: #f3f5f9;
    color: #2a3548;
    text-decoration: none;
    font-size: .85rem;
    line-height: 1;
    transition: background .15s, border-color .15s;
}

.ld-chip:hover { background: #e7eaf0; border-color: #b9c2d3; color: #0B1F3F; }
.ld-chip i.fa-times { opacity: .6; font-size: .75rem; }
.ld-chip:hover i.fa-times { opacity: 1; }
.ld-chip__label { color: #6b7585; font-weight: 500; margin-right: .15rem; }

.ld-chip--clear {
    background: transparent;
    border-color: transparent;
    color: #b54343;
    font-weight: 500;
}
.ld-chip--clear:hover { background: #fbeaea; border-color: #f1c0c0; color: #8c2727; }

/* ----- Phase 8 batch 3: hero chip grid + curated carousels ---------- */

.ld-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: center;
    margin: 1.4rem auto 0;
    max-width: 880px;
}

.ld-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255, 255, 255, 0.08);
    color: #f6f8fc;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: .45rem .9rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: background .15s, border-color .15s, transform .15s;
}

.ld-hero-chip:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.6);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.ld-hero-chip i { color: #d4af37; font-size: .82rem; }
.ld-hero-chip__count {
    background: rgba(212, 175, 55, 0.25);
    color: #f5d77b;
    font-size: .72rem;
    font-weight: 700;
    padding: .08rem .4rem;
    border-radius: 999px;
    margin-left: .15rem;
}

/* Curated strips above the result grid */
.ld-curated { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 1.4rem; }

.ld-strip__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 .7rem;
}

.ld-strip__head h2 {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0B1F3F;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.ld-strip__head h2 i { color: #d4af37; font-size: .9rem; }

.ld-strip__more {
    font-size: .82rem;
    color: #4f5b6b;
    text-decoration: none;
}
.ld-strip__more:hover { color: #d4af37; text-decoration: underline; }

.ld-strip__rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .8rem;
}

@media (max-width: 720px) {
    .ld-strip__rail {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: .7rem;
        padding-bottom: .4rem;
    }
    .ld-strip__rail > .ld-mini {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}

.ld-mini {
    display: flex;
    gap: .7rem;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    padding: .8rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(11, 31, 63, 0.04);
    transition: transform .15s, box-shadow .15s;
}

.ld-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(11, 31, 63, 0.08);
    color: inherit;
    text-decoration: none;
}

.ld-mini__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f6f8;
    flex-shrink: 0;
}

.ld-mini__body { display: flex; flex-direction: column; min-width: 0; }
.ld-mini__name {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: .95rem;
    color: #0B1F3F;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ld-mini__verified { color: #d4af37; font-size: .78rem; margin-left: .15rem; }
.ld-mini__meta {
    color: #4f5b6b;
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: .12rem;
}
.ld-mini__row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    margin-top: .25rem;
    color: #6b7585;
    font-size: .72rem;
}
.ld-mini__row i { color: #d4af37; margin-right: .15rem; }
.ld-mini__score {
    background: rgba(212, 175, 55, 0.16);
    color: #806c1f;
    border-radius: 999px;
    padding: .05rem .4rem;
    font-weight: 700;
    margin-left: auto;
}

.ld-divider {
    border: 0;
    border-top: 1px solid #e7eaf0;
    margin: .4rem 0 1.4rem;
}

/* ----- Phase 8 batch 4: autocomplete + recent searches -------------- */

.ld-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(11, 31, 63, 0.18);
    z-index: 50;
    max-height: 70vh;
    overflow-y: auto;
    text-align: left;
    border: 1px solid #e7eaf0;
}

.ld-suggest__group { padding: .35rem 0; }
.ld-suggest__group + .ld-suggest__group { border-top: 1px solid #f0f2f5; }
.ld-suggest__h {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7585;
    font-weight: 700;
    padding: .5rem .9rem .25rem;
}

.ld-suggest__row {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .9rem;
    color: #2a3548;
    text-decoration: none;
    font-size: .92rem;
    line-height: 1.2;
}
.ld-suggest__row:hover,
.ld-suggest__row.is-active {
    background: #f3f5f9;
    color: #0B1F3F;
    text-decoration: none;
}
.ld-suggest__row i { color: #d4af37; width: 16px; text-align: center; flex-shrink: 0; }
.ld-suggest__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-suggest__label mark { background: rgba(212, 175, 55, 0.28); color: inherit; border-radius: 3px; padding: 0 2px; }
.ld-suggest__sub { color: #6b7585; font-size: .8rem; flex-shrink: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Recent searches — pills below the search bar */
.ld-recents {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin: .9rem auto 0;
    max-width: 720px;
    justify-content: center;
}
.ld-recents__label {
    color: rgba(255, 255, 255, 0.7);
    font-size: .82rem;
    margin-right: .15rem;
    font-weight: 500;
}
.ld-recents__pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(255, 255, 255, 0.08);
    color: #f6f8fc;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: .25rem .65rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: .8rem;
}
.ld-recents__pill:hover { background: rgba(212, 175, 55, 0.2); border-color: rgba(212, 175, 55, 0.5); color: #fff; text-decoration: none; }
.ld-recents__pill i { color: rgba(255, 255, 255, 0.45); font-size: .72rem; }
.ld-recents__clear {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: .78rem;
    cursor: pointer;
    text-decoration: underline;
    margin-left: .2rem;
}
.ld-recents__clear:hover { color: #fff; }

/* Court multi-select — vertical checkbox list inside the sidebar */
.ld-filter--multi { padding-bottom: .6rem; }
.ld-filter__checks {
    list-style: none;
    margin: .35rem 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    background: #fff;
}
.ld-filter__checks li { border-bottom: 1px solid #f3f5f9; }
.ld-filter__checks li:last-child { border-bottom: none; }
.ld-filter__checks label {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    margin: 0;
    cursor: pointer;
    font-size: .9rem;
    color: #2a3548;
}
.ld-filter__checks label:hover { background: #f3f5f9; }
.ld-filter__checks input[type="checkbox"] { margin: 0; }
