/* ============================================================================
   leo-chat.css — Styles für das Leo-Chat-Widget (content/js/leo-chat.js)
   ----------------------------------------------------------------------------
   Stand: 2026-08-09 · Status: NICHT eingebunden, nicht deployt (Staging-Gate)

   Ablage laut data/cto/chatbot/architektur.md §1.1: eigene CSS-Datei statt
   Inline-<style> — cachebar über alle Pilotseiten und CSP-freundlich.
   Wird vom Widget selbst per <link> nachgeladen (Pfad über data-css
   überschreibbar).

   Markenkonsistenz mit dem Quiz (content/quiz/index.html):
     Amber        #D4922A   (Akzent)
     Amber hell   #E8A840
     Dunkelgrund  #0a0c10 / #1f2937-Familie
     Text         #f3f4f6   Muted #8b8fa3
     Radius       20px (--radius) / 14px (--radius-sm)
     Easing       cubic-bezier(0.25,0.46,0.45,0.94)
     Schrift      Satoshi mit System-Fallback (das Widget lädt KEINE Fonts nach)

   Alle Regeln sind unter .leo-* bzw. #leo-chat-root gescoped, damit auf den
   Ratgeberseiten nichts überschrieben wird.
   ========================================================================= */

#leo-chat-root {
  --leo-amber: #D4922A;
  --leo-amber-bright: #E8A840;
  --leo-amber-glow: rgba(212, 146, 42, 0.22);
  --leo-panel: #12161d;
  --leo-panel-2: #1f2937;
  --leo-surface: rgba(255, 255, 255, 0.05);
  --leo-surface-hover: rgba(255, 255, 255, 0.09);
  --leo-border: rgba(255, 255, 255, 0.10);
  --leo-text: #f3f4f6;
  --leo-muted: #9aa0b4;
  --leo-radius: 20px;
  --leo-radius-sm: 14px;
  --leo-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --leo-font: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  position: fixed;
  inset: auto 0 0 auto;
  z-index: 2147482000; /* unter dem Cookie-Banner, über dem Seiteninhalt */
  font-family: var(--leo-font);
  -webkit-font-smoothing: antialiased;
}

#leo-chat-root *,
#leo-chat-root *::before,
#leo-chat-root *::after {
  box-sizing: border-box;
}

/* ═══════════════════════════ Launcher-Button ═══════════════════════════ */

.leo-launcher {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--leo-border);
  border-radius: 999px;
  background: linear-gradient(135deg, #1f2937 0%, #12161d 100%);
  color: var(--leo-text);
  font-family: var(--leo-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 0 var(--leo-amber-glow);
  transition: transform 0.22s var(--leo-ease), box-shadow 0.22s var(--leo-ease);
}

.leo-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 0 6px var(--leo-amber-glow);
}

.leo-launcher:focus-visible {
  outline: 2px solid var(--leo-amber-bright);
  outline-offset: 3px;
}

.leo-launcher__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: block;
}

.leo-launcher__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

/* Pflicht-Kennzeichnung am Button (Recht-Checkliste Punkt 1) */
.leo-launcher__ai {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leo-amber);
}

.leo-launcher[hidden] {
  display: none;
}

/* Einmaliger dezenter Puls nach Verweildauer — respektiert Reduced Motion */
.leo-launcher.is-pulsing {
  animation: leo-pulse 2.4s var(--leo-ease) 2;
}

@keyframes leo-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 0 var(--leo-amber-glow); }
  50%      { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(212, 146, 42, 0); }
}

/* ═══════════════════════════════ Panel ═════════════════════════════════ */

.leo-panel {
  position: fixed;
  z-index: 2147483000; /* über allen Seiten-Stacking-Contexts (Fix 09.08.: Panel lag unter TOC/H1 heller Ratgeberseiten) */
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  width: 384px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 40px);
  border: 1px solid var(--leo-border);
  border-radius: var(--leo-radius);
  background: var(--leo-panel);
  background-image: radial-gradient(ellipse 420px 260px at 15% 0%, rgba(212, 146, 42, 0.10), transparent 62%);
  color: var(--leo-text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s var(--leo-ease), transform 0.22s var(--leo-ease);
}

.leo-panel.is-open {
  opacity: 1;
  transform: none;
}

.leo-panel[hidden] {
  display: none;
}

/* ── Kopfzeile ─────────────────────────────────────────────────────────── */

.leo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--leo-border);
  background: rgba(31, 41, 55, 0.55);
}

.leo-head__avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 146, 42, 0.24), rgba(212, 146, 42, 0.06));
  border: 1px solid rgba(212, 146, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.leo-head__avatar svg { width: 24px; height: 24px; display: block; }

.leo-head__text { flex: 1 1 auto; min-width: 0; }

.leo-head__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  /* Headline harmonisch umbrechen, nicht abschneiden (Design-Regel Andreas) */
  overflow-wrap: break-word;
  text-wrap: balance;
}

.leo-head__name .leo-a { color: var(--leo-amber); }

/* Dauerhaftes KI-Label — Art. 50 AI Act, muss ohne Scrollen sichtbar sein */
.leo-head__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding: 2px 8px;
  border: 1px solid rgba(212, 146, 42, 0.45);
  border-radius: 999px;
  background: rgba(212, 146, 42, 0.12);
  color: var(--leo-amber-bright);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Kontrollen rechtsbündig (Design-Regel Andreas) */
.leo-head__controls {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.leo-iconbtn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--leo-muted);
  cursor: pointer;
  transition: background 0.16s var(--leo-ease), color 0.16s var(--leo-ease);
}

.leo-iconbtn:hover { background: var(--leo-surface-hover); color: var(--leo-text); }
.leo-iconbtn:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 2px; }
.leo-iconbtn svg { width: 20px; height: 20px; display: block; }

/* ── Nachrichtenstrom ──────────────────────────────────────────────────── */

.leo-log {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.leo-log::-webkit-scrollbar { width: 8px; }
.leo-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }

.leo-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: var(--leo-radius-sm);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.leo-msg--bot {
  align-self: flex-start;
  border: 1px solid var(--leo-border);
  border-bottom-left-radius: 5px;
  background: var(--leo-surface);
  color: var(--leo-text);
}

.leo-msg--user {
  align-self: flex-end;
  border: 1px solid rgba(212, 146, 42, 0.45);
  border-bottom-right-radius: 5px;
  background: rgba(212, 146, 42, 0.16);
  color: var(--leo-text);
}

.leo-msg--system {
  align-self: stretch;
  max-width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--leo-muted);
  font-size: 13px;
  text-align: center;
}

.leo-msg a { color: var(--leo-amber-bright); }

/* Tipp-Indikator bis zum ersten Delta */
.leo-typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--leo-border);
  border-radius: var(--leo-radius-sm);
  border-bottom-left-radius: 5px;
  background: var(--leo-surface);
}

.leo-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leo-muted);
  animation: leo-bounce 1.2s infinite var(--leo-ease);
}

.leo-typing span:nth-child(2) { animation-delay: 0.15s; }
.leo-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes leo-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* ── Quick-Replies: 2 pro Zeile (analog Quiz-Direktive) ────────────────── */

.leo-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 4px;
}

.leo-quick--single { grid-template-columns: minmax(0, 1fr); }

.leo-quick__btn {
  padding: 11px 12px;
  border: 1px solid var(--leo-border);
  border-radius: var(--leo-radius-sm);
  background: var(--leo-surface);
  color: var(--leo-text);
  font-family: var(--leo-font);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s var(--leo-ease), border-color 0.16s var(--leo-ease), transform 0.16s var(--leo-ease);
}

.leo-quick__btn:hover {
  background: rgba(212, 146, 42, 0.14);
  border-color: rgba(212, 146, 42, 0.55);
  transform: translateY(-1px);
}

.leo-quick__btn:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 2px; }
.leo-quick__btn[disabled] { opacity: 0.4; cursor: default; transform: none; }

/* ── CTA-Karte (Übergabe ins Quiz) ─────────────────────────────────────── */

.leo-cta {
  border: 1px solid rgba(212, 146, 42, 0.45);
  border-radius: var(--leo-radius-sm);
  background: linear-gradient(160deg, rgba(212, 146, 42, 0.16), rgba(212, 146, 42, 0.04));
  padding: 16px;
}

.leo-cta__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  text-wrap: balance;
}

.leo-cta__text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--leo-muted);
  margin-bottom: 12px;
}

.leo-cta__btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--leo-amber) 0%, rgba(212, 146, 42, 0.72) 100%);
  color: #111;
  font-family: var(--leo-font);
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--leo-ease), filter 0.16s var(--leo-ease);
}

.leo-cta__btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.leo-cta__btn:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 3px; }

.leo-cta__note {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--leo-muted);
  text-align: center;
}

/* ═══════════ v2: konversationale Lead-Erfassung ═══════════════════════
   Kein Formular im Verlauf. Der Chat fragt Name, E-Mail, Telefon und den
   Code nacheinander ab; das normale Eingabefeld schaltet dafür in den
   Capture-Modus. Der Nutzer tippt weiter dort, wo er ohnehin tippt.
   Sichtbar abgesetzt wird nur zweierlei: der Hinweis über dem Feld
   (die Eingabe geht nicht an die KI) und die Consent-Bubble.
   ===================================================================== */

/* ── Capture-Hinweis über dem Eingabefeld ──────────────────────────────── */

.leo-capture {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(212, 146, 42, 0.32);
  border-radius: 11px;
  background: rgba(212, 146, 42, 0.09);
  font-size: 11.5px;
  line-height: 1.4;
  color: #e6d3b4;
}

.leo-capture[hidden] { display: none; }

.leo-capture__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: block;
  color: var(--leo-amber);
}

.leo-capture__icon svg { width: 100%; height: 100%; display: block; }

.leo-capture__text { flex: 1 1 auto; min-width: 0; }

/* Im Capture-Modus bekommt das Eingabefeld einen Amber-Rand, damit klar
   ist, dass hier gerade etwas anderes passiert als Chatten. */
.leo-input.is-capturing {
  border-color: rgba(212, 146, 42, 0.55);
  background: rgba(212, 146, 42, 0.06);
}

/* Maskierte Nutzereingabe im Verlauf: sieht aus wie eine Nutzer-Bubble,
   trägt aber nur den Marker, nie den Wert. */
.leo-msg--masked {
  font-style: normal;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

.leo-msg--masked::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -1px;
  border: 1.6px solid currentColor;
  border-radius: 3px 3px 2px 2px;
  border-top-width: 5px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  opacity: 0.6;
}

/* ── Consent-Bubble ────────────────────────────────────────────────────── */

.leo-consent {
  align-self: stretch;
  max-width: 100%;
  border: 1px solid rgba(212, 146, 42, 0.42);
  border-left-width: 3px;
  border-radius: var(--leo-radius-sm);
  background: rgba(212, 146, 42, 0.08);
  padding: 14px 15px;
}

.leo-consent__lead {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 8px;
  text-wrap: balance;
}

.leo-consent__text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--leo-muted);
}

.leo-consent__text a { color: var(--leo-amber); text-decoration: underline; }

.leo-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.leo-consent__links a { color: var(--leo-amber); text-decoration: underline; font-size: 12px; }

/* Bestätigungsmaske: die erfassten Werte stehen VOR dem Wortlaut und vor
   dem Button (recht-und-messung.md A2.4). Reine DOM-Anzeige, nichts davon
   geht in sessionStorage. */
.leo-summary {
  margin: 10px 0 12px;
  padding: 11px 12px;
  border: 1px solid var(--leo-border);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.24);
}

.leo-summary__title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--leo-muted);
  margin-bottom: 7px;
}

.leo-summary__list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.leo-summary__k { color: var(--leo-muted); }

.leo-summary__v {
  margin: 0;
  color: var(--leo-text);
  font-weight: 600;
  overflow-wrap: anywhere;
  /* Lange Werte (v. a. das model-paraphrasierte "Dein Anliegen") auf drei
     Zeilen kürzen, damit der Absende-Button ohne Scrollen erreichbar bleibt
     (Andreas 16.08.). Der volle Wert geht unverändert an den Lead; kurze Werte
     wie Name/PLZ sind einzeilig und bleiben davon unberührt. Der Einwilligungs-
     Wortlaut darunter bleibt vollständig sichtbar. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Andreas 16.08.: primärer CTA voll breit und dominant, "Lieber nicht" als
   dezenter Link darunter statt gleichwertiger Zweitbutton — der Blick soll auf
   den Absenden-Button fallen, der Ausstieg bleibt fair verfügbar. */
.leo-consent__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 12px;
}

.leo-consent__ok {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--leo-amber) 0%, rgba(212, 146, 42, 0.78) 100%);
  color: #111;
  font-family: var(--leo-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  /* Der kategorie-spezifische CTA ist bewusst zweizeilig; balance verteilt die
     beiden Zeilen möglichst gleichmäßig statt an einer willkürlichen Stelle zu
     brechen (Andreas 16.08.). Ältere Browser ignorieren es und brechen normal. */
  text-wrap: balance;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(212, 146, 42, 0.28);
  transition: transform 0.16s var(--leo-ease), filter 0.16s var(--leo-ease);
}

.leo-consent__ok:hover { transform: translateY(-1px); filter: brightness(1.06); }
.leo-consent__ok:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 3px; }

.leo-consent__no {
  align-self: center;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--leo-muted);
  font-family: var(--leo-font);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.leo-consent__no:hover { color: var(--leo-text); }
.leo-consent__no:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 2px; }

.leo-consent.is-done .leo-consent__actions { display: none; }

.leo-consent__state {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  color: var(--leo-amber);
  font-weight: 600;
}

.leo-consent.is-done .leo-consent__state { display: block; }

/* ── Erfolgs-Bubble nach lead_ok ───────────────────────────────────────── */

.leo-ok {
  align-self: flex-start;
  max-width: 92%;
  border: 1px solid rgba(212, 146, 42, 0.45);
  border-radius: var(--leo-radius-sm);
  border-bottom-left-radius: 5px;
  background: linear-gradient(160deg, rgba(212, 146, 42, 0.17), rgba(212, 146, 42, 0.04));
  padding: 15px;
}

.leo-ok__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.leo-ok__icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(212, 146, 42, 0.5);
  background: rgba(212, 146, 42, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.leo-ok__icon svg { width: 19px; height: 19px; display: block; }

.leo-ok__title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

.leo-ok__text { font-size: 14px; line-height: 1.5; color: #e3e6ee; }

.leo-ok__next {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.leo-ok__next li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
  color: #d5d8e2;
}

.leo-ok__num {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--leo-amber);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leo-ok__ref {
  margin-top: 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--leo-amber);
  letter-spacing: 0.02em;
}

.leo-ok__note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--leo-muted);
}

/* ── Eingabe + Pflicht-Fußzeile ────────────────────────────────────────── */

.leo-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--leo-border);
  background: rgba(31, 41, 55, 0.45);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

.leo-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.leo-input {
  flex: 1 1 auto;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--leo-border);
  border-radius: var(--leo-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  color: var(--leo-text);
  font-family: var(--leo-font);
  font-size: 16px; /* 16px verhindert den iOS-Zoom beim Fokus */
  line-height: 1.4;
  resize: none;
}

.leo-input::placeholder { color: var(--leo-muted); }
.leo-input:focus { outline: none; border-color: rgba(212, 146, 42, 0.6); }

.leo-send {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--leo-radius-sm);
  background: var(--leo-amber);
  color: #111;
  cursor: pointer;
  transition: filter 0.16s var(--leo-ease), opacity 0.16s var(--leo-ease);
}

.leo-send:hover { filter: brightness(1.08); }
.leo-send:focus-visible { outline: 2px solid var(--leo-amber-bright); outline-offset: 2px; }
.leo-send[disabled] { opacity: 0.35; cursor: default; }
.leo-send svg { width: 22px; height: 22px; display: block; }

.leo-stop {
  display: block;
  margin: 0 auto 8px;
  padding: 6px 14px;
  border: 1px solid var(--leo-border);
  border-radius: 999px;
  background: transparent;
  color: var(--leo-muted);
  font-family: var(--leo-font);
  font-size: 12.5px;
  cursor: pointer;
}

.leo-stop:hover { color: var(--leo-text); background: var(--leo-surface-hover); }
.leo-stop[hidden] { display: none; }

/* Datenschutz-Kurzhinweis — Pflicht, dauerhaft sichtbar, auch mobil */
.leo-legal {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--leo-muted);
  text-align: left;
}

.leo-legal a { color: var(--leo-amber); text-decoration: underline; }

/* ═══════════════════════ Mobile: volle Breite < 520px ══════════════════ */

@media (max-width: 519.98px) {
  .leo-panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: none;
    border-radius: 0;
    transform: translateY(18px);
  }

  .leo-panel.is-open { transform: none; }

  .leo-msg { max-width: 92%; font-size: 15px; }

  .leo-launcher {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    height: 52px;
    padding: 0 16px 0 12px;
    font-size: 14px;
  }
}

/* Zwischenbereich: Panel bleibt Karte, aber schmaler */
@media (min-width: 520px) and (max-width: 767.98px) {
  .leo-panel { width: calc(100vw - 32px); height: calc(100vh - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  #leo-chat-root *,
  #leo-chat-root *::before,
  #leo-chat-root *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (forced-colors: active) {
  .leo-panel, .leo-launcher, .leo-quick__btn { border: 1px solid CanvasText; }
}

/* ── Teaser-Bubble (proaktive Ansprache, 09.08.2026) ─────────────────── */
.leo-teaser {
  position: fixed;
  z-index: 2147483000;
  right: 20px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  max-width: min(320px, calc(100vw - 40px));
  background: #12161d;
  color: #f3f4f6;
  border: 1px solid rgba(212, 146, 42, 0.45);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 34px 12px 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-family: inherit;
}
.leo-teaser.is-in { opacity: 1; transform: none; }
.leo-teaser-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #D4922A;
  margin-bottom: 4px;
  font-weight: 600;
}
.leo-teaser-text { font-size: 14px; line-height: 1.45; }
.leo-teaser-x {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
  color: #9aa0b4;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.leo-teaser-x:hover { color: #f3f4f6; }
@media (prefers-reduced-motion: reduce) {
  .leo-teaser { transition: none; }
}
