/* ==================== COMMAND PALETTE ==================== */
.command-palette {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 15vh 20px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-out-expo);
}

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

.command-palette__window {
    width: 100%;
    max-width: 560px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.2s var(--ease-out-expo);
    overflow: hidden;
}

.command-palette.active .command-palette__window {
    transform: scale(1) translateY(0);
}

.command-palette__search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.command-palette__search svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.command-palette__input {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--color-text);
    background: transparent;
    border: none;
    outline: none;
}

.command-palette__input::placeholder {
    color: var(--color-text-muted);
}

.command-palette__kbd {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-muted);
}

.command-palette__kbd kbd {
    padding: 2px 6px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.command-palette__list {
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.command-palette__group {
    margin-bottom: 8px;
}

.command-palette__group:last-child {
    margin-bottom: 0;
}

.command-palette__group-title {
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.command-palette__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.command-palette__item:hover,
.command-palette__item.selected {
    background: var(--color-bg-tertiary);
}

.command-palette__item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.command-palette__item-icon svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

/* Highlighted icon for special items */
.command-palette__item-icon--accent {
    background: var(--color-accent-glow);
    border-color: rgba(0, 255, 136, 0.3);
}

.command-palette__item-content {
    flex: 1;
    min-width: 0;
}

.command-palette__item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-palette__item-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-palette__item-shortcut {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.command-palette__item-shortcut kbd {
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
