/* Public help center (Views/Help/Index.cshtml). Standalone page: only bootstrap.min.css and
   font-awesome 4.7 load before this file. */

:root {
    --help-bg: #f4f6f8;
    --help-surface: #ffffff;
    --help-text: #2f3a45;
    --help-muted: #6b7785;
    --help-border: #e3e7eb;
    --help-accent: #1ab394;
    --help-accent-soft: #e6f6f2;
    --help-accent-text: #12806a;
    --help-tip-bg: #fff8e6;
    --help-tip-border: #f0d68a;
    --help-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --help-bg: #15191e;
        --help-surface: #1e242b;
        --help-text: #e2e6ea;
        --help-muted: #9aa5b1;
        --help-border: #2e363f;
        --help-accent: #2ccaa8;
        --help-accent-soft: #183a34;
        --help-accent-text: #5fdcbf;
        --help-tip-bg: #2e2816;
        --help-tip-border: #6b5a26;
        --help-shadow: none;
    }
}

body.help-page {
    background: var(--help-bg);
    color: var(--help-text);
    font-size: 15px;
    line-height: 1.6;
}

.help-page a { color: var(--help-accent-text); }
.help-page a:hover, .help-page a:focus { color: var(--help-accent); }

/* ---------- header ---------- */
.help-header {
    background: var(--help-surface);
    border-bottom: 1px solid var(--help-border);
    padding: 24px 0 0;
}

.help-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.help-brand img { max-height: 56px; max-width: 180px; }
.help-brand h1 { margin: 0; font-size: 26px; font-weight: 600; }
.help-brand p { margin: 2px 0 0; color: var(--help-muted); }

.help-brand-actions { margin-left: auto; }
.help-brand-actions .btn {
    background: var(--help-surface);
    border-color: var(--help-border);
    color: var(--help-text);
}
.help-brand-actions .btn:hover, .help-brand-actions .btn:focus {
    background: var(--help-accent-soft);
    color: var(--help-accent-text);
}

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

.help-search .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--help-muted);
}

.help-search input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--help-border);
    border-radius: 22px;
    background: var(--help-bg);
    color: var(--help-text);
    font-size: 15px;
}

.help-search input:focus {
    outline: none;
    border-color: var(--help-accent);
    box-shadow: 0 0 0 3px var(--help-accent-soft);
}

.help-tabs {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.help-tabs button {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--help-muted);
    border-bottom: 3px solid transparent;
}

.help-tabs button:hover { color: var(--help-text); }

.help-tabs { flex-wrap: wrap; }
.help-tabs button { white-space: nowrap; }

.help-tabs-note {
    margin-left: auto;
    align-self: center;
    font-size: 13px;
}

@media (max-width: 600px) {
    .help-tabs-note { margin-left: 0; width: 100%; padding: 0 0 10px 12px; }
}
.help-tabs button[aria-selected="true"] {
    color: var(--help-accent-text);
    border-bottom-color: var(--help-accent);
}

/* ---------- layout ---------- */
.help-body { padding: 28px 0 48px; }

.help-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.help-toc {
    flex: 0 0 240px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.help-toc h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--help-muted);
    margin: 0 0 8px;
}

.help-toc ol { list-style: none; margin: 0; padding: 0; }
.help-toc li a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--help-text);
    font-size: 14px;
    text-decoration: none;
}
.help-toc li a:hover { background: var(--help-accent-soft); }
.help-toc li a.active { background: var(--help-accent-soft); color: var(--help-accent-text); font-weight: 600; }

.help-toc-select {
    display: none;
    margin-bottom: 16px;
    background: var(--help-surface);
    border-color: var(--help-border);
    color: var(--help-text);
}

.help-content { flex: 1 1 auto; min-width: 0; }

.help-intro {
    margin: 0 0 20px;
    color: var(--help-muted);
}

/* ---------- topic cards ---------- */
.help-topic {
    background: var(--help-surface);
    border: 1px solid var(--help-border);
    border-radius: 8px;
    box-shadow: var(--help-shadow);
    padding: 22px 24px;
    margin-bottom: 18px;
    scroll-margin-top: 16px;
}

.help-topic h3 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-topic h3 .fa {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: var(--help-accent-soft);
    color: var(--help-accent-text);
    font-size: 15px;
    flex: 0 0 32px;
}

.help-topic h4 { font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
.help-topic p, .help-topic ul, .help-topic ol { margin-bottom: 10px; }
.help-topic ol, .help-topic ul { padding-left: 22px; }
.help-topic li { margin-bottom: 4px; }

.help-topic .ui {
    font-weight: 600;
    white-space: nowrap;
}

.help-topic code {
    color: var(--help-text);
    background: var(--help-bg);
    border: 1px solid var(--help-border);
    padding: 0 5px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.help-tip {
    background: var(--help-tip-bg);
    border: 1px solid var(--help-tip-border);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 14px;
}

.help-tip .fa { margin-right: 6px; }

.help-go {
    display: inline-block;
    margin: 6px 8px 0 0;
    padding: 5px 14px;
    border: 1px solid var(--help-accent);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.help-go:hover, .help-go:focus { background: var(--help-accent-soft); text-decoration: none; }

.help-table { width: 100%; margin: 8px 0 12px; border-collapse: collapse; font-size: 14px; }
.help-table th, .help-table td { padding: 8px 10px; border-bottom: 1px solid var(--help-border); vertical-align: top; text-align: left; }
.help-table th { color: var(--help-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.help-table-wrap { overflow-x: auto; }

.help-steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.help-steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 40px;
    margin-bottom: 12px;
}
.help-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    background: var(--help-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.help-group-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--help-muted);
    margin: 16px 0 8px;
}

.help-faq details {
    border-bottom: 1px solid var(--help-border);
    padding: 10px 0;
}
.help-faq summary { cursor: pointer; font-weight: 600; }
.help-faq details p { margin: 8px 0 0; }

.help-empty {
    display: none;
    text-align: center;
    color: var(--help-muted);
    padding: 40px 0;
}

.help-footer {
    border-top: 1px solid var(--help-border);
    padding: 20px 0 32px;
    color: var(--help-muted);
    font-size: 14px;
}

mark.help-hit { background: var(--help-tip-bg); color: inherit; padding: 0; }

[hidden] { display: none !important; }

/* ---------- phones / tablets ---------- */
@media (max-width: 900px) {
    .help-layout { display: block; }
    .help-toc { display: none; }
    .help-toc-select { display: block; }
}

@media (max-width: 600px) {
    .help-page .container { padding-left: 16px; padding-right: 16px; }
    .help-brand h1 { font-size: 21px; }
    .help-brand-actions { margin-left: 0; width: 100%; }
    .help-topic { padding: 18px 16px; }
    .help-tabs button { padding: 10px 12px; }
    .help-topic code { white-space: normal; word-break: break-all; }
}
