/* ZPP-Gesprächstrainer: eigenes, ruhiges Design. Akzentfarbe #1f6f8b. */

:root {
  --akzent: #1f6f8b;
  --akzent-dunkel: #16505f;
  --flaeche: #f5f7f8;
  --karte: #ffffff;
  --rand: #dfe5e7;
  --text: #1c2b2f;
  --text-schwach: #5b6b6f;
  --gut: #2e9e6b;
  --schlecht: #c94a4a;
  --warnung: #e8a626;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--flaeche);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 8px;
}

p {
  margin: 0 0 8px;
}

ul,
ol {
  margin: 0 0 8px;
  padding-left: 20px;
}

a {
  color: var(--akzent);
}

/* Kopfzeile */

.kopf {
  background: var(--karte);
  border-bottom: 1px solid var(--rand);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.kopf-titel {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}

.tab-btn.aktiv {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}

main#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 64px;
}

/* Grundbausteine */

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.btn {
  border: 1px solid var(--rand);
  background: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--akzent-dunkel);
}

.btn-klein {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.btn-icon {
  padding: 8px 12px;
}

.btn-gefahr {
  border-color: var(--schlecht);
  color: var(--schlecht);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-schwach);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.hinweis {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f0f0;
  font-size: 0.9rem;
}

.hinweis-fehler {
  background: #fdecec;
  color: var(--schlecht);
}

.chip {
  display: inline-block;
  background: #eef4f6;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  margin: 2px 4px 2px 0;
  border: none;
  cursor: default;
}

button.chip {
  cursor: pointer;
}

.chip-liste {
  display: flex;
  flex-wrap: wrap;
}

.chip-fehler {
  background: #fdecec;
  color: var(--schlecht);
}

.fuss {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 32px;
  text-align: right;
}

/* Login */

.login-karte {
  max-width: 360px;
  margin: 48px auto;
}

.login-formular {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-formular input {
  padding: 10px;
  border: 1px solid var(--rand);
  border-radius: 8px;
}

/* Kennzahlen */

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kennzahl-karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kennzahl-wert {
  font-size: 1.4rem;
  font-weight: 600;
}

.kennzahl-label {
  font-size: 0.8rem;
  color: var(--text-schwach);
}

@media (min-width: 900px) {
  .kennzahlen {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Start: Auswahl */

.auswahl-gitter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .auswahl-gitter {
    grid-template-columns: repeat(2, 1fr);
  }
}

.auswahl-feld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-schwach);
}

.auswahl-feld select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--rand);
  color: var(--text);
  font-size: 0.95rem;
}

.schritte-chips {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.merksatz {
  font-weight: 600;
}

/* Gespräch */

.ansicht-spiel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .ansicht-spiel {
    flex-direction: row;
    align-items: flex-start;
  }

  .briefing-aside {
    width: 320px;
    flex: 0 0 320px;
  }

  .chat-bereich {
    flex: 1;
    min-width: 0;
  }
}

.briefing-karte summary {
  cursor: pointer;
  font-weight: 600;
  margin: -4px -4px 8px;
  padding: 4px;
}

.briefing-liste {
  margin: 0;
}

.briefing-liste dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-schwach);
  margin-top: 10px;
}

.briefing-liste dd {
  margin: 2px 0 0;
}

.typ-punkt {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.ungeprueft {
  color: var(--warnung);
  font-size: 0.85rem;
}

.jetzt-kasten {
  background: #eef4f6;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  font-weight: 600;
}

.chat-bereich {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 36px;
}

.chat-kopf-info {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  flex: 1;
  min-width: 120px;
}

.statustext {
  color: var(--text-schwach);
  font-size: 0.8rem;
}

.vorlesen-schalter {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-schwach);
}

.chat-liste {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 12px;
  min-height: 220px;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-liste-statisch {
  max-height: none;
}

.chat-blase {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.chat-blase-therapeut {
  align-self: flex-end;
  background: var(--akzent);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-blase-patient {
  align-self: flex-start;
  background: #eef1f2;
  color: var(--text);
  border-bottom-left-radius: 2px;
}

.chat-tippt {
  font-style: italic;
  color: var(--text-schwach);
}

.status-leiste {
  background: #fff7e6;
  border: 1px solid var(--warnung);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.eingabe-bereich {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eingabe-bereich textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--rand);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.zeichen-zaehler {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-schwach);
  text-align: right;
}

.eingabe-zeile {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.datenschutzhinweis {
  font-size: 0.78rem;
  color: var(--text-schwach);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 47, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.overlay-inhalt {
  background: var(--karte);
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  text-align: center;
}

/* Ergebnis */

.ergebnis-kopf {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.score-ring circle {
  fill: none;
  stroke-width: 10;
}

.score-ring-hintergrund {
  stroke: var(--rand);
}

.score-ring-vordergrund {
  stroke: var(--akzent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.score-ring-text {
  font-size: 1.6rem;
  font-weight: 700;
  fill: var(--text);
}

.ergebnis-badge {
  flex: 1;
  min-width: 200px;
}

.ergebnis-badge-gut strong {
  color: var(--gut);
}

.ergebnis-badge-schlecht strong {
  color: var(--schlecht);
}

.ergebnis-badge-neutral strong {
  color: var(--text-schwach);
}

.kurzfazit {
  font-size: 1.05rem;
  font-weight: 500;
}

.phasen-zeile {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.balken {
  background: var(--flaeche);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}

.balken-fuellung {
  background: var(--akzent);
  height: 100%;
}

.schritte-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schritte-liste li {
  padding: 4px 0;
  border-bottom: 1px solid var(--rand);
  font-size: 0.9rem;
}

.schritte-liste li:last-child {
  border-bottom: none;
}

.schritt-symbol {
  display: inline-block;
  width: 20px;
  text-align: center;
  font-weight: 700;
}

.schritt-gut {
  color: var(--gut);
}

.schritt-teilweise {
  color: var(--warnung);
}

.schritt-schlecht {
  color: var(--schlecht);
}

.schritt-neutral {
  color: var(--text-schwach);
}

.drei-spalten {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .drei-spalten {
    grid-template-columns: repeat(3, 1fr);
  }
}

.kasten-hervorgehoben {
  background: #eef4f6;
  border-left: 4px solid var(--akzent);
}

.zitat {
  font-size: 1.05rem;
  font-style: italic;
}

details.karte summary {
  cursor: pointer;
  font-weight: 600;
}

.ergebnis-aktionen {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Theorie */

.ansicht-theorie {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.theorie-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.theorie-nav-btn {
  white-space: nowrap;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
}

.theorie-nav-btn.aktiv {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
}

@media (min-width: 900px) {
  .ansicht-theorie {
    flex-direction: row;
    align-items: flex-start;
  }

  .theorie-nav {
    width: 240px;
    flex: 0 0 240px;
  }

  .theorie-nav ul {
    flex-direction: column;
    overflow-x: visible;
  }

  .theorie-inhalt,
  .frage-box {
    flex: 1;
  }
}

.block-gut {
  border-left: 3px solid var(--gut);
  padding-left: 10px;
}

.block-schlecht {
  border-left: 3px solid var(--schlecht);
  padding-left: 10px;
}

.block-merk {
  background: #fff7e6;
  border-radius: 8px;
  padding: 10px;
}

.dialog {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.theorie-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.frage-chips {
  margin-bottom: 8px;
}

.frage-box textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--rand);
  font-family: inherit;
}

.frage-antwort {
  margin-top: 10px;
  background: #eef4f6;
  border-radius: 8px;
  padding: 10px;
}

.beispielsatz {
  font-style: italic;
}

.frage-meta {
  font-size: 0.8rem;
  color: var(--text-schwach);
}

/* Methodik */

.typ-karten {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 700px) {
  .typ-karten {
    grid-template-columns: repeat(2, 1fr);
  }
}

.typ-kachel {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.tue-lass {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Verlauf */

.score-linie {
  width: 100%;
  height: auto;
}

.score-achse {
  stroke: var(--rand);
  stroke-width: 1;
}

.score-polyline {
  stroke: var(--akzent);
  stroke-width: 2;
}

.score-punkt {
  fill: var(--akzent);
}

.verlauf-liste {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.verlauf-eintrag {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rand);
  padding: 8px 0;
  text-align: left;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
}

.verlauf-eintrag:hover {
  color: var(--akzent);
}
