/* Dosha-Test – eigene Styles über Bootstrap 5 */

:root {
  --dt-green: #3f6b4a;
  --dt-green-dark: #2f523a;
  --dt-green-deep: #24402e;
  --dt-cream: #f6f2e8;
  --dt-cream-dark: #ece5d4;
  --dt-orange: #e8953e;
  --dt-orange-dark: #c97722;
  --dt-vata: #4f7d9e;
  --dt-pitta: #d2701f;
  --dt-kapha: #5c8a3c;
  --dt-ink: #2b2b26;
}

body {
  background: var(--dt-cream);
  color: var(--dt-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* dezentes Papier-/Blattmuster */
  background-image: radial-gradient(rgba(63, 107, 74, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
}

main { flex: 1 0 auto; }

/* ---------- Kopfzeile ---------- */
.app-header {
  background: linear-gradient(135deg, var(--dt-green-deep), var(--dt-green));
  color: #fff;
  border-bottom: 4px solid var(--dt-orange);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}
.app-brand img { width: 38px; height: 38px; border-radius: 9px; }
.app-brand h1 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.app-brand .sub {
  font-size: 0.7rem;
  opacity: 0.85;
  display: block;
  font-weight: 400;
}

/* Live-Punkte */
.score-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.score-chip {
  font-size: 0.8rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  white-space: nowrap;
}
.score-chip b { font-weight: 700; }
.score-chip .dot { width: 0.55em; height: 0.55em; border-radius: 50%; display: inline-block; margin-right: 0.3em; }
.score-chip .dot.vata { background: #9cc3de; }
.score-chip .dot.pitta { background: #f0a860; }
.score-chip .dot.kapha { background: #bcd690; }

.progress {
  height: 0.55rem;
  background: rgba(255, 255, 255, 0.25);
}
.progress-bar {
  background: var(--dt-orange);
  transition: width 0.25s ease;
}

/* ---------- Startseite ---------- */
.hero-card {
  background: #fff;
  border: 1px solid var(--dt-cream-dark);
  border-top: 5px solid var(--dt-orange);
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(36, 64, 46, 0.10);
}
.type-card {
  border: 1px solid var(--dt-cream-dark);
  border-radius: 0.9rem;
  background: #fffdf8;
  height: 100%;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.type-card:hover { box-shadow: 0 8px 20px rgba(36, 64, 46, 0.14); transform: translateY(-2px); }
.type-card .badge-count { font-size: 0.75rem; color: var(--dt-green-dark); }

/* ---------- Fragebogen (Wizard) ---------- */
.quiz-step-title { color: var(--dt-green-dark); }
.quiz-hint {
  background: #fff7ea;
  border: 1px dashed var(--dt-orange);
  border-radius: 0.65rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.question-card {
  background: #fff;
  border: 1px solid var(--dt-cream-dark);
  border-radius: 0.9rem;
  box-shadow: 0 2px 8px rgba(36, 64, 46, 0.06);
}
.question-card .q-head {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dt-green-dark);
}
.question-card.fehlt {
  border-color: #d06549;
  box-shadow: 0 0 0 3px rgba(208, 101, 73, 0.18);
}

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  text-align: left;
  background: var(--dt-cream);
  border: 2px solid transparent;
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.option:hover:not(:disabled) { background: #efe9da; }
.option .dosha-tag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.05rem;
}
.option.vata .dosha-tag { background: var(--dt-vata); }
.option.pitta .dosha-tag { background: var(--dt-pitta); }
.option.kapha .dosha-tag { background: var(--dt-kapha); }

.option .opt-check {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.option.selected { color: var(--dt-ink); font-weight: 600; }
.option.vata.selected { border-color: var(--dt-vata); background: #e9f1f6; }
.option.pitta.selected { border-color: var(--dt-pitta); background: #f9eee1; }
.option.kapha.selected { border-color: var(--dt-kapha); background: #ecf3e2; }
.option.vata.selected .opt-check { display: flex; background: var(--dt-vata); }
.option.pitta.selected .opt-check { display: flex; background: var(--dt-pitta); }
.option.kapha.selected .opt-check { display: flex; background: var(--dt-kapha); }
.option:disabled { opacity: 0.42; cursor: not-allowed; }

.wizard-nav .btn { min-width: 8.5rem; }

/* ---------- Ergebnis ---------- */
.result-card {
  background: #fff;
  border: 1px solid var(--dt-cream-dark);
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(36, 64, 46, 0.10);
}
.dosha-stat {
  border-radius: 0.9rem;
  padding: 1rem 0.5rem;
  text-align: center;
  color: #fff;
}
.dosha-stat.vata { background: linear-gradient(150deg, #6f9cb8, var(--dt-vata)); }
.dosha-stat.pitta { background: linear-gradient(150deg, #e58f42, var(--dt-pitta)); }
.dosha-stat.kapha { background: linear-gradient(150deg, #7ba457, var(--dt-kapha)); }
.dosha-stat .points { font-size: 2rem; font-weight: 800; line-height: 1; }
.dosha-stat .pct { font-size: 0.9rem; opacity: 0.9; }
.dosha-stat .name { font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem; }

.domi-box {
  background: var(--dt-green-dark);
  color: #fff;
  border-radius: 0.9rem;
  padding: 0.9rem 1.1rem;
}
.domi-box .btn { background: var(--dt-orange); border: none; }
.domi-box .btn:hover { background: var(--dt-orange-dark); }

.bar-row .bar-label { font-weight: 700; }
.bar-track { background: var(--dt-cream-dark); border-radius: 999px; height: 1.1rem; }
.bar-fill { height: 100%; border-radius: 999px; color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.5rem; min-width: 2rem; }
.bar-fill.vata { background: var(--dt-vata); }
.bar-fill.pitta { background: var(--dt-pitta); }
.bar-fill.kapha { background: var(--dt-kapha); }

/* ---------- Vergleich ---------- */
.cmp-table th { color: var(--dt-green-dark); }
.cmp-diff { font-weight: 700; }
.cmp-diff.up { color: #c05a2b; }
.cmp-diff.down { color: #4f7d9e; }
.cmp-note { font-size: 0.9rem; }

/* ---------- Verlauf ---------- */
.history-item {
  background: #fff;
  border: 1px solid var(--dt-cream-dark);
  border-left: 5px solid var(--dt-green);
  border-radius: 0.7rem;
}
.history-item.vikriti { border-left-color: var(--dt-orange); }
.history-item .note { font-size: 0.88rem; color: #5a5a50; font-style: italic; }

/* ---------- Footer & Toast ---------- */
.app-footer {
  color: #6d6d60;
  font-size: 0.8rem;
  padding: 1rem 0 1.5rem;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(1.5rem);
  background: var(--dt-green-deep);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
  max-width: min(92vw, 34rem);
  text-align: center;
  font-size: 0.9rem;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 575.98px) {
  .app-brand h1 { font-size: 1.05rem; }
  .app-brand .sub { display: none; }
  .wizard-nav .btn { min-width: auto; flex: 1 1 auto; }
}
