/* ============================================================
   Help Panel — Full-viewport slide-in overlay
   Mirrors the groupsPanel overlay pattern
   ============================================================ */

.help-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 10003;
    background: var(--bg-color, #000);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.help-panel-overlay.open {
    transform: translateX(0);
    pointer-events: auto;
}

/* ---- Header ---- */
.hp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    flex-shrink: 0;
}

.hp-header-left h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #e4e4e7);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp-header-left h2 i {
    color: var(--accent, #3bf692);
}

.hp-header-left p {
    font-size: 0.85rem;
    color: var(--text-muted, #71717a);
    margin: 6px 0 0;
}

.hp-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover, #1a1a1d);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    color: var(--text-secondary, #a1a1aa);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.hp-close-btn:hover {
    background: var(--surface-active, #27272a);
    color: var(--text-primary, #e4e4e7);
}

/* ---- Body (scrollable content) ---- */
.hp-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 28px 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---- Section Cards ---- */
.hp-section {
    background: var(--surface, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-md, 10px);
    padding: 18px 22px;
}

.hp-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary, #e4e4e7);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp-section h3 i {
    color: var(--accent, #3bf692);
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.hp-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hp-section li {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary, #a1a1aa);
    padding-left: 20px;
    position: relative;
}

.hp-section li::before {
    content: "›";
    position: absolute;
    left: 4px;
    top: -1px;
    color: var(--accent, #3bf692);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.hp-section li strong {
    color: var(--text-primary, #e4e4e7);
    font-weight: 600;
}

.hp-section kbd {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
    font-size: 0.78rem;
    color: var(--text-primary, #e4e4e7);
    background: var(--surface-hover, #1a1a1d);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
    border-bottom-width: 2px;
    border-radius: 4px;
    line-height: 1.4;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
    .hp-header {
        padding: 18px 18px 14px;
    }

    .hp-header-left h2 {
        font-size: 1.3rem;
    }

    .hp-body {
        padding: 16px 16px 32px;
        gap: 16px;
    }

    .hp-section {
        padding: 14px 16px;
    }
}

/* ---- Light theme ---- */
html.light-theme .help-panel-overlay {
    background: var(--bg-color, #fff);
}

html.light-theme .hp-section {
    background: var(--surface, rgba(0, 0, 0, 0.02));
    border-color: var(--border-subtle, rgba(0, 0, 0, 0.08));
}

html.light-theme .hp-section kbd {
    background: #f4f4f5;
    border-color: #d4d4d8;
    color: #18181b;
}

html.light-theme .hp-close-btn {
    background: #f4f4f5;
    border-color: #e4e4e7;
}

html.light-theme .hp-close-btn:hover {
    background: #e4e4e7;
}
