/* Hilfe-Viewer (siehe help.js). Farben aus dem Sobyar-Design-System (app.css). */
.help-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(33, 35, 45, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.help-overlay[hidden] { display: none; }
.help-window {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-card, 10px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  width: min(1180px, 100%); height: min(860px, 100%);
  display: flex; flex-direction: column; overflow: hidden;
}
.help-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--color-border, #e3e4e9);
}
.help-head__title { font-size: 1.1rem; color: var(--color-headline, #21232d); }
.help-search { flex: 1; min-width: 120px; margin: 0; }
.help-head__button { margin: 0; padding: 6px 12px; }
.help-body { flex: 1; display: flex; min-height: 0; }
.help-toc {
  width: 270px; flex: none; overflow-y: auto; padding: 14px 10px 16px 14px;
  border-right: 1px solid var(--color-border, #e3e4e9); background: var(--color-zebra, #fafafb);
}
.help-toc__heading { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted, #6b7180); margin-bottom: 8px; }
.help-toc__item {
  display: block; padding: 6px 10px; margin: 1px 0; border-radius: 6px;
  color: var(--color-text, #2b2e3b); text-decoration: none; font-size: 0.92rem;
}
.help-toc__item:hover { background: var(--color-table-header, #f1f1f4); }
.help-toc__item.is-current { background: var(--color-accent-soft, #fde6e7); color: var(--color-accent-hover, #c8141c); font-weight: 600; }
.help-toc__sub { margin: 2px 0 8px 12px; border-left: 2px solid var(--color-border, #e3e4e9); }
.help-toc__subitem { display: block; padding: 3px 10px; font-size: 0.82rem; color: var(--color-text-muted, #6b7180); text-decoration: none; }
.help-toc__subitem:hover { color: var(--color-accent, #ed1c24); }
.help-toc__foot { margin-top: 14px; font-size: 0.78rem; color: var(--color-text-muted, #6b7180); }
.help-content { flex: 1; overflow-y: auto; padding: 22px 32px 40px; line-height: 1.55; font-size: 0.95rem; }
.help-content h1 { font-size: 1.7rem; color: var(--color-headline, #21232d); margin: 0 0 8px; }
.help-content h2 { font-size: 1.2rem; color: var(--color-accent, #ed1c24); margin: 28px 0 8px; scroll-margin-top: 12px; }
.help-content h3 { font-size: 1rem; color: var(--color-headline, #21232d); margin: 18px 0 6px; }
.help-content p, .help-content li { color: var(--color-text, #2b2e3b); }
.help-content ol, .help-content ul { padding-left: 22px; }
.help-content code { background: var(--color-table-header, #f1f1f4); padding: 1px 5px; border-radius: 4px; font-size: 0.88em; }
.help-content table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 0.9rem; }
.help-content th, .help-content td { border: 1px solid var(--color-border, #e3e4e9); padding: 6px 10px; text-align: left; vertical-align: top; }
.help-content th { background: var(--color-table-header, #f1f1f4); }
.help-content .help-tip, .help-content .help-note, .help-content .help-warn {
  border-radius: 8px; padding: 10px 14px; margin: 12px 0; border: 1px solid var(--color-border, #e3e4e9);
}
.help-content .help-tip { background: #eef6ff; border-color: #cfe3fa; }
.help-content .help-note { background: var(--color-warning-bg, #fff4d6); border-color: #f0dc9c; }
.help-content .help-warn { background: var(--color-error-bg, #fbe7e6); border-color: #f0b9b6; }
.help-content mark { background: #ffe58a; padding: 0 1px; border-radius: 2px; }
.help-content .help-flash { animation: help-flash 1.6s ease; }
@keyframes help-flash { 0% { background: #ffe58a; } 100% { background: transparent; } }
.help-notice { background: var(--color-warning-bg, #fff4d6); border-radius: 6px; padding: 8px 12px; }
.help-result { display: block; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--color-border, #e3e4e9); border-radius: 8px; text-decoration: none; color: inherit; }
.help-result:hover { border-color: var(--color-accent, #ed1c24); background: var(--color-zebra, #fafafb); }
.help-result__snippet { color: var(--color-text-muted, #6b7180); font-size: 0.86rem; margin-top: 3px; }
body.help-open { overflow: hidden; }

@media (max-width: 760px) {
  .help-overlay { padding: 0; }
  .help-window { height: 100%; border-radius: 0; }
  .help-body { flex-direction: column; }
  .help-toc { width: auto; max-height: 34%; border-right: 0; border-bottom: 1px solid var(--color-border, #e3e4e9); }
  .help-content { padding: 16px; }
}

@media print {
  body.help-open > *:not(#helpOverlay) { display: none !important; }
  .help-overlay { position: static; background: none; padding: 0; display: block; }
  .help-window { box-shadow: none; height: auto; width: auto; overflow: visible; }
  .help-head, .help-toc { display: none; }
  .help-content { overflow: visible; padding: 0; }
}
