/* ═══════════════════════════════════════════════════════════
   Help Center — Unified Documentation & Support
   ═══════════════════════════════════════════════════════════ */

/* ── Contact Support Banner ──────────────────────────────── */
.help-contact-banner {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-left: 4px solid #34d399;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.06) 0%, rgba(56, 189, 248, 0.04) 100%);
    overflow: hidden;
}

.help-contact-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    gap: 1rem;
}

.help-contact-text {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
}

.help-contact-icon {
    font-size: 1.5rem;
    color: #34d399;
    flex-shrink: 0;
}

.help-contact-text strong {
    color: var(--text-light);
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.help-contact-text span {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.help-contact-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    color: #0f172a;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.2);
}

.help-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.35);
}

/* ── Hero Search Section ─────────────────────────────────── */
.help-hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0 0;
}

.help-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.help-hero-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.help-search-wrap {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.help-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-input);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.help-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--neon-blue-rgb), 0.15);
}

.help-search-input::placeholder { color: var(--text-faint); }

.help-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    pointer-events: none;
}

/* ── Content ─────────────────────────────────────────────── */
.help-content {
    max-width: 960px;
    margin: 0 auto;
}

.help-section {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.35s ease;
}

.help-section-header {
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
    font-size: 1.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--divider-subtle);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.help-section-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* ── Article Grid ────────────────────────────────────────── */
.help-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

/* ── Article Cards ───────────────────────────────────────── */
.help-article {
    background: var(--glass-bg);
    padding: 1rem 1.125rem;
    border-radius: 12px;
    border: 1px solid var(--divider-subtle);
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.help-article--static {
    cursor: default;
}

.help-article--static:hover {
    transform: none;
    box-shadow: none;
}

.help-article:hover {
    background: var(--glass-bg-hover);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.help-article-title {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-article-title .article-icon {
    color: var(--primary-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.help-article-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
    flex: 1;
}

.help-article-read {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--primary-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.help-article:hover .help-article-read {
    opacity: 1;
    transform: translateX(0);
}

/* ── Command cards (discord) ─────────────────────────────── */
.help-cmd-tag {
    font-family: monospace;
    color: var(--primary-light);
    background: rgba(220, 38, 38, 0.1);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    font-size: 0.82rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 0.375rem;
}

/* ── Article Popup Modal ─────────────────────────────────── */
.help-article-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
}

.help-article-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.help-modal-card {
    background: var(--surface-1, #0f172a);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: help-modal-in 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--text-faint) transparent;
}

@keyframes help-modal-in {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--divider-subtle);
    position: sticky;
    top: 0;
    background: var(--surface-1, #0f172a);
    z-index: 2;
    border-radius: 16px 16px 0 0;
}

.help-modal-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.help-modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}

.help-modal-close:hover { color: var(--text-light); }

.help-modal-body {
    padding: 1.5rem;
}

.help-modal-body p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* ── Steps ───────────────────────────────────────────────── */
.help-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.help-step {
    counter-increment: step-counter;
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.help-step::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.help-step-text {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.help-step-text strong {
    color: var(--text-light);
}

/* ── Tip Callout ─────────────────────────────────────────── */
.help-tip {
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin: 1rem 0;
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.help-tip-icon {
    color: #34d399;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.help-tip-text {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ── Note Callout ────────────────────────────────────────── */
.help-note {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin: 1rem 0;
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.help-note-icon {
    color: #38bdf8;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.help-note-text {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ── Related Links ───────────────────────────────────────── */
.help-related {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divider-subtle);
}

.help-related-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.help-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.help-related-link {
    font-size: 0.82rem;
    color: var(--primary-light);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: var(--glass-bg);
    border: 1px solid var(--divider-subtle);
    transition: all 0.15s ease;
    cursor: pointer;
}

.help-related-link:hover {
    background: var(--glass-bg-hover);
    border-color: var(--primary-dark);
}

/* ── Support Section (embedded) ──────────────────────────── */
.help-support-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

/* ── Empty/No-Results State ──────────────────────────────── */
.help-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.help-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--text-faint);
}

/* ── Desktop-only classes ────────────────────────────────── */
@media (min-width: 56.25rem) {
    .help-support-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Mobile (<900px) ─────────────────────────────────────── */
@media (max-width: 899px) {
    .help-hero-title { font-size: 1.35rem; }

    .help-contact-inner { flex-direction: column; align-items: stretch; text-align: center; }
    .help-contact-text { flex-direction: column; text-align: center; gap: 0.5rem; }
    .help-contact-btn { width: 100%; justify-content: center; }

    .help-article-grid { grid-template-columns: 1fr; }

    .help-section-header { font-size: 1.15rem; }

    .help-article-title { font-size: 0.88rem; }
    .help-article-desc { font-size: 0.82rem; }

    /* Modal takes more space on mobile */
    .help-modal-card { max-height: 92vh; border-radius: 12px; }
    .help-modal-header { padding: 1rem 1.125rem; }
    .help-modal-body { padding: 1.125rem; }
    .help-modal-title { font-size: 1rem; }

    /* Support grid stacks */
    .help-support-grid { grid-template-columns: 1fr; }

    .help-support-grid .card.glass { padding: 0.875rem 1rem !important; }

    .ticket-row-header,
    .ticket-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
}

/* ── Article body inline links ─────────────────────────────── */
.article-body-content a,
.help-step-text a,
.help-tip-text a,
.help-note-text a {
    color: var(--primary-light, #ef4444);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.article-body-content a:hover,
.help-step-text a:hover,
.help-tip-text a:hover,
.help-note-text a:hover {
    border-bottom-color: var(--primary-light, #ef4444);
    color: var(--primary, #dc2626);
}

/* ── Search result count ───────────────────────────────── */
.help-search-count {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.help-search-count strong {
    color: var(--primary-light, #ef4444);
}

/* ── Back to top button ────────────────────────────────── */
.help-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 90;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.help-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.help-back-to-top:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--primary-light, #ef4444);
    color: var(--primary-light, #ef4444);
    transform: translateY(-2px);
}

/* ── Card focus state (accessibility) ──────────────────── */
.help-article:focus-visible {
    outline: 2px solid var(--primary-light, #ef4444);
    outline-offset: 2px;
}
