/* ==========================================================================
   XCheckup – gemeinsames Stylesheet (Screens 1–5)
   Design: schwarz/gelb – konsistent mit Landing Page (index.html)
   Version: 2.0 | Juni 2026
   ========================================================================== */

:root {
  --primary:    #ffcc00;         /* Gelb – Hauptakzent */
  --primary-dk: #e6b800;        /* Gelb dunkel – hover */
  --dark:       #222222;        /* Haupttext + Buttons */
  --white:      #ffffff;
  --light:      #f7f7f7;        /* Hintergrundflächen */
  --border:     #e8e8e8;
  --muted:      #666666;
  --text:       #222222;
  --danger:     #DC2626;
  --ok:         #059669;
  --radius:     14px;
  --shadow:     0 12px 40px rgba(0, 0, 0, .10);
  --maxw:       560px;
  --font:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  line-height: 1.55;
}

/* ── Logo / Marke ── */
.brand {
  color: var(--dark);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 22px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.brand span { color: var(--primary); }

/* ── Karte ── */
.card {
  width: 100%;
  max-width: var(--maxw);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 32px 30px;
}
.card.wide { max-width: 680px; }

h1 {
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--dark);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}

/* ── Formularelemente ── */
.field { margin-bottom: 18px; }
label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
label .req { color: var(--dark); font-weight: 800; }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, .20);
}
textarea { min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #aaa; }
.hint-small { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(255, 204, 0, .35);
}
.btn:hover {
  background: var(--primary-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 204, 0, .45);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary {
  background: var(--light);
  color: var(--dark);
  border: 2px solid var(--border);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--border); box-shadow: none; }

/* ── Hinweise / Fehler ── */
.error {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--danger);
  border-radius: 10px;
  font-size: 14px;
}
.notice {
  margin: 0 0 20px;
  padding: 11px 14px;
  background: #fffbe6;
  border: 1px solid #ffe566;
  color: #7a5c00;
  border-radius: 10px;
  font-size: 14px;
}
.foot-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.foot-hint a { color: var(--dark); text-decoration: none; font-weight: 700; }
.foot-hint a:hover { color: var(--primary-dk); text-decoration: underline; }

/* ── Abschnitte im Formular ── */
.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-weight: 800;
  margin: 26px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.row { display: flex; gap: 14px; }
.row > .field { flex: 1; }
.toggle-block { display: none; padding-left: 2px; }
.toggle-block.open { display: block; }

/* ── Inline-Auswahl (Ja/Nein) ── */
.choice { display: flex; gap: 10px; }
.choice label {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin: 0;
  transition: border-color .15s, background .15s;
}
.choice input { display: none; }
.choice input:checked + span { color: var(--dark); font-weight: 800; }
.choice label:has(input:checked) {
  border-color: var(--primary);
  background: #fffbe6;
}

/* ── Checkbox-Zeile (Datenschutz) ── */
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 20px; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--dark); }
.check-row label { font-weight: 500; font-size: 14px; margin: 0; }

/* ── Status / Warten ── */
.center { text-align: center; }
.spinner {
  width: 46px; height: 46px;
  margin: 8px auto 18px;
  border: 4px solid var(--border);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Anleitung (Schritte) ── */
.steps { list-style: none; padding: 0; margin: 16px 0 22px; }
.steps li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.steps li:last-child { border-bottom: none; }
.steps .num {
  flex: 0 0 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  color: var(--dark);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

/* ── Mikrofon-Test ── */
.mic-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 6px 0 20px;
}
.mic-status { font-size: 14px; color: var(--muted); margin-top: 10px; }
audio { width: 100%; margin-top: 12px; }

@media (max-width: 480px) {
  .card { padding: 26px 20px; }
  .row { flex-direction: column; gap: 0; }
}

/* ── Textchat-Simulation (Screen 4) ── */
.chat-card {
  display: flex; flex-direction: column;
  height: min(78vh, 720px);
  padding: 0; overflow: hidden;
}
.chat-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
}
.chat-head .who { font-weight: 800; color: var(--dark); letter-spacing: -0.01em; }
.chat-head .sub { font-size: 12.5px; color: var(--muted); }
.chat-scroll {
  flex: 1; overflow-y: auto;
  padding: 20px 22px;
  background: var(--light);
}
.bubble {
  max-width: 82%;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble.assistant {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.bubble.user {
  background: var(--dark);
  color: var(--white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bubble .meta {
  display: block; font-size: 11px;
  opacity: .6; margin-bottom: 3px; font-weight: 700;
}
.typing { display: none; color: var(--muted); font-size: 13.5px; padding: 2px 4px 10px; }
.typing.show { display: block; }
.typing .dots span {
  display: inline-block; width: 6px; height: 6px; margin-left: 2px;
  background: var(--muted); border-radius: 50%;
  animation: blink 1.2s infinite both;
}
.typing .dots span:nth-child(2) { animation-delay: .2s; }
.typing .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }
.composer {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.composer textarea {
  flex: 1; resize: none;
  min-height: 46px; max-height: 140px;
  border-radius: 12px; padding: 11px 14px;
}
.composer button { width: auto; padding: 0 22px; align-self: stretch; }
.chat-ended {
  text-align: center; color: var(--muted);
  font-size: 14px; padding: 8px 0 4px;
}
