/* ============================================================
   COMMAND PALETTE (v4.49.0)
   ============================================================ */

.sh-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    z-index: 9999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sh-palette-overlay.open {
    display: flex;
}

.sh-palette {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.sh-palette-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.sh-palette-icon {
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
}

.sh-palette-input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 15px;
    padding: 0;
    color: #1a1a1a;
    background: transparent;
}

.sh-palette-input::placeholder { color: #b0b5bd; }

.sh-palette-hint {
    font-size: 10px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
}

.sh-palette-results {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.sh-palette-group {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f59e0b;
    padding: 8px 16px 4px;
    font-weight: 600;
}

.sh-palette-row {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.sh-palette-row.active {
    background: rgba(22, 174, 175, 0.08);
    border-left-color: #16aeaf;
}

.sh-palette-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sh-palette-row-title {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.sh-palette-row-subtitle {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.sh-palette-empty {
    padding: 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.sh-palette-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    background: #fafafa;
}

/* Mobile: full-screen */
@media (max-width: 640px) {
    .sh-palette-overlay { padding-top: 0; }
    .sh-palette {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ⌘K hint at bottom of sidebar */
.sidebar-palette-hint {
    margin: 10px 12px;
    padding: 8px;
    background: rgba(22, 174, 175, 0.06);
    border: 1px dashed rgba(22, 174, 175, 0.3);
    border-radius: 4px;
    font-size: 10px;
    color: #16aeaf;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.sidebar-palette-hint:hover {
    background: rgba(22, 174, 175, 0.1);
}

/* Mobile magnifying-glass button */
.mobile-palette-trigger {
    background: transparent;
    border: 0;
    font-size: 18px;
    color: #6b7280;
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1;
}

.mobile-palette-trigger:hover { color: #1a1a1a; }
