/* Help viewer: index, search, article, print. */
.help-page { color: #2c3e50; }
.help-page a:focus-visible, .help-page button:focus-visible, .help-page input:focus-visible, .help-page img:focus-visible {
    outline: 3px solid #3b82f6; outline-offset: 2px;
}
.help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.help-empty { background: #fff; padding: 24px; border-radius: 10px; color: #475569; }

/* Search */
.help-search { margin: 0 0 20px; }
.help-search-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.help-search input { width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.help-results { background: #fff; border-radius: 10px; padding: 8px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 20px; }
.help-results ul { list-style: none; margin: 0; padding: 0; }
.help-results li { padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.help-results li:last-child { border-bottom: 0; }
.help-results a { font-weight: 600; color: #2563eb; text-decoration: none; }
.help-results a:hover { text-decoration: underline; }
.help-results small { display: block; color: #64748b; margin-top: 2px; }
.help-results span { display: block; color: #475569; font-size: 14px; margin-top: 2px; }
.help-no-results { color: #475569; padding: 12px 0; margin: 0; }

/* Categories */
.help-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.help-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.help-card h2 { margin: 0 0 12px; font-size: 18px; }
.help-card h2 i { color: #3b82f6; margin-right: 6px; width: 22px; text-align: center; }
.help-card ul { list-style: none; margin: 0; padding: 0; }
.help-card li { padding: 8px 0; border-top: 1px solid #f1f5f9; }
.help-card li a { display: block; font-weight: 600; color: #2563eb; text-decoration: none; }
.help-card li a:hover { text-decoration: underline; }
.help-card li span { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }

/* Article */
.help-breadcrumb { font-size: 14px; margin: 0 0 14px; color: #64748b; padding-right: 200px; }
.help-breadcrumb a { color: #2563eb; text-decoration: none; }
.help-breadcrumb a:hover { text-decoration: underline; }
.help-article { background: #fff; border-radius: 10px; padding: 28px 32px; box-shadow: 0 2px 10px rgba(0,0,0,.05); max-width: 860px; line-height: 1.65; font-size: 15px; }
.help-article h1 { margin: 0 0 16px; font-size: 26px; color: #2c3e50; }
.help-article h2 { font-size: 20px; margin: 28px 0 10px; }
.help-article h3 { font-size: 17px; margin: 22px 0 8px; }
.help-article p, .help-article ul, .help-article ol { margin: 0 0 14px; }
.help-article li { margin-bottom: 4px; }
.help-article .help-body > p:first-child { font-size: 17px; line-height: 1.6; color: #475569; margin-bottom: 22px; }
.help-article a { color: #2563eb; }
.help-article code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.help-article kbd { background: #f8fafc; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; font-family: inherit; font-size: .9em; white-space: nowrap; }
.help-actions { float: right; margin: 0 0 10px 16px; }
.help-article table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 14px; display: block; overflow-x: auto; }
.help-article th, .help-article td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: top; }
.help-article th { background: #f8fafc; }
.help-article figure { margin: 18px 0; }
.help-article img { max-width: 100%; height: auto; border: 1px solid #e2e8f0; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.08); cursor: zoom-in; }
.help-article figcaption { font-size: 13px; color: #64748b; margin-top: 6px; }
.help-tip, .help-note, .help-warn { margin: 16px 0; padding: 12px 16px; border-left: 4px solid; border-radius: 0 6px 6px 0; }
.help-tip > :last-child, .help-note > :last-child, .help-warn > :last-child { margin-bottom: 0; }
.help-tip { background: #ecfdf5; border-color: #10b981; }
.help-note { background: #eff6ff; border-color: #3b82f6; }
.help-warn { background: #fffbeb; border-color: #f59e0b; }

.help-pager { display: flex; justify-content: space-between; gap: 16px; max-width: 860px; margin: 20px 0; }
.help-pager a { display: block; max-width: 48%; padding: 12px 16px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.05); color: #2563eb; text-decoration: none; font-weight: 600; }
.help-pager a small { display: block; color: #64748b; font-weight: 400; }
.help-pager .help-next { text-align: right; margin-left: auto; }
.help-related { max-width: 860px; }
.help-related h2 { font-size: 17px; }
.help-related a { color: #2563eb; }

/* Lightbox */
.help-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(15,23,42,.85); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.help-lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; }
.help-lightbox button { position: absolute; top: 12px; right: 16px; background: #fff; border: 0; border-radius: 6px; font-size: 18px; padding: 6px 12px; cursor: pointer; }

@media (max-width: 768px) {
    .help-article { padding: 18px 16px; }
    .help-breadcrumb { padding-right: 0; }
    .help-categories { grid-template-columns: 1fr; }
    .help-actions { float: none; margin: 0 0 12px; }
    .help-pager { flex-direction: column; }
    .help-pager a { max-width: none; }
}

@media print {
    .sidebar, .mobile-toggle, .mobile-overlay, .user-info, .header, .help-noprint, .wc-help-link, .help-lightbox { display: none !important; }
    body, .dashboard { background: #fff !important; }
    .main-content { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
    .help-article { box-shadow: none; border-radius: 0; padding: 0; max-width: none; font-size: 11pt; }
    .help-article img { max-width: 100% !important; height: auto !important; box-shadow: none; cursor: default; }
    .help-article figure, .help-article table, .help-tip, .help-note, .help-warn { break-inside: avoid; page-break-inside: avoid; }
    .help-article h1, .help-article h2, .help-article h3 { break-after: avoid; page-break-after: avoid; }
    .help-article a { color: inherit; text-decoration: none; }
    .help-article table { display: table; }
}
