/* Camp spotlight search — macOS-style overlay from top navbar */

.nav-spotlight-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    line-height: 1;
}

.nav-spotlight-toggle:hover,
.nav-spotlight-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

.nav-spotlight-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.nav-mobile-quick-actions {
    display: none;
    align-items: center;
    gap: 5px;
    margin: 0;
    flex-shrink: 0;
}

.nav-mobile-quick-actions .nav-spotlight-toggle--bar,
.nav-mobile-quick-actions .nav-feedback-toggle--bar {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 767.98px) {
    .nav-spotlight-toggle--desktop {
        display: none !important;
    }

    .nav-mobile-quick-actions {
        display: flex;
    }

    .nav-mobile-quick-actions .nav-spotlight-toggle--bar,
    .nav-mobile-quick-actions .nav-feedback-toggle--bar {
        display: inline-flex;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.12);
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .nav-spotlight-toggle--bar {
        display: none !important;
    }
}

/* Overlay */
.camp-spotlight {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(72px, 14vh, 140px) 20px 20px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    contain: layout style;
}

/* Closed overlays must not eat clicks — child panels default to pointer-events:auto. */
.camp-spotlight:not(.is-open),
.camp-spotlight:not(.is-open) * {
    pointer-events: none !important;
}

.camp-spotlight[hidden] {
    display: none !important;
}

.camp-spotlight.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.camp-spotlight.is-open .camp-spotlight__backdrop,
.camp-spotlight.is-open .camp-spotlight__panel,
.camp-spotlight.is-open .camp-spotlight__panel * {
    pointer-events: auto;
}

.camp-spotlight__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
}

.camp-spotlight__panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.15s ease;
}

.camp-spotlight.is-open .camp-spotlight__panel {
    transform: translateY(0);
    opacity: 1;
}

.camp-spotlight__panel--wide {
    width: min(760px, 100%);
}

.camp-spotlight__card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.camp-spotlight__switch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.camp-spotlight__switch-btn,
.camp-spotlight__switch-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.camp-spotlight__switch-btn {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.camp-spotlight__switch-link {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 107, 0, 0.22);
    color: #fff;
}

.camp-spotlight__switch-btn:hover,
.camp-spotlight__switch-btn:focus-visible,
.camp-spotlight__switch-link:hover,
.camp-spotlight__switch-link:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    outline: none;
}

.camp-spotlight__switch-btn--active {
    border-color: rgba(255, 167, 102, 0.55);
    background: rgba(255, 107, 0, 0.42);
    color: #fff;
}

.camp-spotlight__switch-link:hover,
.camp-spotlight__switch-link:focus-visible {
    background: rgba(255, 107, 0, 0.38);
}

.camp-spotlight__switch-kbd {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0.85;
}

.camp-spotlight__switch-kbd kbd,
.camp-spotlight__switch-btn kbd {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.68rem;
    font-family: inherit;
    line-height: 1.3;
}

.camp-spotlight--messages {
    z-index: 1080;
}

@media (max-width: 767.98px) {
    /* Full-screen Camp Messages — keep overlay locked to the viewport so the
       backdrop never scrolls away under tall content. */
    .camp-spotlight--messages {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        overflow: hidden;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        overscroll-behavior: none;
        contain: layout style;
    }

    .camp-spotlight--messages .camp-spotlight__backdrop {
        position: fixed;
        inset: 0;
    }

    .camp-spotlight--messages .camp-spotlight__panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100%;
        margin: 0;
        flex: 1 1 auto;
        min-height: 0;
        transform: none;
    }

    .camp-spotlight--messages.is-open .camp-spotlight__panel {
        transform: none;
    }

    .camp-spotlight--messages .camp-spotlight__card {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .camp-spotlight--messages .camp-spotlight__switch-bar {
        flex-shrink: 0;
        position: relative;
        margin-top: 0;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(15, 23, 42, 0.96);
    }

    .camp-spotlight--messages .camp-spotlight__hint {
        display: none;
    }

    .camp-spotlight--messages .camp-spotlight__switch-kbd {
        display: none;
    }
}

body.account-pending .camp-spotlight--messages {
    z-index: 10060;
}

.camp-spotlight__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 14px 18px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
}

.camp-spotlight__bar > .bi-search {
    font-size: 1.15rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.camp-spotlight__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    padding: 4px 0;
    outline: none;
}

.camp-spotlight__input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.camp-spotlight__go {
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #ff6b00, #e85d00);
    box-shadow: 0 6px 18px rgba(255, 107, 0, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.camp-spotlight__go:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(255, 107, 0, 0.34);
}

.camp-spotlight__recent {
    margin-top: 10px;
    padding: 12px 14px 10px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.camp-spotlight__recent-title {
    margin: 0 0 8px;
    padding: 0 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.camp-spotlight__recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.camp-spotlight__recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #1e293b;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.camp-spotlight__recent-item:hover,
.camp-spotlight__recent-item:focus-visible {
    background: #fff7ed;
    color: #c24100;
    outline: none;
}

.camp-spotlight__recent-item > .bi-clock-history {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: #94a3b8;
}

.camp-spotlight__recent-item:hover > .bi-clock-history,
.camp-spotlight__recent-item:focus-visible > .bi-clock-history {
    color: #ea580c;
}

.camp-spotlight__recent-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.camp-spotlight__recent-tag {
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #9a3412;
    background: #ffedd5;
}

.camp-spotlight__hint {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.camp-spotlight__hint kbd {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    font-family: inherit;
}

html.camp-scroll-locked {
    overflow: hidden;
    height: 100%;
}

html.camp-scroll-locked body {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .camp-spotlight,
    .camp-spotlight__panel,
    .camp-spotlight__backdrop {
        transition: none !important;
    }

    .camp-spotlight__panel {
        transform: none !important;
        opacity: 1 !important;
    }

    .camp-spotlight:not(.is-open) .camp-spotlight__panel {
        opacity: 0 !important;
    }
}
html[data-theme="dark"] .camp-spotlight__bar {
    background: rgba(30, 34, 40, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .camp-spotlight__input {
    color: #f1f5f9;
}

html[data-theme="dark"] .camp-spotlight__bar > .bi-search {
    color: #64748b;
}

html[data-theme="dark"] .camp-spotlight__recent {
    background: rgba(30, 34, 40, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

html[data-theme="dark"] .camp-spotlight__recent-title {
    color: #64748b;
}

html[data-theme="dark"] .camp-spotlight__recent-item {
    color: #f1f5f9;
}

html[data-theme="dark"] .camp-spotlight__recent-item:hover,
html[data-theme="dark"] .camp-spotlight__recent-item:focus-visible {
    background: rgba(255, 107, 0, 0.14);
    color: #fdba74;
}

html[data-theme="dark"] .camp-spotlight__recent-tag {
    color: #fdba74;
    background: rgba(255, 107, 0, 0.18);
}

html[data-theme="dark"] .camp-spotlight__card {
    background: rgba(30, 34, 40, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
