/**
 * S-Cloud — Command Palette CSS (v2.2.33)
 * Modal façon Ctrl+K (Linear/VS Code/GitHub style)
 */

.sc-cmd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 14, 30, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1080;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    transition: opacity .15s ease-out;
}

.sc-cmd-overlay.is-open {
    display: flex;
    opacity: 1;
}

.sc-cmd-modal {
    width: 100%;
    max-width: 640px;
    margin: 0 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    transform: translateY(-8px);
    transition: transform .18s cubic-bezier(.42,0,.58,1);
}

.sc-cmd-overlay.is-open .sc-cmd-modal {
    transform: translateY(0);
}

/* ── Input ── */
.sc-cmd-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f3;
    flex-shrink: 0;
}

.sc-cmd-search-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.sc-cmd-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #111827;
    font-family: inherit;
    line-height: 1.4;
    padding: 4px 0;
}

.sc-cmd-input::placeholder {
    color: #9ca3af;
}

.sc-cmd-kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .72rem;
    padding: 2px 6px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 #d1d5db;
}

/* ── List ── */
.sc-cmd-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.sc-cmd-section {
    padding: 6px 16px 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: .04em;
}

.sc-cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background .08s ease;
    border-left: 3px solid transparent;
}

.sc-cmd-item:hover,
.sc-cmd-item.is-selected {
    background: linear-gradient(90deg, rgba(124,58,237,.08), rgba(124,58,237,.02));
    border-left-color: #7C3AED;
}

.sc-cmd-icon {
    color: #6b7280;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sc-cmd-item.is-selected .sc-cmd-icon {
    color: #7C3AED;
}

.sc-cmd-label {
    flex: 1;
    font-size: .9rem;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-cmd-hint-text {
    font-size: .75rem;
    color: #9ca3af;
    flex-shrink: 0;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-cmd-empty {
    padding: 24px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: .85rem;
}

/* ── Footer hint ── */
.sc-cmd-hint {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
    font-size: .72rem;
    color: #6b7280;
    flex-shrink: 0;
}

.sc-cmd-hint kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .68rem;
    padding: 1px 5px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    margin-right: 4px;
}

/* Body lock */
body.sc-cmd-locked {
    overflow: hidden;
}

/* Mobile */
@media (max-width: 576px) {
    .sc-cmd-overlay {
        padding-top: 4vh;
    }
    .sc-cmd-modal {
        margin: 0 8px;
        max-height: 88vh;
    }
    .sc-cmd-hint {
        flex-wrap: wrap;
        gap: 8px;
    }
}
