/* ============================================================
   SITE SEARCH — [spl_search]
   Panel (desktop design), compact bar (mobile design) and the
   suggestions dropdown. Scoped under .spl-search; !important is
   only used where the theme's global `main a`, `main p`,
   `main h2` and form rules would otherwise win.
   ============================================================ */

.spl-search {
    --bg: #08070e;
    --surface: #14111f;
    --border: rgba(255, 255, 255, 0.08);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #f5f3fa;
    --dim: rgba(247, 245, 252, 0.84);
    --mute: rgba(247, 245, 252, 0.64);
    --faint: rgba(247, 245, 252, 0.42);
    --violet: #9e7bff;
    --violet-hi: #c9b6ff;
    --cta: #7a4fe0;
    --cta-hover: #8e66f2;
    --cta-press: #6840c8;
    --teal: #5fd0c6;
    --amber: #f0b35e;
    --yellow: #f0d95e;
    --pink: #d06fd2;
    --ease: cubic-bezier(.22, .61, .36, 1);

    position: relative;
    z-index: 40; /* dropdown overlaps the slider / sections below */
    width: 100%;
    margin: 0 !important;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b, "Manrope", system-ui, sans-serif);
    text-align: left;
}

.spl-search.alignfull {
    max-width: none;
}

.spl-search *,
.spl-search *::before,
.spl-search *::after {
    box-sizing: border-box;
}

.spl-search__wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 56px);
}

.spl-search__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Breakpoint-specific instances (matches the hero slider's 768px switch). */
@media (max-width: 768px) {
    .spl-search--desktop {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .spl-search--mobile {
        display: none !important;
    }
}

/* ============ PANEL (desktop design) ============ */

.spl-search--panel {
    padding-top: 22px;
}

.spl-search--panel .spl-search__card {
    padding: 28px clamp(20px, 3vw, 38px) 20px;
    border: 1px solid var(--border-2);
    border-radius: 18px;
    background:
        radial-gradient(90% 140% at 0% 0%, rgba(122, 79, 224, 0.16), transparent 60%),
        linear-gradient(180deg, #17122a 0%, #110d1d 100%);
}

.spl-search .spl-search__title {
    margin: 0 0 18px !important;
    font-family: var(--font-d, "Space Grotesk", system-ui, sans-serif) !important;
    font-size: clamp(20px, 1.1vw + 12px, 28px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.015em !important;
    color: var(--text) !important;
    hyphens: none !important;
}

/* ============ FIELD ============ */

.spl-search__form {
    margin: 0;
}

.spl-search__field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 58px;
    padding: 5px 5px 5px 18px;
    border: 1.5px solid rgba(158, 123, 255, 0.55);
    border-radius: 14px;
    background: rgba(8, 7, 14, 0.7);
    box-shadow: 0 0 0 4px rgba(122, 79, 224, 0.08);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.spl-search__field:focus-within {
    border-color: var(--violet-hi);
    box-shadow: 0 0 0 4px rgba(122, 79, 224, 0.22), 0 12px 32px rgba(122, 79, 224, 0.16);
}

.spl-search__icon {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--mute);
}

.spl-search .spl-search__input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 46px;
    margin: 0 !important;
    padding: 0 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text) !important;
    font-family: var(--font-b, "Manrope", system-ui, sans-serif) !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    -webkit-appearance: none;
    appearance: none;
}

.spl-search .spl-search__input::placeholder {
    color: var(--mute);
    opacity: 1;
}

.spl-search .spl-search__input::-webkit-search-decoration,
.spl-search .spl-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.spl-search .spl-search__clear {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--dim);
    cursor: pointer;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}

.spl-search .spl-search__clear[hidden] {
    display: none;
}

.spl-search .spl-search__clear:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.spl-search .spl-search__clear svg {
    width: 15px;
    height: 15px;
}

.spl-search .spl-search__submit {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    min-width: 0;
    margin: 0;
    padding: 0 clamp(24px, 3.4vw, 54px);
    border: 0;
    border-radius: 10px;
    background: var(--cta);
    color: #fff !important;
    font-family: var(--font-b, "Manrope", system-ui, sans-serif) !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(122, 79, 224, 0.35);
    transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.spl-search .spl-search__submit:hover {
    background: var(--cta-hover);
}

.spl-search .spl-search__submit:active {
    background: var(--cta-press);
    transform: translateY(1px);
}

.spl-search .spl-search__submit svg {
    width: 22px;
    height: 22px;
}

.spl-search button:focus-visible,
.spl-search a:focus-visible {
    outline: 2px solid var(--violet-hi) !important;
    outline-offset: 2px;
}

/* ============ "Try:" hints ============ */

.spl-search .spl-search__hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin: 14px 2px 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--mute) !important;
}

.spl-search .spl-search__hint {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mute);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color .15s var(--ease), text-decoration-color .15s var(--ease);
}

.spl-search .spl-search__hint:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

.spl-search__dot {
    color: var(--faint);
}

/* ============ BAR (mobile design) ============ */

.spl-search--bar {
    padding: 6px 0 18px;
}

.spl-search--bar .spl-search__wrap {
    padding: 0 20px;
}

.spl-search--bar .spl-search__field {
    min-height: 56px;
    padding: 4px 4px 4px 16px;
    border: 2px solid rgba(201, 182, 255, 0.85);
    border-radius: 16px;
    background: #16112a;
    box-shadow: 0 0 0 4px rgba(122, 79, 224, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.spl-search--bar .spl-search__icon {
    width: 22px;
    height: 22px;
    color: var(--dim);
}

.spl-search--bar .spl-search__submit {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 12px;
    box-shadow: none;
}

/* ============ DROPDOWN ============ */

.spl-search__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: -1.5px;
    right: -1.5px;
    z-index: 60;
    max-height: min(560px, 70vh);
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-2);
    border-radius: 16px;
    background: #120f1d;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(158, 123, 255, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    animation: spl-search-in .16s var(--ease);
}

.spl-search__dropdown[hidden],
.spl-search__results[hidden],
.spl-search__note[hidden] {
    display: none;
}

@keyframes spl-search-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.spl-search__group + .spl-search__group {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.spl-search__ghead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px 6px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--violet);
}

.spl-search__count {
    color: var(--faint);
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Result row */
.spl-search a.spl-search__opt {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--text) !important;
    text-decoration: none !important;
    word-wrap: normal !important;
    transition: background-color .12s var(--ease) !important;
}

.spl-search a.spl-search__opt:hover,
.spl-search a.spl-search__opt:focus,
.spl-search a.spl-search__opt.is-active {
    background: rgba(158, 123, 255, 0.12);
    color: var(--text) !important;
    text-decoration: none !important;
}

.spl-search__tile {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--violet);
}

.spl-search__tile svg {
    width: 21px;
    height: 21px;
}

/* Event date tile */
.spl-search__tile--e {
    align-content: center;
    gap: 3px;
    background: rgba(158, 123, 255, 0.08);
    border-color: rgba(158, 123, 255, 0.22);
}

.spl-search__day {
    font-family: var(--font-d, "Space Grotesk", system-ui, sans-serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.spl-search__mon {
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet-hi);
}

.spl-search__tile--t { color: var(--violet); background: rgba(158, 123, 255, 0.10); }
.spl-search__tile--v { color: var(--teal); background: rgba(95, 208, 198, 0.10); }
.spl-search__tile--c { color: var(--amber); background: rgba(240, 179, 94, 0.10); }
.spl-search__tile--w { color: var(--teal); background: rgba(95, 208, 198, 0.10); }
.spl-search__tile--p { color: var(--yellow); background: rgba(240, 217, 94, 0.10); }
.spl-search__tile--g { color: var(--pink); background: rgba(208, 111, 210, 0.10); }

.spl-search__txt {
    min-width: 0;
}

.spl-search__name,
.spl-search__meta {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.spl-search__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

/* Guide titles are long: allow two lines. */
.spl-search__opt--g .spl-search__name {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.spl-search__meta {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--mute);
}

.spl-search__kind {
    font-weight: 700;
    color: var(--dim);
}

.spl-search mark {
    padding: 0;
    background: none;
    color: var(--violet-hi);
    font-weight: 800;
}

.spl-search__meta mark {
    font-weight: 700;
}

.spl-search__go {
    width: 16px;
    height: 16px;
    color: var(--violet-hi);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s var(--ease), transform .15s var(--ease);
}

.spl-search__opt.is-active .spl-search__go,
.spl-search__opt:hover .spl-search__go {
    opacity: 1;
    transform: none;
}

/* "Show N more" */
.spl-search .spl-search__more {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 2px 0;
    padding: 9px 10px 9px 66px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--violet-hi);
    font-family: var(--font-b, "Manrope", system-ui, sans-serif) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.spl-search .spl-search__more svg {
    width: 15px;
    height: 15px;
}

.spl-search .spl-search__more:hover,
.spl-search .spl-search__more.is-active {
    background: rgba(158, 123, 255, 0.10);
}

/* Messages: loading / no results / popular searches */
.spl-search__note {
    padding: 4px 4px 8px;
}

.spl-search .spl-search__msg {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 12px 10px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--mute) !important;
}

.spl-search__msg strong {
    color: var(--text);
    font-weight: 700;
}

.spl-search__spinner {
    flex: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(158, 123, 255, 0.25);
    border-top-color: var(--violet);
    border-radius: 50%;
    animation: spl-search-spin .7s linear infinite;
}

@keyframes spl-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.spl-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 10px 10px;
}

.spl-search .spl-search__chip {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text) !important;
    font-family: var(--font-b, "Manrope", system-ui, sans-serif) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s var(--ease), border-color .15s var(--ease) !important;
}

.spl-search .spl-search__chip:hover {
    border-color: rgba(158, 123, 255, 0.55);
    background: rgba(158, 123, 255, 0.12);
    color: var(--text) !important;
    text-decoration: none !important;
}

/* ============ SMALL SCREENS ============ */

@media (max-width: 768px) {
    /* 16px+ stops iOS zooming into the field on focus. */
    .spl-search .spl-search__input {
        font-size: 16px !important;
    }

    .spl-search__dropdown {
        max-height: 65vh;
    }

    .spl-search a.spl-search__opt {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        padding: 9px 8px;
    }

    .spl-search__tile {
        width: 42px;
        height: 42px;
    }

    .spl-search__go {
        display: none;
    }

    .spl-search .spl-search__more {
        padding-left: 62px;
    }
}

@media (max-width: 560px) {
    .spl-search--panel .spl-search__submit {
        padding: 0 18px;
    }

    .spl-search--panel .spl-search__icon {
        display: none;
    }

    .spl-search--panel .spl-search__field {
        padding-left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spl-search__dropdown {
        animation: none;
    }

    .spl-search *,
    .spl-search *::before,
    .spl-search *::after {
        transition: none !important;
    }
}
