/* ============================================================
   HILFE-BEREICH (#hilfe) — kontextsensitives Help-Center
   Look & Feel strikt aus den WABEO-Design-Tokens (app-design-
   reference.html). Struktur am Buffer-Help-Center orientiert:
   Bereichs-Kacheln + Kategorien-Menü links, Aufklapp-Felder rechts.
   ============================================================ */

/* Übersichts-Kacheln erben von .dashboard-tiles/.dashboard-tile
   (css/app.css) — help-area-grid dient nur als Hook für spätere
   Feinjustierung, ohne die Dashboard-Kacheln zu beeinflussen. */
.help-area-grid {
  margin-top: 8px;
}

/* ── Zwei-Spalten-Layout der Bereichsseite ── */
.help-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 8px;
}

.help-sidebar {
  position: sticky;
  top: 16px;
}

.help-sidebar-heading {
  font-family: var(--wabeo-font-heading);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--wabeo-text-muted);
  padding: 0 12px 8px;
}

.help-category-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-category-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--wabeo-text);
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: background-color .12s, color .12s, border-color .12s;
}

.help-category-link:hover {
  background: var(--wabeo-bg-neutral);
  color: var(--wabeo-primary);
}

.help-category-link.active {
  background: var(--wabeo-bg-light);
  color: var(--wabeo-secondary);
  border-left-color: var(--wabeo-primary);
}

.help-category-icon {
  display: inline-flex;
  color: var(--wabeo-secondary);
}

.help-category-link.active .help-category-icon {
  color: var(--wabeo-primary);
}

/* ── Hauptspalte ── */
.help-back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--wabeo-text-muted);
}
.help-back-link:hover { color: var(--wabeo-primary); }

.help-area-title {
  font-family: var(--wabeo-font-heading);
  font-weight: 700;
  color: var(--wabeo-secondary);
  margin: 0 0 6px;
}

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

.help-loading,
.help-empty {
  color: var(--wabeo-text-muted);
  font-style: italic;
}

.help-section-title {
  font-family: var(--wabeo-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wabeo-secondary);
  margin: 26px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--wabeo-border-color);
}
.help-section-title:first-child { margin-top: 4px; }

/* ── Aufklapp-Felder (Akkordeon) — native <details> ── */
.help-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-item {
  border: 1px solid var(--wabeo-border-color);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.help-item[open] {
  border-color: var(--wabeo-primary);
  box-shadow: 0 2px 12px rgba(229, 0, 126, .08);
}

.help-item-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--wabeo-font-heading);
  font-weight: 700;
  color: var(--wabeo-secondary);
}
/* Standard-Marker (Dreieck) ausblenden — wir nutzen ein eigenes Chevron. */
.help-item-summary::-webkit-details-marker { display: none; }
.help-item-summary:hover { color: var(--wabeo-primary); }

.help-item-question { flex: 1; }

.help-item-chevron {
  display: inline-flex;
  color: var(--wabeo-text-muted);
  transition: transform .15s ease;
}
.help-item[open] .help-item-chevron {
  transform: rotate(90deg);
  color: var(--wabeo-primary);
}

.help-item-answer {
  padding: 0 18px 16px;
  color: var(--wabeo-text);
  line-height: 1.55;
}
.help-item-answer p { margin: 0 0 10px; }
.help-item-answer p:last-child { margin-bottom: 0; }

/* Aufzählungszeile (aus Markdown-Listenpunkten) */
.help-item-answer .help-answer-li {
  position: relative;
  padding-left: 18px;
  margin: 5px 0;
}
.help-item-answer .help-answer-li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--wabeo-primary);
}

/* ── Mobil: Kategorien über den Inhalt stapeln ── */
@media (max-width: 720px) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .help-sidebar { position: static; }
  .help-category-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .help-category-link {
    border-left: none;
    border: 1px solid var(--wabeo-border-color);
  }
  .help-category-link.active { border-color: var(--wabeo-primary); }
}
