/* Chat mit Billie. Eigene Datei, damit billie.css (Design: Codex) unberührt
   bleibt. Alle Farben kommen aus den Tokens — nichts hart kodiert. */

.ch-liste {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Der Strom füllt den Bildschirm: Desktop ist Arbeitsmaschine. */
  height: clamp(320px, 58vh, 760px);
  overflow-y: auto;
  padding: 4px 6px 4px 0;
  scrollbar-width: thin;
}

.ch-m { display: flex; flex-direction: column; gap: 5px; max-width: 78ch; }
.ch-m.ch-user { align-self: flex-end; align-items: flex-end; text-align: left; }

.ch-wer {
  font-size: var(--step--1, .8rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ch-t {
  background: var(--bg-elevated, var(--bg-hover));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ch-user .ch-t {
  background: var(--accent-ice-dim);
  border-color: var(--border-active);
}
.ch-t p { margin: 0 0 8px; }
.ch-t p:last-child { margin-bottom: 0; }
.ch-t code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
}
.ch-ul { margin: 0 0 8px; padding-left: 1.15em; }
.ch-ul:last-child { margin-bottom: 0; }
.ch-ul li { margin: 2px 0; }
/* Zahlen in Aufzählungen sollen untereinander stehen. */
.ch-t { font-variant-numeric: tabular-nums; }

/* Werkzeugspur: woher die Zahl kommt. */
.ch-spur { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-wz {
  font-size: var(--step--1, .8rem);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--text-secondary);
  background: transparent;
}
.ch-wz.ok    { color: var(--accent-ice); border-color: rgba(94, 214, 255, .3); background: var(--accent-ice-dim); }
.ch-wz.fehl  { color: var(--danger, #f87171); border-color: rgba(248, 113, 113, .35); }
/* Schreibende Werkzeuge fallen auf — hier verändert Billie etwas. */
.ch-wz.schreibt { border-style: dashed; color: var(--warning, #fbbf24); }

.ch-denkt { color: var(--text-muted); font-style: italic; }
.ch-fehler { color: var(--danger, #f87171); margin: 0; }

.ch-zeile { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.ch-feld {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 180px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated, var(--bg-hover));
  color: var(--text-primary);
  font: inherit;
  line-height: 1.5;
}
.ch-feld:focus-visible {
  outline: 2px solid var(--accent-ice);
  outline-offset: 1px;
  border-color: var(--border-active);
}
.ch-zeile .btn { height: 44px; white-space: nowrap; }

@media (max-width: 720px) {
  .ch-m { max-width: 100%; }
  .ch-liste { height: 62vh; }
}
