/* ============================================================================
   EverServe — Help Center Styles
   Copyright Meteor Studios. All Rights Reserved.
   ============================================================================ */

/* ── Layout ────────────────────────────────────────────────────────────────── */

.help-main {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 72px);
    padding: 2rem 1rem;
}

.help-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */

.help-sidebar {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

.help-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
}

.help-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.help-nav-link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.help-nav-link:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
}

.help-nav-link.active {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

/* ── Content ───────────────────────────────────────────────────────────────── */

.help-content {
    flex: 1;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.help-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.help-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.help-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.help-updated {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Body prose ────────────────────────────────────────────────────────────── */

.help-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.help-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}

.help-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1rem;
}

.help-body ul, .help-body ol {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.help-body li {
    margin-bottom: 0.35rem;
}

.help-body a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.help-body a:hover {
    color: var(--cyan-accent);
}

.help-body code {
    background: var(--bg-secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-primary);
}

.help-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.help-body th, .help-body td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.help-body th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.help-body td {
    color: var(--text-secondary);
}

.help-body strong {
    color: var(--text-primary);
}

/* ── Topic Grid (index) ────────────────────────────────────────────────────── */

.help-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.help-topic-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s ease;
}

.help-topic-card:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
}

.help-topic-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.help-topic-card-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.help-topic-card-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.help-topic-card:hover .help-topic-card-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* ── Empty / 404 ───────────────────────────────────────────────────────────── */

.help-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.help-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.help-empty h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.help-empty p {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .help-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .help-sidebar {
        width: 100%;
        position: static;
    }

    .help-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .help-nav-link {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 0.4rem 0.65rem;
        font-size: 0.82rem;
    }

    .help-nav-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-primary);
    }

    .help-content {
        padding: 1.5rem;
    }

    .help-header h1 {
        font-size: 1.4rem;
    }
}
