@charset "UTF-8";
/* ==========================================================================
   „Fragt ROLLA“ · Chat-Komponente (Launcher + Panel)
   Figma: Chat Launcher 904:2562, Chat Widget 904:2545 (Seite Rolla-rollout)
   Regeln: docs/CHATBOT_REGELWERK.md
   Braucht assets/tokens.css. Alle Klassen mit Präfix .rc-, damit nichts mit
   Seiten-CSS kollidiert. Einbinden auf /check, /checkout, /start, /vorschau.
   ========================================================================== */

.rc-root {
  --rc-w: 360px;            /* Figma 320; breiter wegen Top-3-Antworten und Kopfzeile laut Regelwerk */
  --rc-edge: 32px;          /* Abstand zum Rand (Figma) */
  --rc-ink: var(--color-ink, #171717);
  --rc-ink-2: var(--color-ink-2, #2d2d2d);
  --rc-magenta: var(--color-magenta, #ff00ff);
  --rc-muted: var(--color-text-subtle, #8c8c8c);
  --rc-soft: var(--color-text-on-dark-muted, #d2d2d2);
  font-family: var(--font-body, "Work Sans", Arial, sans-serif);
  color: #fff;
}
.rc-root *, .rc-root *::before, .rc-root *::after { box-sizing: border-box; }

.rc-i {
  width: var(--icon-m, 20px); height: var(--icon-m, 20px);
  flex: none; display: block;
  fill: none; stroke-width: var(--icon-stroke, 1.7px);
}
.rc-i--s { width: 16px; height: 16px; }
.rc-i--solid { stroke: none; }

/* ---------- Launcher (Pille 163 × 56, Ink, Magenta-Kreis 36) ---------- */
.rc-launcher {
  position: fixed; right: var(--rc-edge); bottom: var(--rc-edge); z-index: 900;
  display: inline-flex; align-items: center; gap: 12px;
  height: var(--launcher-h, 56px);
  padding: 10px 20px 10px 10px;
  border: 0; border-radius: var(--radius-pill, 99px);
  background: var(--rc-ink); color: #fff;
  font: 600 14px/1 var(--font-body, "Work Sans", Arial, sans-serif);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-launcher, 0 8px 24px rgba(0,0,0,.25)), inset 0 0 0 1px rgba(255, 255, 255, .14); /* Kante auch auf dunklem Footer sichtbar */
  cursor: pointer;
  transition: transform var(--dur-hover, 200ms) var(--ease-out-strong, ease),
              opacity var(--dur-s, 250ms) var(--ease-out, ease);
}
.rc-launcher:hover { transform: translateY(-2px); }
.rc-launcher:focus-visible { outline: 2px solid var(--rc-magenta); outline-offset: 3px; }
.rc-launcher__icon {
  position: relative;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rc-magenta); color: var(--rc-ink);
}
.rc-launcher__icon .rc-i { width: 20px; height: 20px; }
/* Ruhiger Puls am Kreis, einmal beim Laden, damit der Chat bemerkt wird */
.rc-launcher__icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 0, 255, .55);
  animation: rc-pulse 1.8s var(--ease-out, ease) .8s 2;
}
@keyframes rc-pulse { to { box-shadow: 0 0 0 14px rgba(255, 0, 255, 0); } }
.rc-root.is-open .rc-launcher { opacity: 0; pointer-events: none; transform: scale(.9); }

/* ---------- Panel ---------- */
.rc-panel {
  position: fixed; right: var(--rc-edge); bottom: var(--rc-edge); z-index: 901;
  width: var(--rc-w);
  max-height: min(680px, calc(100vh - 2 * var(--rc-edge)));
  max-height: min(680px, calc(100dvh - 2 * var(--rc-edge)));
  display: flex; flex-direction: column;
  background: var(--rc-ink); color: #fff;
  border-radius: var(--radius-l, 24px);
  box-shadow: var(--shadow-chat, 0 12px 32px rgba(0,0,0,.25));
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0; transform: translate3d(0, 12px, 0) scale(.96);
  visibility: hidden;
  transition: opacity var(--dur-s, 250ms) var(--ease-out, ease),
              transform var(--dur-m, 400ms) var(--ease-out-strong, ease),
              visibility 0s linear var(--dur-m, 400ms);
}
.rc-root.is-open .rc-panel {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity var(--dur-s, 250ms) var(--ease-out, ease),
              transform var(--dur-m, 400ms) var(--ease-out-strong, ease),
              visibility 0s;
}

/* Kopf: Icon · Fragt ROLLA · KI · Mensch fragen · Schließen */
.rc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 12px 12px 16px;
}
.rc-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--rc-magenta); color: var(--rc-ink);
}
.rc-avatar .rc-i { width: 18px; height: 18px; }
.rc-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.rc-title b {
  font: 600 16px/1.2 var(--font-display, "DM Sans", Arial, sans-serif);
  letter-spacing: -0.02em;
}
.rc-title span { font-size: 11px; line-height: 1.3; color: var(--rc-muted); }
.rc-human {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px 0 9px;
  border: 1px solid var(--rc-ink-2); border-radius: var(--radius-pill, 99px);
  background: transparent; color: #fff;
  font: 500 12px/1 var(--font-body, "Work Sans", Arial, sans-serif);
  cursor: pointer; white-space: nowrap;
  transition: border-color var(--dur-hover, 200ms), background var(--dur-hover, 200ms);
}
.rc-human .rc-i { width: 14px; height: 14px; }
.rc-human:hover { border-color: #fff; }
.rc-close {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--rc-soft); cursor: pointer;
  transition: background var(--dur-hover, 200ms), color var(--dur-hover, 200ms);
}
.rc-close:hover { background: var(--rc-ink-2); color: #fff; }
.rc-close .rc-i { width: 14px; height: 14px; }
.rc-human:focus-visible, .rc-close:focus-visible, .rc-opt:focus-visible, .rc-chip:focus-visible,
.rc-send:focus-visible, .rc-btn:focus-visible { outline: 2px solid var(--rc-magenta); outline-offset: 2px; }

/* Limit-Leiste */
.rc-limits {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--rc-ink-2);
}
.rc-limit {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill, 99px);
  background: var(--rc-ink-2); color: var(--rc-soft);
  font-size: 11px; line-height: 1; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.rc-limit b { color: #fff; font-weight: 600; }
.rc-limit .rc-i { width: 12px; height: 12px; color: var(--rc-magenta); }
.rc-limit.is-done .rc-i { color: var(--rc-soft); }

/* Verlauf */
.rc-log {
  flex: 1 1 auto; min-height: 120px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: var(--rc-ink-2) transparent;
}
.rc-msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: var(--radius-s, 16px);
  font-size: 14px; line-height: 1.5;
  animation: rc-in var(--dur-m, 400ms) var(--ease-out-strong, ease) both;
}
.rc-msg p { margin: 0; }
.rc-msg p + p, .rc-msg p + ol, .rc-msg ol + p { margin-top: 8px; }
.rc-msg ol { margin: 0; padding-left: 0; list-style: none; counter-reset: rc; display: grid; gap: 8px; }
.rc-msg ol > li { counter-increment: rc; display: grid; grid-template-columns: 18px 1fr; gap: 2px 6px; }
.rc-msg ol > li::before { content: counter(rc) "."; font-weight: 600; color: var(--rc-magenta); }
.rc-msg li b { font-weight: 600; }
.rc-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.rc-msg--bot { align-self: flex-start; background: var(--rc-ink-2); color: #fff; }
.rc-msg--me { align-self: flex-end; background: #fff; color: var(--rc-ink); }
.rc-msg--note {
  align-self: stretch; max-width: none;
  background: transparent; border: 1px dashed var(--rc-ink-2);
  color: var(--rc-soft); font-size: 12px;
}
.rc-small { display: block; margin-top: 8px; font-size: 12px; color: var(--rc-soft); }
@keyframes rc-in { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }

/* Tippen */
.rc-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.rc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--rc-soft); animation: rc-dot 1s infinite ease-in-out; }
.rc-typing i:nth-child(2) { animation-delay: .15s; }
.rc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rc-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* Startoptionen (drei geführte Einstiege) */
.rc-opts { display: grid; gap: 8px; }
.rc-opt {
  display: grid; grid-template-columns: 32px 1fr 16px; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px 10px 10px;
  border: 1px solid var(--rc-ink-2); border-radius: var(--radius-s, 16px);
  background: transparent; color: #fff; text-align: left;
  font: 500 14px/1.3 var(--font-body, "Work Sans", Arial, sans-serif);
  cursor: pointer;
  animation: rc-in var(--dur-m, 400ms) var(--ease-out-strong, ease) both;
  transition: border-color var(--dur-hover, 200ms), background var(--dur-hover, 200ms);
}
.rc-opt:nth-child(2) { animation-delay: 60ms; }
.rc-opt:nth-child(3) { animation-delay: 120ms; }
.rc-opt small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--rc-muted); }
.rc-opt__ic {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--rc-ink-2); color: var(--rc-magenta);
}
.rc-opt > .rc-i { width: 14px; height: 14px; color: var(--rc-muted); transition: transform var(--dur-s, 250ms) var(--ease-out-strong, ease); }
.rc-opt:hover { border-color: #fff; }
.rc-opt:hover > .rc-i { transform: translateX(3px); color: #fff; }

/* Folge-Chips (höchstens zwei) */
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chip {
  height: 34px; padding: 0 14px;
  border: 1px solid var(--rc-ink-2); border-radius: var(--radius-pill, 99px);
  background: transparent; color: #fff;
  font: 500 13px/1 var(--font-body, "Work Sans", Arial, sans-serif);
  cursor: pointer;
  animation: rc-in var(--dur-m, 400ms) var(--ease-out-strong, ease) both;
  transition: border-color var(--dur-hover, 200ms), background var(--dur-hover, 200ms), color var(--dur-hover, 200ms);
}
.rc-chip:hover { border-color: #fff; }
.rc-chip--primary { background: var(--rc-magenta); border-color: var(--rc-magenta); color: var(--rc-ink); }
.rc-chip--primary:hover { border-color: #fff; }

/* Änderungsliste */
.rc-list {
  align-self: stretch;
  border-radius: var(--radius-s, 16px);
  background: var(--rc-ink-2);
  padding: 14px;
  font-size: 13px; line-height: 1.45;
  animation: rc-in var(--dur-m, 400ms) var(--ease-out-strong, ease) both;
}
.rc-list__h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.rc-list__h b { font: 600 14px/1.2 var(--font-display, "DM Sans", Arial, sans-serif); letter-spacing: -0.02em; }
.rc-list__h span { font-size: 11px; color: var(--rc-muted); }
.rc-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: rcl; }
.rc-list li { counter-increment: rcl; display: grid; grid-template-columns: 22px 1fr; gap: 4px 8px; }
.rc-list li::before {
  content: counter(rcl); width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rc-ink); font-size: 11px; font-weight: 600;
}
.rc-list li > div { min-width: 0; }
.rc-list li p { margin: 0 0 6px; overflow-wrap: anywhere; }
.rc-list li em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--rc-soft); }
.rc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px;
  border-radius: var(--radius-pill, 99px);
  font-size: 11px; font-weight: 600; line-height: 1;
}
.rc-tag--in { background: var(--color-magenta-tint, #ffd1ff); color: var(--rc-ink); }
.rc-tag--out { border: 1px solid #5e5e5e; color: var(--rc-soft); }

/* Seite dazubuchen: Überblick vor dem Bestätigen */
.rc-buy dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.rc-buy dt { color: var(--rc-soft); }
.rc-buy dd { margin: 0; overflow-wrap: anywhere; }

/* Formular „Mensch fragen“ */
.rc-form-card {
  align-self: stretch;
  display: grid; gap: 10px;
  padding: 14px;
  border-radius: var(--radius-s, 16px);
  background: var(--rc-ink-2);
  font-size: 13px;
  animation: rc-in var(--dur-m, 400ms) var(--ease-out-strong, ease) both;
}
.rc-form-card b { font: 600 14px/1.2 var(--font-display, "DM Sans", Arial, sans-serif); letter-spacing: -0.02em; }
.rc-form-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 500; color: var(--rc-soft); }
.rc-form-card textarea, .rc-form-card input[type="email"] {
  width: 100%; border: 1.5px solid transparent; border-radius: 12px;
  background: #fff; color: var(--rc-ink);
  font: 400 14px/1.45 var(--font-body, "Work Sans", Arial, sans-serif);
  padding: 10px 12px; resize: vertical;
}
.rc-form-card input[type="email"] { height: 44px; border-radius: var(--radius-pill, 99px); padding: 0 16px; }
.rc-form-card textarea:focus, .rc-form-card input:focus { outline: none; border-color: var(--rc-magenta); }
.rc-check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; cursor: pointer; }
.rc-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--rc-magenta); flex: none; }
.rc-btn {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 4px 4px 4px 16px;
  border: 0; border-radius: var(--radius-pill, 99px);
  background: var(--rc-magenta); color: var(--rc-ink);
  font: 500 14px/1 var(--font-body, "Work Sans", Arial, sans-serif);
  cursor: pointer;
}
.rc-btn span {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rc-ink); color: var(--rc-magenta);
}
.rc-btn span .rc-i { width: 14px; height: 14px; transition: transform var(--dur-s, 250ms) var(--ease-out-strong, ease); }
.rc-btn:hover span .rc-i { transform: rotate(-45deg); }

/* Eingabe: weiße Pille 44 + Magenta-Sendekreis 32 */
.rc-form { padding: 0 16px 8px; }
.rc-input {
  display: flex; align-items: flex-end; gap: 8px;
  min-height: 44px; padding: 6px 6px 6px 16px;
  border-radius: 22px; background: #fff;
  border: 2px solid transparent;
  transition: border-color var(--dur-hover, 200ms);
}
.rc-input:focus-within { border-color: var(--rc-magenta); }
.rc-input textarea {
  flex: 1; min-width: 0; max-height: 110px;
  border: 0; outline: none; resize: none; background: transparent;
  padding: 6px 0; color: var(--rc-ink);
  font: 400 14px/1.4 var(--font-body, "Work Sans", Arial, sans-serif);
}
.rc-input textarea::placeholder { color: var(--rc-muted); }
.rc-send {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 0; background: var(--rc-magenta); color: var(--rc-ink); cursor: pointer;
  transition: transform var(--dur-hover, 200ms) var(--ease-out-strong, ease), opacity var(--dur-hover, 200ms);
}
.rc-send .rc-i { width: 16px; height: 16px; }
.rc-send:hover { transform: scale(1.06); }
.rc-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.rc-meta {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 4px 0;
  font-size: 11px; color: var(--rc-muted); font-variant-numeric: tabular-nums;
}
.rc-meta .is-warn { color: var(--rc-magenta); }

/* Feste Fußzeile */
.rc-foot {
  margin: 0; padding: 10px 16px 14px;
  border-top: 1px solid var(--rc-ink-2);
  font-size: 11px; line-height: 1.45; color: var(--rc-muted);
}
.rc-foot a { color: var(--rc-soft); text-decoration: underline; text-underline-offset: 2px; }

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

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .rc-root { --rc-edge: 16px; }
  .rc-launcher { height: 52px; padding: 8px 18px 8px 8px; }
  .rc-panel {
    left: 12px; right: 12px; bottom: 12px; width: auto;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .rc-human span { display: none; }
  .rc-hint { visibility: hidden; }
  .rc-human { width: 32px; padding: 0; justify-content: center; }
  .rc-human .rc-i { width: 16px; height: 16px; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rc-launcher__icon::after, .rc-typing i { animation: none; }
  .rc-msg, .rc-opt, .rc-chip, .rc-list, .rc-form-card { animation: none; }
  .rc-panel { transition: none; transform: none; }
}
html[data-motion="off"] .rc-launcher__icon::after,
html[data-motion="off"] .rc-typing i { animation: none; }
