/* ══════════════════════════════════════════════════════════════
   SPOTLIGHT / OMNIBOX — Global Arama
   ══════════════════════════════════════════════════════════════ */
.spotlight-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: spotlightFadeIn 0.15s ease-out;
}
.spotlight-overlay.active {
    display: flex;
}
@keyframes spotlightFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.spotlight-box {
    width: 580px;
    max-width: 94vw;
    background: var(--modal-bg, #ffffff);
    border-radius: 16px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255,255,255,0.08);
    overflow: hidden;
    animation: spotlightSlideIn 0.18s ease-out;
}
@keyframes spotlightSlideIn {
    from { opacity: 0; transform: translateY(-18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.spotlight-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.spotlight-input-wrap i.search-icon {
    font-size: 18px;
    color: var(--primary, #6366f1);
    flex-shrink: 0;
}
.spotlight-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary, #1e293b);
    caret-color: var(--primary, #6366f1) !important;
}
.spotlight-input-wrap input::placeholder {
    color: var(--text-muted, #94a3b8);
}
.spotlight-kbd {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--table-header-bg, #f1f5f9);
    color: var(--text-muted, #94a3b8);
    border: 1px solid var(--border-color, #e2e8f0);
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
    user-select: none;
}

.spotlight-results {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 0;
}
.spotlight-results::-webkit-scrollbar { width: 5px; }
.spotlight-results::-webkit-scrollbar-thumb {
    background: var(--gray-light, #cbd5e1);
    border-radius: 10px;
}

.spotlight-group-title {
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted, #94a3b8);
    user-select: none;
}

.spotlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.08s;
    border-radius: 0;
}
.spotlight-item:hover,
.spotlight-item.active {
    background: var(--table-row-hover, #f1f5f9);
}
.spotlight-item.active {
    background: var(--primary, #6366f1);
    color: #fff;
}
.spotlight-item.active .spotlight-item-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.spotlight-item.active .spotlight-item-sub {
    color: rgba(255,255,255,0.7);
}

.spotlight-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--table-header-bg, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary, #6366f1);
    flex-shrink: 0;
    transition: background 0.08s, color 0.08s;
}

.spotlight-item-text {
    flex: 1;
    min-width: 0;
}
.spotlight-item-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}
.spotlight-item-sub {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    margin-top: 1px;
    transition: color 0.08s;
}

.spotlight-enter-hint {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    opacity: 0;
    transition: opacity 0.1s;
    flex-shrink: 0;
}
.spotlight-item.active .spotlight-enter-hint {
    opacity: 1;
    color: rgba(255,255,255,0.7);
}

.spotlight-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
}
.spotlight-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
}

.spotlight-footer {
    padding: 8px 20px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}
.spotlight-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.spotlight-footer kbd {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--table-header-bg, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    font-family: inherit;
}

/* Dark-mode overrides */
body.dark-mode .spotlight-overlay {
    background: rgba(0, 0, 0, 0.55);
}
body.dark-mode .spotlight-box {
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(255,255,255,0.06);
}
body.dark-mode .spotlight-item-icon {
    background: rgba(255,255,255,0.06);
}
body.dark-mode .spotlight-item:hover,
body.dark-mode .spotlight-item.active:not(.active) {
    background: rgba(255,255,255,0.04);
}
