/* =========================================================
   CFLIX SPOTLIGHT COMMAND PALETTE (Ctrl+K / Cmd+K)
   ========================================================= */

:root {
    --palette-bg: rgba(4, 18, 14, 0.94);
    --palette-border: rgba(103, 255, 217, 0.35);
    --palette-glow: rgba(61, 245, 189, 0.18);
}

.cflix-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: min(120px, 14vh) 20px 40px;
    background: rgba(0, 8, 6, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cflix-palette-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cflix-palette-modal {
    position: relative;
    width: min(680px, 100%);
    max-height: calc(85vh - 100px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--palette-border);
    border-radius: 20px;
    background: var(--palette-bg);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8),
                0 0 50px var(--palette-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.96) translateY(-12px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cflix-palette-overlay.is-open .cflix-palette-modal {
    transform: scale(1) translateY(0);
}

.cflix-palette-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(111, 255, 209, 0.14);
    background: rgba(255, 255, 255, 0.015);
}

.cflix-palette-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: var(--cyan, #73fff0);
    font-size: 16px;
}

.cflix-palette-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.cflix-palette-input::placeholder {
    color: rgba(182, 213, 201, 0.45);
}

.cflix-palette-badge {
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(111, 255, 209, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #718f84);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.cflix-palette-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overscroll-behavior: contain;
}

.cflix-palette-results::-webkit-scrollbar {
    width: 6px;
}

.cflix-palette-results::-webkit-scrollbar-thumb {
    background: rgba(111, 255, 209, 0.2);
    border-radius: 999px;
}

.cflix-palette-category {
    padding: 10px 12px 4px;
    color: var(--cyan, #73fff0);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cflix-palette-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text, #f1fff9);
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.cflix-palette-item:hover,
.cflix-palette-item.is-selected {
    background: rgba(61, 245, 189, 0.1);
    border-color: rgba(103, 255, 217, 0.3);
    color: #ffffff;
}

.cflix-palette-item-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(111, 255, 209, 0.15);
    color: var(--green, #3df5bd);
    font-size: 14px;
    flex-shrink: 0;
}

.cflix-palette-item.is-selected .cflix-palette-item-icon {
    background: rgba(61, 245, 189, 0.22);
    border-color: var(--green, #3df5bd);
    color: #ffffff;
}

.cflix-palette-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cflix-palette-item-title {
    font-size: 14px;
    font-weight: 650;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cflix-palette-item-subtitle {
    font-size: 12px;
    color: var(--text-muted, #718f84);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cflix-palette-item-tag {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    color: var(--green, #3df5bd);
    background: rgba(61, 245, 189, 0.08);
    border: 1px solid rgba(61, 245, 189, 0.2);
    flex-shrink: 0;
}

.cflix-palette-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted, #718f84);
    font-size: 13px;
}

.cflix-palette-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    border-top: 1px solid rgba(111, 255, 209, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted, #718f84);
    font-size: 11px;
}

.cflix-palette-shortcuts {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cflix-palette-shortcuts span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cflix-palette-shortcuts kbd {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: inherit;
    font-size: 10px;
}

/* Nav trigger search button */
.cflix-spotlight-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--border, rgba(111, 255, 209, 0.14));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-soft, #b6d5c9);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cflix-spotlight-trigger:hover {
    border-color: var(--border-strong, rgba(103, 255, 217, 0.34));
    background: rgba(61, 245, 189, 0.07);
    color: #ffffff;
}

.cflix-spotlight-trigger kbd {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(111, 255, 209, 0.18);
    color: var(--cyan, #73fff0);
    font-size: 10px;
    font-weight: 700;
}
