/* ═══ Help Control: Trigger-Button + Modal ═══ */

/* ── Trigger Button ── */
.pg-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid var(--z-border);
    background: var(--z-bg-subtle);
    color: var(--z-text-mid);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.pg-help-btn:hover {
    border-color: var(--z-primary);
    color: var(--z-primary);
    background: rgba(24, 178, 203, 0.06);
}

/* ── Modal ── */

.z-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: helpFadeIn 0.2s ease;
}

.z-help-overlay.open {
    display: flex;
}

@keyframes helpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.z-help-modal {
    background: var(--z-bg-card);
    border-radius: 1rem;
    max-width: 920px;
    width: 90vw;
    box-shadow: 6px 8px 32px rgba(0,0,0,0.18);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.z-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--z-border);
    background: linear-gradient(135deg, rgba(24, 178, 203, 0.06), transparent);
}

.z-help-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--z-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.z-help-close {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--z-text-muted);
    transition: all 0.15s;
}

.z-help-close:hover {
    background: var(--z-bg-hover);
    color: var(--z-text);
}

.z-help-body {
    padding: 1.5rem;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--z-text-mid);
}

.z-help-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--z-text);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--z-border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.z-help-body h3:first-child {
    margin-top: 0;
}

.z-help-body h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--z-text);
    margin: 1rem 0 0.5rem;
}

.z-help-body p {
    margin: 0.5rem 0 1rem;
    color: var(--z-text-mid);
}

/* Parameter table */
.z-help-params {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.z-help-params th {
    text-align: left;
    padding: 0.3rem 0.5rem;
    font-weight: 600;
    color: var(--z-text);
    border-bottom: 2px solid var(--z-border);
    vertical-align: top;
}

.z-help-params td {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--z-border-light);
    color: var(--z-text-mid);
    vertical-align: top;
}

.z-help-params td:first-child {
    font-weight: 500;
    color: var(--z-text);
    white-space: nowrap;
}

.z-help-params td:last-child {
    color: var(--z-text-mid);
    font-size: 0.7rem;
}

/* ═══ Tab navigation ═══ */
.z-help-tabs {
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--z-border);
    background: var(--z-bg-card);
}

.z-help-tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--z-text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.z-help-tab:hover {
    color: var(--z-text);
    background: var(--z-bg-subtle);
}

.z-help-tab.active {
    color: var(--z-primary);
    border-bottom-color: var(--z-primary);
    font-weight: 600;
}

.z-help-tab-panel {
    display: none;
}

.z-help-tab-panel.active {
    display: block;
}
