@charset "UTF-8";
/* ============================================================
 *  AIShow · assets/css/faq.css
 *  pages/faq.php — 常见问题（分类目录 / 搜索过滤 / 折叠问答）
 *  黑白极简，沿用 style.css 的主题变量，随昼夜主题切换
 * ------------------------------------------------------------
 *  注意：.faq / .faq-* 这组类名与 account.css 里的同名类保持一致，
 *        同一页面不会同时加载两者。
 * ============================================================ */

/* ---------- 顶部搜索条 ---------- */
.faq-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.faq-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 200px;
}
.faq-search .ico {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}
.faq-search input {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 34px;
    border: 1px solid var(--border-2);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .14s ease;
}
.faq-search input::placeholder { color: var(--text-3); }
.faq-search input:focus { border-color: var(--border-hover); }
.faq-search .faq-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--text-3);
}
.faq-search .faq-clear:hover { background: var(--bg-hover); color: var(--text); }
.faq-search.has-val .faq-clear { display: flex; }
.faq-count {
    color: var(--text-3);
    font-size: 12px;
    white-space: nowrap;
}

/* ---------- 左侧分类目录 ---------- */
.faq-toc {
    position: sticky;
    top: calc(var(--topbar-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: calc(100vh - var(--topbar-h) - 32px);
    overflow-y: auto;
    padding-right: 4px;
}
.faq-toc::-webkit-scrollbar { width: 5px; }
.faq-toc::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.faq-toc a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text-2);
    font-size: 12.5px;
    line-height: 1.45;
    transition: background-color .14s ease, color .14s ease;
}
.faq-toc a:hover { background: var(--bg-hover); color: var(--text); }
.faq-toc a.on { background: var(--bg-active); color: var(--text); font-weight: 600; }
.faq-toc a .n {
    flex: none;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 5px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-3);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- 分组 ---------- */
.faq-sec { margin-bottom: 30px; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.faq-sec:last-child { margin-bottom: 0; }
.faq-sec-h {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -.01em;
}
.faq-sec-h .tag {
    flex: none;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-3);
}
.faq-sec-h .n { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-weight: 400; }

/* ---------- 折叠问答 ---------- */
.faq { margin: 0; padding: 0; border-top: 0; display: flex; flex-direction: column; }
.faq details {
    border-bottom: 1px solid var(--border);
}
.faq details:last-child { border-bottom: 0; }
.faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 2px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: '+';
    flex: none;
    margin-top: 1px;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-3);
    transition: background-color .14s ease, color .14s ease;
}
.faq details[open] > summary::before { content: '\2212'; background: var(--bg-active); color: var(--text); }
.faq summary:hover { color: var(--text-2); }
.faq summary .hint {
    margin-left: auto;
    flex: none;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-3);
}
.faq .a {
    padding: 0 0 14px 27px;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.85;
}
.faq .a > :first-child { margin-top: 0; }
.faq .a > :last-child { margin-bottom: 0; }
.faq .a p { margin: 8px 0; }
.faq .a ul, .faq .a ol { margin: 8px 0; padding-left: 20px; }
.faq .a li { margin: 4px 0; }
.faq .a table.tbl { margin: 10px 0 4px; }
.faq .a code { font-size: 12px; }
.faq .a .code { margin: 10px 0; }
.faq .a .note-strip { margin-top: 10px; }
.faq .a .lnk { font-weight: 500; }

/* 搜索过滤时的显隐（类名由 pages/faq.php 内的 JS 增删） */
.faq-hit.is-hidden { display: none; }
.faq-sec.is-empty { display: none; }
.faq-toc a.is-empty { display: none; }
.faq-nores {
    display: none;
    padding: 40px 0;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    line-height: 1.9;
}
.faq-nores.on { display: block; }

/* ---------- 无 JS 时的兜底：全部展开 ---------- */
.no-js .faq details > .a { display: block; }

@media (max-width: 900px) {
    .faq-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
        overflow: visible;
        padding: 0 0 12px;
        margin-bottom: 14px;
        border-bottom: 1px solid var(--border);
    }
    .faq-toc a { padding: 6px 9px; font-size: 12px; }
    .faq .a { padding-left: 27px; }
}