/* ==========================================================================
   Spotlight modal design system
   Reusable modal classes based on .header-search-modal / .header-apps-modal
   ========================================================================== */

.spotlight-modal {
    position: fixed;
    inset: 0;
    z-index: 1700;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(8px, 6vh, 80px) 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.spotlight-modal:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.spotlight-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 9, 18, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: backdrop-filter, opacity;
}

.spotlight-modal__dialog {
    position: relative;
    width: min(640px, 92vw);
    max-width: 640px;
    max-height: min(640px, calc(100dvh - 40px));
    background:
        radial-gradient(circle at top right, rgba(77, 159, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(11, 17, 34, 0.98), rgba(7, 11, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.spotlight-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.spotlight-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f7fbff;
    letter-spacing: 0.01em;
}

.spotlight-modal__hint {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(215, 225, 255, 0.55);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.spotlight-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(215, 225, 255, 0.72);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.spotlight-modal__close:hover,
.spotlight-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.spotlight-modal__close i[data-lucide] {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.spotlight-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.spotlight-modal__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spotlight-modal__section-title {
    margin: 0;
    padding: 0 2px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(215, 225, 255, 0.55);
}

.spotlight-modal__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.spotlight-modal__search-icon {
    width: 18px;
    height: 18px;
    color: rgba(215, 225, 255, 0.55);
    flex-shrink: 0;
}

.spotlight-modal__input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #f7fbff;
    font: inherit;
    font-size: 0.95rem;
    padding: 0;
}

.spotlight-modal__input::placeholder {
    color: rgba(215, 225, 255, 0.45);
}

.spotlight-modal__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(215, 225, 255, 0.9);
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.spotlight-modal__item:hover,
.spotlight-modal__item:focus-visible,
.spotlight-modal__item.is-active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(92, 217, 240, 0.25);
    color: #fff;
}

.spotlight-modal__featured {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    text-decoration: none;
    color: #f7fbff;
    background:
        linear-gradient(135deg, rgba(17, 36, 61, 0.94), rgba(9, 19, 37, 0.96)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    border: 1px solid rgba(102, 180, 255, 0.16);
    box-shadow: 0 16px 28px rgba(2, 9, 25, 0.24);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.spotlight-modal__featured:hover,
.spotlight-modal__featured:focus-visible,
.spotlight-modal__featured.is-active {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(2, 9, 25, 0.32);
    border-color: rgba(126, 235, 255, 0.28);
    color: #fff;
}

/* Compact variant (for small confirmation or promo modals) */
.spotlight-modal--compact .spotlight-modal__dialog {
    width: min(420px, 92vw);
    max-width: 420px;
    max-height: min(520px, calc(100dvh - 40px));
}

/* Wide variant (for large tables or lists) */
.spotlight-modal--wide .spotlight-modal__dialog {
    width: min(860px, 92vw);
    max-width: 860px;
}

/* Fullscreen variant (for data-heavy modals like Recent Sales) */
.spotlight-modal--fullscreen {
    padding: clamp(8px, 3vh, 32px) clamp(8px, 3vw, 48px);
}

.spotlight-modal--fullscreen .spotlight-modal__dialog {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
}

/* Vote streak preview modal */
.preview-lock-modal__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.preview-lock__viewport {
    width: 100%;
    max-height: 60vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
}

.preview-lock__viewport img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.preview-lock__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-lock__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-0);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.preview-lock__control:hover {
    background: rgba(255, 255, 255, 0.12);
}

.preview-lock__control--ghost {
    background: transparent;
    border-color: transparent;
}

.preview-lock__zoom-value {
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.preview-lock__hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-1);
    opacity: 0.7;
}

/* Congrats modal */
.congrats-modal__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.congrats-modal__icon {
    font-size: 2.5rem;
    line-height: 1;
}

.congrats-modal__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.congrats-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Mobile */
@media (max-width: 720px) {
    .spotlight-modal {
        padding: 0;
        align-items: stretch;
    }

    .spotlight-modal__dialog {
        width: 100%;
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .spotlight-modal__body {
        padding: 16px;
    }

    .preview-lock__viewport {
        max-height: 50vh;
    }

    .preview-lock__viewport img {
        max-height: 50vh;
    }
}
