/* ═══════════════════════════════════════════════════════════ */
/* V2 HELP DOCUMENTATION — Styling for in-app help pages      */
/* ═══════════════════════════════════════════════════════════ */

/* ── Modal Overlay ── */
.v2-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.60);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.v2-help-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Slide-in Panel ── */
.v2-help-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 500px;
    max-width: 92vw;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.v2-help-panel.active {
    right: 0;
}

/* ── Panel Header ── */
.v2-help-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    flex-shrink: 0;
}

.v2-help-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-help-panel-header h3 i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.v2-help-close-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    line-height: 1;
}

.v2-help-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── Panel Body (Scrollable) ── */
.v2-help-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

/* ── Documentation Content Styles ── */
.v2-help-section {
    margin-bottom: 28px;
}

.v2-help-section:last-child {
    margin-bottom: 0;
}

.v2-help-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-help-section-title i {
    color: #3b82f6;
    font-size: 1.1rem;
}

.v2-help-text {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #475569;
    margin: 0 0 10px 0;
}

/* ── Help Cards (tips, warnings) ── */
.v2-help-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-left: 3px solid #3b82f6;
}

.v2-help-card.tip {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.v2-help-card.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.v2-help-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.v2-help-card p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #64748b;
    margin: 0;
}

/* ── Step Lists ── */
.v2-help-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    counter-reset: help-step;
}

.v2-help-steps li {
    counter-increment: help-step;
    padding: 10px 12px 10px 44px;
    position: relative;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.v2-help-steps li:last-child {
    border-bottom: none;
}

.v2-help-steps li::before {
    content: counter(help-step);
    position: absolute;
    left: 8px;
    top: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Field descriptions ── */
.v2-help-field-list {
    margin: 0 0 12px 0;
    padding: 0;
    list-style: none;
}

.v2-help-field-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #475569;
}

.v2-help-field-list li:last-child {
    border-bottom: none;
}

.v2-help-field-name {
    font-weight: 700;
    color: #1e293b;
}

/* ── Keyboard shortcuts / badges ── */
.v2-help-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.v2-help-badge.blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.v2-help-badge.green {
    background: #dcfce7;
    color: #16a34a;
}

.v2-help-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.v2-help-badge.amber {
    background: #fef3c7;
    color: #d97706;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .v2-help-panel {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }

    .v2-help-panel-body {
        padding: 16px;
    }

    .v2-help-section-title {
        font-size: 0.92rem;
    }
}