/* =========================================================================
   Leber-Selbsttest — u21checks / EXT:u21checks
   Alle Selektoren unter .u21checks--leberbalancecheck gescoped, damit nichts
   in den Rest der Seite ausleckt (insbesondere die CSS-Custom-Properties).
   Portiert aus dem getesteten Funktionsdummy (leberbalancecheck_dummy.html,
   Stand 06.08.2026, inhaltlich abgeglichen mit "Leber BalanceCheck_final
   freigegeben_30_07_2026").
   ========================================================================= */

.u21checks--leberbalancecheck {
  --u21checks-lbc-primary: #ba2c56;
  --u21checks-lbc-primary-dark: #7d1c38;
  --u21checks-lbc-primary-medium: #f6e3e5;
  --u21checks-lbc-primary-light: #faf1f2;
  --u21checks-lbc-accent: #ffc107;
  --u21checks-lbc-text: #212121;
  --u21checks-lbc-text-soft: #6c6c6c;
  --u21checks-lbc-border: #909090;

  --u21checks-lbc-cat-a: #008f21;
  --u21checks-lbc-cat-b: #ffc107;
  --u21checks-lbc-cat-c: #fd7e14;
  --u21checks-lbc-cat-d: #dc3545;
  --u21checks-lbc-cat-a-fg: #006e4c;
  --u21checks-lbc-cat-b-fg: #8c6a03;
  --u21checks-lbc-cat-c-fg: #a4510d;
  --u21checks-lbc-cat-d-fg: #d13241;
  --u21checks-lbc-radius: 14px;
  --u21checks-lbc-shadow: 0 4px 18px rgba(140, 28, 58, .08);
  font-family: inherit;
  color: var(--u21checks-lbc-text);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.u21checks--leberbalancecheck *,
.u21checks--leberbalancecheck *::before,
.u21checks--leberbalancecheck *::after { box-sizing: border-box; }

.u21checks--leberbalancecheck .u21checks-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.u21checks--leberbalancecheck .card {
  background: #fff; border: 1px solid var(--u21checks-lbc-primary);
  box-shadow: var(--u21checks-lbc-shadow);
  padding: 2rem 1.5rem; margin-bottom: 2rem;
}
.u21checks--leberbalancecheck h1 { font-size: 1.9rem; color: var(--u21checks-lbc-primary-dark); line-height: 1.25; margin-bottom: 4px; }
.u21checks--leberbalancecheck h2 { color: var(--u21checks-lbc-primary); margin-bottom: 14px; }
.u21checks--leberbalancecheck h3 { color: var(--u21checks-lbc-primary-dark); margin: 22px 0 8px; }
.u21checks--leberbalancecheck ul { padding-left: 1.25rem; }
.u21checks--leberbalancecheck li { padding-bottom: .5rem; }
.u21checks--leberbalancecheck li::marker { color: var(--u21checks-lbc-primary-dark); }
.u21checks--leberbalancecheck details.sources cite { font-style: normal; }
.u21checks--leberbalancecheck .muted { color: var(--u21checks-lbc-text-soft); font-size: .92rem; }

.u21checks--leberbalancecheck .btn {
  display: inline-block; border: none; cursor: pointer; font-size: 1.05rem; font-weight: 600;
  background: var(--u21checks-lbc-primary); color: #fff; padding: 14px 30px; border-radius: 999px;
  transition: background .15s, transform .1s; text-decoration: none; text-align: center;
}
.u21checks--leberbalancecheck .btn:hover { background: var(--u21checks-lbc-primary-dark); }
.u21checks--leberbalancecheck .btn:active { transform: scale(.98); }
.u21checks--leberbalancecheck .btn-secondary { background: #fff; color: var(--u21checks-lbc-primary); border: 2px solid var(--u21checks-lbc-primary); }
.u21checks--leberbalancecheck .btn-secondary:hover { background: var(--u21checks-lbc-primary-light); }
.u21checks--leberbalancecheck .btn[disabled] { background: #e9e9e9; cursor: not-allowed; }
.u21checks--leberbalancecheck .btn-link {
  background: none; border: none; color: var(--u21checks-lbc-text-soft); cursor: pointer; text-decoration: none;
  font-size: .95rem; padding: 8px;
}
.u21checks--leberbalancecheck .btn-link:hover {
  color: var(--u21checks-lbc-primary-dark); text-decoration: underline;
}

.u21checks--leberbalancecheck .badge-row { display: flex; gap: 18px; margin: 18px 0; font-weight: 600; color: var(--u21checks-lbc-primary); flex-wrap: wrap; }
.u21checks--leberbalancecheck .badge-row span::before { content: "✓ "; color: var(--u21checks-lbc-cat-a); }

.u21checks--leberbalancecheck .expert {
  display: flex; gap: 16px; align-items: center; margin-top: 24px;
  background: var(--u21checks-lbc-primary-light); border-radius: var(--u21checks-lbc-radius); padding: 16px;
}
.u21checks--leberbalancecheck .expert-photo {
  width: 72px; height: 72px; border-radius: 50%; background: var(--u21checks-lbc-primary-light); flex-shrink: 0;
  object-fit: cover; object-position: center top; display: block;
}
.u21checks--leberbalancecheck details.sources { margin-top: 18px; font-size: .9rem; color: var(--u21checks-lbc-text-soft); }
.u21checks--leberbalancecheck details.sources summary { cursor: pointer; color: var(--u21checks-lbc-primary); font-weight: 600; }
.u21checks--leberbalancecheck details.sources ul { margin-top: 8px; }

/* Quiz */
.u21checks--leberbalancecheck .progress-track { background: var(--u21checks-lbc-primary-light); height: 10px; margin: 6px 0 4px; }
.u21checks--leberbalancecheck .progress-fill { background: var(--bs-primary); height: 100%; transition: width .3s; }
.u21checks--leberbalancecheck .progress-label { font-size: .8rem; color: var(--u21checks-lbc-text-soft); margin-bottom: 4px; }
.u21checks--leberbalancecheck .theme-label {
  font-size: .8rem; font-weight: 700; line-height:1; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
}
.u21checks--leberbalancecheck .q-title { color: var(--bs-primary); margin-bottom: 10px; }
.u21checks--leberbalancecheck .q-hint { background: #fff3cd; border-left: 4px solid var(--u21checks-lbc-accent); padding: 10px 14px; font-size: .92rem; margin-bottom: 16px; }
.u21checks--leberbalancecheck .answers { display: flex; gap: 14px; margin: 22px 0; }
.u21checks--leberbalancecheck .answer-btn {
  flex: 1; font-size: 1.1rem; font-weight: 600; padding: 16px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--u21checks-lbc-border); background: #fff; color: var(--u21checks-lbc-text); transition: all .15s;
}
.u21checks--leberbalancecheck .answer-btn:hover { border-color: var(--u21checks-lbc-primary); }
.u21checks--leberbalancecheck .answer-btn.selected { border-color: var(--u21checks-lbc-primary); background: var(--u21checks-lbc-primary-light); color: var(--u21checks-lbc-primary-dark); }
.u21checks--leberbalancecheck .nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* BMI-Rechner (optionale Hilfe zu Frage 1) */
.u21checks--leberbalancecheck .bmi-box { background: var(--bs-gray-100); padding: 14px; margin-bottom: 16px; font-size: .93rem; }
.u21checks--leberbalancecheck .bmi-box-title { display: block; font-weight: 600; margin: 0 0 2px; }
.u21checks--leberbalancecheck .bmi-inputs { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.u21checks--leberbalancecheck .bmi-field { display: flex; flex-direction: column; gap: 3px; }
.u21checks--leberbalancecheck .bmi-input-label { font-size: .82rem; }
/* Zusaetzlich zur Aufhellung des Hintergrunds (s. Custom-Property oben) den
   gedaempften Text auf JEDEM hellrosa Hintergrund gezielt abgedunkelt statt
   der geerbten --u21checks-lbc-text-soft (#6c6c6c) - gleiche Begruendung wie
   oben, betrifft alle Container mit diesem Hintergrund, nicht nur den BMI-Rechner. */
.u21checks--leberbalancecheck .expert .muted,
.u21checks--leberbalancecheck .bmi-box .muted,
.u21checks--leberbalancecheck .bmi-input-label { color: #515151; }
.u21checks--leberbalancecheck .bmi-inputs input { width: 110px; padding: 8px; border: 1px solid var(--u21checks-lbc-border); border-radius: 8px; font-size: 1rem; }
.u21checks--leberbalancecheck .bmi-result { font-weight: 700; color: var(--u21checks-lbc-primary-dark); }

/* Ergebnis */
.u21checks--leberbalancecheck .result-kicker { font-size: .95rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--u21checks-lbc-text-soft); margin-bottom: 4px; }
.u21checks--leberbalancecheck .result-headline { color: var(--u21checks-lbc-primary-dark); margin-bottom: 18px; }


.u21checks--leberbalancecheck .scale { margin: 26px 0 18px; }
.u21checks--leberbalancecheck .scale-marker { position: relative; height: 22px; }
.u21checks--leberbalancecheck .scale-marker .pin { position: absolute; transform: translateX(-50%); top: 0; font-size: 1.1rem; color: var(--u21checks-lbc-primary-dark); white-space: nowrap; }
.u21checks--leberbalancecheck .scale-bar { display: flex; height: 14px; margin-top: 4px; }
.u21checks--leberbalancecheck .scale-bar div { flex: 1; transition: box-shadow .2s; }
.u21checks--leberbalancecheck .active-seg { box-shadow: 0 0 0 3px var(--u21checks-lbc-primary-dark); z-index: 1; }
.u21checks--leberbalancecheck .seg-a { background: var(--u21checks-lbc-cat-a); }
.u21checks--leberbalancecheck .seg-a.active-seg { box-shadow: 0 0 0 3px var(--u21checks-lbc-cat-a); }
.u21checks--leberbalancecheck .seg-b { background: var(--u21checks-lbc-cat-b); }
.u21checks--leberbalancecheck .seg-b.active-seg { box-shadow: 0 0 0 3px var(--u21checks-lbc-cat-b); }
.u21checks--leberbalancecheck .seg-c { background: var(--u21checks-lbc-cat-c); }
.u21checks--leberbalancecheck .seg-c.active-seg { box-shadow: 0 0 0 3px var(--u21checks-lbc-cat-c); }
.u21checks--leberbalancecheck .seg-d { background: var(--u21checks-lbc-cat-d); }
.u21checks--leberbalancecheck .seg-d.active-seg { box-shadow: 0 0 0 3px var(--u21checks-lbc-cat-d); }


.u21checks--leberbalancecheck .scale-icons { display: flex; margin-top: 12px; text-align: center; }
.u21checks--leberbalancecheck .scale-icons .scale-icon { flex: 1; padding: 0 4px; }
.u21checks--leberbalancecheck .scale-icons .icon {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--u21checks-lbc-border); font-weight: 700; font-size: .85rem; color: var(--u21checks-lbc-text-soft); margin-bottom: 4px;
}
.u21checks--leberbalancecheck .scale-icons .label { display: block; font-size: .76rem; color: var(--u21checks-lbc-text-soft); line-height: 1.25; }
.u21checks--leberbalancecheck .scale-icons .scale-icon.active .icon { border-color: var(--icon-color, var(--u21checks-lbc-primary-dark)); color: var(--icon-color, var(--u21checks-lbc-primary-dark));}
.u21checks--leberbalancecheck .scale-icons .scale-icon.active .label { color: var(--u21checks-lbc-primary-dark); font-weight: 700; }

.u21checks--leberbalancecheck .scale-caption { display: flex; justify-content: space-between; font-size: 11px; color: var(--u21checks-lbc-text-soft); margin-top: 1rem; margin-bottom: 1rem}

.u21checks--leberbalancecheck .todo-box { background: var(--u21checks-lbc-primary-light); border-radius: var(--u21checks-lbc-radius); padding: 20px 22px; margin: 20px 0; }
.u21checks--leberbalancecheck .todo-box h3 { margin-top: 0; margin-bottom: 1rem}
.u21checks--leberbalancecheck .todo-box ul { margin-bottom: 0; }
.u21checks--leberbalancecheck .pdf-box { border: 2px dashed var(--u21checks-lbc-border); border-radius: var(--u21checks-lbc-radius); padding: 20px 22px; margin: 20px 0; text-align: center; }
.u21checks--leberbalancecheck .pdf-box h3 { margin-top: 0; }
.u21checks--leberbalancecheck .pdf-note { font-size: .82rem; color: var(--u21checks-lbc-text-soft); margin-top: 10px; }
.u21checks--leberbalancecheck .routine-link { margin: 16px 0; }

/* Leberroutine-Block (testspezifisch, kein sitework-weites Duplikat - siehe
   Show.html-Kommentar: kein FAQ/allgemeiner Seiten-Footer noetig, aber dieser
   Block gehoert inhaltlich zum Ergebnis des Checks) */
.u21checks--leberbalancecheck .footer2 {
  background: linear-gradient(160deg, #fdeaee, #f1d5dd);
  padding: 32px 28px; margin: 36px 0 20px;
}
.u21checks--leberbalancecheck .footer2 h2 { color: var(--u21checks-lbc-primary-dark); }
.u21checks--leberbalancecheck .footer2 ol { margin: 14px 0 14px 22px; }
.u21checks--leberbalancecheck .footer2 ol li { margin-bottom: 12px; }
.u21checks--leberbalancecheck .divider { border: none; border-top: 1px solid var(--u21checks-lbc-border); margin: 26px 0; }

/* Debug-Panel: nur vorhanden, wenn im Plugin-FlexForm aktiviert (QA/Abnahme).
   bottom: 60px statt 16px - Lesson learned aus dem Verdauungs-Check-Rollout:
   sitework-weite fixe Elemente (u. a. #scrolltop unten rechts) belegen die
   untere Ecke sonst gleichzeitig, siehe Projekt-Notizen 06.08.2026.
   z-index auf den maximal zulaessigen 32-Bit-Wert gesetzt (06.08.2026, Nachbesserung):
   z-index: 50 lag hinter sitework-weiten Elementen wie #cmpboxrecall (z-index: 7999999)
   - als reines QA-Overlay soll das Debug-Panel IMMER ueber allem anderen liegen. */
.u21checks--leberbalancecheck .u21checks-debug-toggle {
  position: fixed; right: 16px; bottom: 60px; background: var(--u21checks-lbc-primary-dark); color: #fff;
  border: none; border-radius: 99px; padding: 10px 16px; font-size: 12.5px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); z-index: 2147483647;
}
.u21checks--leberbalancecheck .u21checks-debug-panel {
  position: fixed; right: 16px; bottom: 110px; width: 320px; max-height: 70vh; overflow: auto;
  background: #0f2a22; color: #dfe9e4; border-radius: 12px; padding: 16px; font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); z-index: 2147483647; display: none;
  font-family: "SF Mono", Consolas, monospace;
}
.u21checks--leberbalancecheck .u21checks-debug-panel.open { display: block; }
.u21checks--leberbalancecheck .u21checks-debug-panel h4 { margin: 0 0 8px; color: #9fd8c8; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.u21checks--leberbalancecheck .u21checks-debug-panel table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.u21checks--leberbalancecheck .u21checks-debug-panel td { padding: 2px 4px; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.u21checks--leberbalancecheck .u21checks-debug-panel .note { color: #e0b06b; }
.u21checks--leberbalancecheck .u21checks-debug-panel .ok { color: #8fd6a8; }
.u21checks--leberbalancecheck .u21checks-debug-panel .log { white-space: pre-wrap; color: #a9c2ba; font-size: 11px; }

/* Fallback-Druckansicht (nur relevant, falls PDF-Button auf window.print()
   zurueckfaellt, z. B. solange die selbst gehostete jsPDF-Datei noch nicht
   im Extension-Ordner liegt - siehe Projekt-Notizen zur PDF-Entscheidung). */
@media print {
  .u21checks--leberbalancecheck .u21checks-debug-toggle,
  .u21checks--leberbalancecheck .u21checks-debug-panel,
  .u21checks--leberbalancecheck .answers,
  .u21checks--leberbalancecheck .nav-row,
  .u21checks--leberbalancecheck .pdf-box .btn,
  .u21checks--leberbalancecheck .progress-track,
  .u21checks--leberbalancecheck .progress-label { display: none !important; }
}

@media (max-width: 520px) {
  .u21checks--leberbalancecheck .card { padding: 24px 18px; }
  .u21checks--leberbalancecheck h1 { font-size: 1.55rem; }
  .u21checks--leberbalancecheck .answers { flex-direction: column; }
  .u21checks--leberbalancecheck .expert { flex-direction: column; text-align: center; }
  .u21checks--leberbalancecheck .u21checks-debug-panel { left: 10px; right: 10px; width: auto; }
}
