/* Bewusst ohne Transitions/Animationen – soll sich wie die FahrApp anfühlen. */

:root {
  --green-dark: #1b7a3a;
  --mint: #d7f0dc;
  --ink: #111;
  --muted: #555;
  --hint: #9a9a9a;
  --solution-grey: #a3aba5;
  --box-border: #2a2a2a;
  --wrong-bg: #f7c3c6;
  --wrong-icon: #e1122e;
  --right-bg: #b6e3bf;
  --right-icon: #1b7a3a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--mint);
}

body {
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.app[hidden] {
  display: none;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Kopfzeile */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.counter {
  font-weight: 400;
}

.nav {
  justify-self: end;
  display: flex;
  gap: 14px;
}

.nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Frage */

.question {
  padding: 14px 14px 0;
}

.meta {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--muted);
}

.text {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
}

/* Antwortoptionen: Spalte 1 = eigene Antwort (nur nach Auswertung), Spalte 2 = Kästchen, Spalte 3 = Text */

.options {
  display: grid;
  grid-template-columns: 0 auto 1fr;
  column-gap: 0;
  row-gap: 12px;
  align-items: start;
}

.options.evaluated {
  grid-template-columns: 50px auto 1fr;
  column-gap: 0;
}

.result-column {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: stretch;
  margin: -6px 0;
  display: none;
}

.options.evaluated .result-column {
  display: block;
}

.options.wrong .result-column {
  background: var(--wrong-bg);
}

.options.right .result-column {
  background: var(--right-bg);
}

.option {
  display: contents;
  cursor: pointer;
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.given,
.box {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.given svg,
.box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* Lösung links in grau (nur nach Auswertung) */
.given {
  grid-column: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  visibility: hidden;
  background: #fff;
  border: 2px solid #b9bfbb;
}

.options.evaluated .given {
  visibility: visible;
}

.given.solution {
  background: var(--solution-grey);
  border-color: var(--solution-grey);
}

.given svg {
  stroke: #fff;
  visibility: hidden;
}

.options.evaluated .given.solution svg {
  visibility: visible;
}

/* eigenes Kästchen: angeklickt = schwarz mit weißem Haken */
.box {
  grid-column: 2;
  background: #fff;
  border: 2px solid var(--box-border);
  margin-left: 4px;
}

.options.evaluated .box {
  margin-left: 18px;
}

.box svg {
  stroke: #fff;
  visibility: hidden;
}

.option input:checked + .box {
  background: var(--ink);
  border-color: var(--ink);
}

.option input:checked + .box svg {
  visibility: visible;
}

.option input:focus-visible + .box {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.options.evaluated .option {
  cursor: default;
}

.label {
  grid-column: 3;
  padding: 3px 0 0 16px;
  font-size: 15px;
  line-height: 1.35;
}

/* Hinweis unter der Lösung */

.hint {
  padding: 10px 0 18px;
}

.hint-arrow {
  display: block;
  width: 0;
  height: 0;
  margin-left: 19px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 7px solid var(--hint);
}

.hint p {
  margin: 6px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--hint);
}

/* Ergebnisbanner */

.feedback {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding-right: 14px;
}

.feedback[hidden],
.hint[hidden] {
  display: none;
}

.feedback.wrong {
  background: var(--wrong-bg);
}

.feedback.right {
  background: var(--right-bg);
}

.feedback-icon {
  flex: none;
  width: 54px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback.wrong .feedback-icon {
  background: var(--wrong-icon);
}

.feedback.right .feedback-icon {
  background: var(--right-icon);
}

.feedback-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 3.6;
  stroke-linecap: square;
}

.feedback-text {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

/* Weiter-Button */

.actions {
  display: flex;
  justify-content: flex-end;
  padding: 18px 14px 24px;
}

.next {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--green-dark);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 32px;
  cursor: pointer;
}

.next:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
