/* =============================================================================
   BlockThatCall — Help page styles
   Dark theme matching the rest of the site
   ========================================================================== */

:root {
    --bg: #0A1F3D;
    --bg-light: #112A52;
    --fg: #FFFFFF;
    --muted: #B8C5D6;
    --accent: #4A90E2;
    --accent-hover: #6BA5E8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --max-width: 960px;
}

.help-main {
    padding: 56px 0 80px;
    flex: 1;
}

.help-header {
    text-align: center;
    margin-bottom: 32px;
}

.help-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.help-header p {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
}

/* ----- Search box ----- */

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

.help-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 1.05rem;
}

.help-search input[type="search"] {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    padding: 16px 48px 16px 48px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

.help-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.help-search input[type="search"]::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.help-search input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(74, 144, 226, 0.08);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.18);
}

.help-search .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: var(--muted);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: color .2s, background .2s;
}

.help-search .search-clear:hover {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.15);
}

.help-search.has-query .search-clear {
    display: flex;
}

/* ----- Category filter ----- */

.help-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 40px;
    max-width: 100%;
}

.help-category-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--muted);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
    white-space: nowrap;
}

.help-category-btn:hover {
    color: var(--fg);
    border-color: rgba(74, 144, 226, 0.4);
}

.help-category-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.35);
}

.help-category-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ----- Status line (results count / no results) ----- */

.help-status {
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
    min-height: 1.2em;
}

.help-status.no-results {
    color: var(--accent);
    font-weight: 600;
}

/* ----- Article cards ----- */

.help-articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-article {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 28px;
    transition: border-color .2s, transform .2s;
    scroll-margin-top: 100px;
}

.help-article:hover {
    border-color: rgba(74, 144, 226, 0.5);
}

.help-article.highlight {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.12);
}

.help-article-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.help-article-head::-webkit-details-marker {
    display: none;
}

.help-article-chevron {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--accent);
    font-size: 1rem;
    transition: transform .2s;
    user-select: none;
}

.help-article[open] .help-article-chevron {
    transform: rotate(90deg);
}

.help-article-title-wrap {
    flex: 1;
}

.help-article-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 4px;
}

.help-article-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 999px;
    padding: 2px 10px;
}

.help-article-body {
    color: var(--muted);
    line-height: 1.7;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
    font-size: 0.97rem;
}

.help-article-body h4 {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 600;
    margin: 18px 0 8px;
}

.help-article-body h4:first-child {
    margin-top: 0;
}

.help-article-body p {
    margin: 0 0 12px;
    color: var(--muted);
}

.help-article-body p:last-child {
    margin-bottom: 0;
}

.help-article-body ul,
.help-article-body ol {
    margin: 0 0 12px 22px;
    color: var(--muted);
}

.help-article-body li {
    margin-bottom: 6px;
}

.help-article-body strong {
    color: var(--fg);
    font-weight: 600;
}

.help-article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
    transition: border-color .2s, color .2s;
}

.help-article-body a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

.help-article-body code {
    background: rgba(74, 144, 226, 0.15);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.88em;
    word-break: break-word;
}

/* Search highlight */
.help-article mark,
.help-article-body mark {
    background: rgba(74, 144, 226, 0.28);
    color: var(--fg);
    padding: 1px 3px;
    border-radius: 3px;
}

/* ----- Contact CTA ----- */

.help-contact {
    margin-top: 48px;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.help-contact p {
    color: var(--muted);
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.help-contact a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    word-break: break-all;
}

.help-contact a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ----- Back-to-top ----- */

.help-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s, background .2s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.help-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.help-back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ----- Responsive ----- */

@media (max-width: 768px) {
    .help-main { padding: 36px 0 64px; }
    .help-header h1 { font-size: 1.75rem; }
    .help-header p { font-size: 0.98rem; }
    .help-search input[type="search"] {
        font-size: 0.95rem;
        padding: 14px 44px 14px 44px;
    }
    .help-article { padding: 18px 18px; }
    .help-article-title { font-size: 1.05rem; }
    .help-categories { gap: 6px; }
    .help-category-btn { padding: 6px 12px; font-size: 0.82rem; }
    .help-back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}
