/* ================================================
   COMMAND PALETTE (Ctrl+K)
   ================================================ */

.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.command-palette-overlay.open {
    opacity: 1;
    visibility: visible;
}

.command-palette-modal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 580px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: paletteSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paletteSlideIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
}

.command-palette-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #0f172a;
    background: transparent;
    font-family: inherit;
}

.command-palette-input::placeholder {
    color: #94a3b8;
}

.command-palette-kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    font-family: inherit;
}

.command-palette-results,
.command-palette-suggestions {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.command-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    padding: 8px 10px 4px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.command-item:hover,
.command-item.selected {
    background: #f0f9ff;
}

.command-item.selected {
    background: #e0f2fe;
}

.command-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.command-item.selected .command-item-icon {
    background: #0284c7;
    color: #ffffff;
}

.command-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.command-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}

.command-item-desc {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-item-shortcut {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: #475569;
    font-family: inherit;
    white-space: nowrap;
}

.command-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.command-palette-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #64748b;
}

.command-palette-footer kbd {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: #475569;
    font-family: inherit;
    margin-right: 4px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .command-palette-overlay {
        padding-top: 10vh;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .command-palette-modal {
        max-height: 80vh;
    }
    
    .command-palette-footer {
        display: none;
    }
}
