/* ==========================================================================
   DROPSITE COMMAND PALETTE (RAYCAST / LINEAR STYLE CTRL + K HUD)
   Theme: Obsidian Glass + Cyber Mint + Electric Cyan
   Zero emoji, pure inline SVG, 100% Keyboard Driven
   ========================================================================== */

.cmd-palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100080;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    padding-left: 20px;
    padding-right: 20px;
    background: rgba(4, 7, 14, 0.52);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    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);
}

.cmd-palette-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cmd-palette-card {
    position: relative;
    width: 100%;
    max-width: 620px;
    background: linear-gradient(165deg, rgba(18, 24, 38, 0.96) 0%, rgba(8, 12, 22, 0.98) 100%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-top: 1px solid rgba(52, 211, 153, 0.6);
    border-radius: 18px;
    box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.9), 0 0 50px rgba(16, 185, 129, 0.14);
    overflow: hidden;
    transform: translateY(-14px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cmd-palette-backdrop.open .cmd-palette-card {
    transform: translateY(0) scale(1);
}

/* Wyszukiwarka w nagłówku palety */
.cmd-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.cmd-palette-search-icon {
    color: #C4E7D4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmd-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    color: #FFFFFF;
}

.cmd-palette-input::placeholder {
    color: #64748B;
    font-weight: 500;
}

.cmd-palette-shortcut-badge {
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    font-family: Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Lista poleceń i akcji */
.cmd-palette-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 211, 153, 0.3) transparent;
}

.cmd-palette-category-title {
    padding: 8px 12px 4px 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748B;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.cmd-item:hover,
.cmd-item.selected {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.35);
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.cmd-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.cmd-item:hover .cmd-item-icon,
.cmd-item.selected .cmd-item-icon {
    background: rgba(196, 231, 212, 0.15);
    border-color: rgba(196, 231, 212, 0.45);
    color: #C4E7D4;
}

.cmd-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.cmd-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-desc {
    font-size: 0.74rem;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-tag {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #94A3B8;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.cmd-item.selected .cmd-item-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #5EEAD4;
}

/* Stopka palety ze skrótami */
.cmd-palette-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(6, 10, 18, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.72rem;
    color: #64748B;
}

.cmd-palette-keys {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-key-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cmd-key-hint kbd {
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 0.68rem;
    color: #CBD5E1;
}

/* Stan braku wyników */
.cmd-no-results {
    padding: 36px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748B;
}

.cmd-no-results p {
    font-size: 0.86rem;
    margin: 0;
}

/* ==========================================================================
   NAVBAR COMMAND PALETTE ICON BUTTON (BORDERLESS MINIMALIST)
   ========================================================================== */
.btn-nav-glass.btn-open-command-palette {
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    padding: 2px 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: color 0.25s ease, transform 0.2s ease !important;
    font-family: inherit !important;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.btn-nav-glass.btn-open-command-palette:hover {
    background: transparent !important;
    border: none !important;
    color: var(--text-main) !important;
    transform: scale(1.1) !important;
    box-shadow: none !important;
}

.btn-nav-glass.btn-open-command-palette:active {
    transform: scale(0.96) !important;
}

.btn-nav-glass.btn-open-command-palette svg {
    width: 14.5px;
    height: 14.5px;
    color: var(--text-muted) !important;
    transition: transform 0.2s ease, color 0.25s ease !important;
    flex-shrink: 0;
}

.btn-nav-glass.btn-open-command-palette:hover svg {
    color: var(--text-main) !important;
}

@media (max-width: 640px) {
    .cmd-palette-backdrop {
        padding-top: 5vh;
        padding-left: 10px;
        padding-right: 10px;
    }
    .cmd-palette-card {
        border-radius: 14px;
        max-height: 88vh;
    }
    .cmd-palette-header {
        padding: 12px 14px;
    }
    .cmd-palette-input {
        font-size: 0.92rem;
    }
    .cmd-palette-results {
        max-height: 52vh;
        padding: 6px;
    }
    .cmd-item {
        padding: 9px 10px;
        gap: 10px;
    }
    .cmd-item-title {
        font-size: 0.84rem;
    }
    .cmd-item-desc {
        font-size: 0.7rem;
    }
    .cmd-palette-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 12px;
    }
}
