:root {
    --event-search-orange: #df640f;
    --event-search-orange-deep: #a83d08;
    --event-search-ink: #17130f;
    --event-search-paper: #fffdf9;
    --event-search-muted: #6f675f;
    --event-search-line: rgba(55, 38, 24, .13);
}

body.event-search-modal-open {
    overflow: hidden;
}

.event-search-modal[hidden] {
    display: none !important;
}

.event-search-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: start center;
    padding: clamp(20px, 6vh, 64px) clamp(14px, 4vw, 44px);
    font-family: "Roboto", "Helvetica Neue", sans-serif;
}

.event-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 10, 8, .72);
    backdrop-filter: blur(12px) saturate(.8);
    animation: event-search-fade .18s ease-out both;
}

.event-search-modal__dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: min(780px, calc(100dvh - clamp(40px, 12vh, 128px)));
    overflow: hidden auto;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 4%, rgba(223, 100, 15, .13), transparent 19rem),
        var(--event-search-paper);
    color: var(--event-search-ink);
    box-shadow: 0 34px 110px rgba(0, 0, 0, .35);
    animation: event-search-rise .24s cubic-bezier(.2, .8, .2, 1) both;
}

.event-search-modal__masthead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 38px) clamp(22px, 5vw, 46px) 18px;
}

.event-search-modal__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--event-search-orange-deep);
    font-size: 12px;
    font-weight: 668;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.event-search-modal__masthead h2 {
    margin: 0;
    color: var(--event-search-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.event-search-modal__close {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--event-search-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .76);
    color: var(--event-search-ink);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.event-search-modal__close:hover {
    transform: rotate(5deg);
    background: #fff;
}

.event-search-modal__close svg,
.event-search-modal__submit svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.event-search-modal__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 clamp(22px, 5vw, 46px);
}

.event-search-modal__field {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
}

.event-search-modal__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.event-search-modal__field input {
    width: 100%;
    min-height: 62px;
    padding: 13px 64px 13px 54px;
    border: 1px solid rgba(55, 38, 24, .18);
    border-radius: 15px;
    outline: 0;
    background: rgba(255, 255, 255, .9);
    color: var(--event-search-ink);
    font-size: 17px !important;
    line-height: 1.35;
    box-shadow: inset 0 1px 0 #fff, 0 8px 26px rgba(74, 48, 27, .06);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.event-search-modal__field input:focus {
    border-color: var(--event-search-orange);
    box-shadow: 0 0 0 4px rgba(223, 100, 15, .13), 0 12px 30px rgba(74, 48, 27, .09);
}

.event-search-modal__field-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 19px;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: var(--event-search-orange);
    transform: translateY(-50%);
    pointer-events: none;
}

.event-search-modal__field-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.event-search-modal__field kbd {
    position: absolute;
    top: 50%;
    right: 15px;
    padding: 4px 6px;
    border: 1px solid var(--event-search-line);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: #f4f0ea;
    color: #756b61;
    font: 700 10px/1 sans-serif;
    transform: translateY(-50%);
}

.event-search-modal__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 62px;
    padding: 0 24px;
    border: 0;
    border-radius: 15px;
    background: var(--event-search-orange);
    color: #fff;
    font-size: 16px;
    font-weight: 668;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(187, 71, 5, .22);
    transition: transform .18s ease, background .18s ease;
}

.event-search-modal__submit:hover {
    transform: translateY(-1px);
    background: var(--event-search-orange-deep);
}

.event-search-modal__hint {
    padding: 0 clamp(22px, 5vw, 46px);
    margin: 10px 0 0;
    color: var(--event-search-muted);
    font-size: 13px;
}

.event-search-modal__content {
    min-height: 210px;
    padding: 25px clamp(22px, 5vw, 46px) clamp(26px, 4vw, 38px);
}

.event-search-modal__discover>p,
.event-search-modal__recent-title,
.event-search-modal__results-heading {
    margin: 0 0 12px;
    color: var(--event-search-muted);
    font-size: 12px;
    font-weight: 668;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.event-search-modal__shortcuts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.event-search-modal__shortcuts a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--event-search-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .64);
    color: var(--event-search-ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.event-search-modal__shortcuts a:hover {
    transform: translateY(-2px);
    border-color: rgba(223, 100, 15, .45);
    background: #fff;
    color: var(--event-search-orange-deep);
}

.event-search-modal__shortcuts span {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #201a15;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.event-search-modal__recent {
    margin-bottom: 22px;
}

.event-search-modal__recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-search-modal__clear {
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--event-search-orange-deep);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.event-search-modal__recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-search-modal__recent-list button {
    padding: 8px 12px;
    border: 1px solid var(--event-search-line);
    border-radius: 999px;
    background: #fff;
    color: var(--event-search-ink);
    font-size: 13px;
    cursor: pointer;
}

.event-search-modal__status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    color: var(--event-search-muted);
    font-size: 14px;
    text-align: center;
}

.event-search-modal__status--loading::before {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid rgba(223, 100, 15, .2);
    border-top-color: var(--event-search-orange);
    border-radius: 50%;
    content: "";
    animation: event-search-spin .7s linear infinite;
}

.event-search-modal__results {
    display: grid;
    gap: 8px;
}

.event-search-modal__result {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 14px;
    padding: 9px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.event-search-modal__result:hover,
.event-search-modal__result:focus-visible {
    transform: translateX(3px);
    border-color: var(--event-search-line);
    outline: 0;
    background: #fff;
    color: inherit;
}

.event-search-modal__result img {
    width: 74px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    background: #eee8df;
}

.event-search-modal__result-copy {
    min-width: 0;
}

.event-search-modal__result strong {
    display: block;
    overflow: hidden;
    color: var(--event-search-ink);
    font-size: 15px;
    font-weight: 668;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-search-modal__result-meta {
    display: flex;
    gap: 7px;
    margin-top: 6px;
    overflow: hidden;
    color: var(--event-search-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-search-modal__result-arrow {
    color: var(--event-search-orange);
    font-size: 21px;
    text-align: center;
}

.event-search-modal__all-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    margin-top: 8px;
    border-top: 1px solid var(--event-search-line);
    color: var(--event-search-orange-deep);
    font-size: 14px;
    font-weight: 668;
    text-decoration: none;
}

.night-mode .event-search-modal__dialog,
[data-theme="dark"] .event-search-modal__dialog {
    --event-search-ink: #f7f1e9;
    --event-search-paper: #171412;
    --event-search-muted: #b8aea5;
    --event-search-line: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .1);
}

.night-mode .event-search-modal__field input,
.night-mode .event-search-modal__close,
.night-mode .event-search-modal__shortcuts a,
.night-mode .event-search-modal__recent-list button,
.night-mode .event-search-modal__result:hover,
.night-mode .event-search-modal__result:focus-visible,
[data-theme="dark"] .event-search-modal__field input,
[data-theme="dark"] .event-search-modal__close,
[data-theme="dark"] .event-search-modal__shortcuts a,
[data-theme="dark"] .event-search-modal__recent-list button,
[data-theme="dark"] .event-search-modal__result:hover,
[data-theme="dark"] .event-search-modal__result:focus-visible {
    background: rgba(255, 255, 255, .055);
    color: var(--event-search-ink);
}

@media (max-width: 640px) {
    .event-search-modal {
        place-items: start stretch;
        padding: 12px;
    }

    .event-search-modal__dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-width: 1px;
        border-radius: 24px;
    }

    .event-search-modal__dialog::before {
        display: block;
        width: 44px;
        height: 4px;
        margin: 9px auto 0;
        border-radius: 99px;
        background: rgba(90, 75, 62, .28);
        content: "";
    }

    .event-search-modal__masthead {
        padding-top: 18px;
    }

    .event-search-modal__form {
        grid-template-columns: minmax(0, 1fr) 58px;
    }

    .event-search-modal__submit {
        width: 58px;
        padding: 0;
        font-size: 0;
    }

    .event-search-modal__submit svg {
        width: 22px;
        height: 22px;
    }

    .event-search-modal__field kbd {
        display: none;
    }

    .event-search-modal__field input {
        padding-right: 16px;
    }

    .event-search-modal__shortcuts {
        grid-template-columns: 1fr;
    }

    .event-search-modal__result {
        grid-template-columns: 62px minmax(0, 1fr) 22px;
        gap: 10px;
    }

    .event-search-modal__result img {
        width: 62px;
        height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-search-modal *,
    .event-search-modal *::before {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@keyframes event-search-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes event-search-rise {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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