/* parents.css — das Gatter und der Elternbereich.
   Entstanden aus muster-eltern.css, freigegeben von Marco am 18.09.2026.

   ⚠️ KEINE eigenen Farbwerte. Die Farben stehen in base.css und werden
   von dort geholt — anders als shop.css, das sie ein zweites Mal traegt
   (Aufgabe stil-farben-einmal). Dieser Bereich laeuft nie allein, also
   gibt es keinen Grund fuer eine zweite Wahrheit.

   Bildpfade zeigen nach bilder\; diese Datei liegt in stil\, also ../ */

/* Beide Seiten liegen ueber der Karte — derselbe Platz wie der
   Konto-Schirm (z-index 40), aber formatfuellend statt als Blatt. */
.parents {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #1b3b5a url('../bilder/map-background.jpg') center/cover;
}

/* Derselbe ruhige Schleier wie im Shop — die Insel scheint durch, redet
   aber nicht mit. Hier dichter: das ist ein Bereich fuer Erwachsene, und
   Text schlaegt Landschaft. */
.parents::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(16, 34, 52, .88) 0%,
                              rgba(16, 34, 52, .88) 55%,
                              rgba(12, 26, 42, .93) 100%);
}

.parents > * { position: relative; }

/* ------------------------------------------------------------- Kopfzeile */

/* Kein Titel — wie Shop und Profil (shop-kein-titel). */
.parents-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  flex: none;
}

.parents-head .balance { margin-left: auto; }

/* =========================================================== DAS GATTER */

.gate-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

/* Eine Pergamentrolle, wie Startschild und Pausenschild im Spiel. */
.gate-scroll {
  width: 100%;
  max-width: 330px;
  margin: auto;
  padding: 18px 20px 16px;
  border-radius: 18px;
  background: var(--pergament);
  border: 4px solid var(--holz-rand);
  box-shadow: 0 5px 0 rgba(120, 72, 40, .5), 0 14px 30px rgba(0, 0, 0, .4);
  text-align: center;
}

.gate-icon {
  width: 44px; height: 44px;
  color: var(--holz-dunkel);
  margin-bottom: 6px;
}

.gate-title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 900;
  color: var(--schrift);
}

.gate-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--schrift-lesbar);
}

/* Die Aufgabe ist die Haupthandlung dieser Seite und steht deshalb gross da. */
.gate-task {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 900;
  color: var(--schrift);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.gate-input {
  width: 100%;
  height: 54px;
  border-radius: 12px;
  border: 3px solid var(--holz-rand);
  background: #fffdf5;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  color: var(--schrift);
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
}

/* ⚠️ Eigene Zifferntasten statt der Systemtastatur: die verdeckt auf dem
   Handy die Aufgabe, und man muss sie beim Tippen sehen koennen. */
.gate-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 10px 0 2px;
}

/* 50 Punkte — ueber der Mindestgroesse von 44 fuer alles Antippbare. */
.key {
  min-height: 50px;
  border-radius: 12px;
  border: 3px solid var(--holz-rand);
  background: #fffaf0;
  font-size: 22px;
  font-weight: 900;
  color: var(--schrift);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(120, 72, 40, .4);
}

.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(120, 72, 40, .4); }
.key svg { width: 24px; height: 24px; }

.gate-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--schrift-lesbar);
}

/* Eine falsche Antwort sagt es mit Zeichen UND Text, nie nur mit Farbe. */
.gate-error {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #b23c17;
}

.gate-error svg { width: 18px; height: 18px; flex: none; }

/* ===================================================== DER ELTERNBEREICH */

.parents-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(20px + env(safe-area-inset-bottom));
}

.parents-section {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f4dcb4;
}

/* ---- die Pudding-Pakete ---- */

.pack-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.pack {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  background: var(--pergament);
  border: 3px solid var(--holz-rand);
  box-shadow: 0 4px 0 rgba(120, 72, 40, .45);
  cursor: pointer;
  text-align: left;
}

.pack:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(120, 72, 40, .45); }

.pack-image { width: 46px; height: auto; flex: none; }

.pack-text { flex: 1; min-width: 0; }

.pack-name {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--schrift);
}

.pack-amount {
  display: block;
  font-size: 14px;
  color: var(--schrift-lesbar);
  font-variant-numeric: tabular-nums;
}

/* ⚠️ DER PREIS IN EURO STEHT DIREKT AM PAKET und ist die groesste Zahl der
   Zeile. So verlangen es die EU-Leitlinien 2025 zu Spielwaehrungen, und so
   sehen Eltern ihn ohne Suchen. */
.pack-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--gruen-tief);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* Solange es keinen Bezahlweg gibt (er kommt in Etappe 12 ueber die
   Stores), sagt das Paket das auch, statt ins Leere zu fuehren. */
.pack.soon { opacity: .72; cursor: default; }
.pack.soon .pack-price { color: var(--schrift-lesbar); }

.pack-soon {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--schrift-lesbar);
  letter-spacing: .02em;
}

/* ---- Premium ---- */

.premium {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 22px;
  background: linear-gradient(rgba(255, 252, 240, .97), rgba(253, 243, 219, .97));
  border: 3px solid #c8952f;
  box-shadow: 0 4px 0 rgba(150, 110, 30, .5);
}

.premium-icon { width: 30px; height: 30px; color: #b57f16; flex: none; }

.premium-name {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 900;
  color: var(--schrift);
}

.premium-price {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gruen-tief);
  font-variant-numeric: tabular-nums;
}

.premium-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--schrift);
}

.premium-list li { display: flex; gap: 8px; align-items: flex-start; }
.premium-list svg { width: 16px; height: 16px; color: var(--gruen); flex: none; margin-top: 3px; }

/* ---- die Verwaltungszeilen ---- */

.parents-list { display: flex; flex-direction: column; gap: 8px; }

.parents-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 252, 240, .93);
  border: 3px solid var(--holz-rand);
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--schrift);
}

.parents-row:active { transform: translateY(1px); }

.parents-row > svg:first-child {
  width: 22px; height: 22px;
  color: var(--holz-dunkel);
  flex: none;
}

.parents-row span { flex: 1; overflow-wrap: anywhere; }

.parents-row .arrow { width: 20px; height: 20px; color: var(--schrift-matt); flex: none; }

.parents-foot {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 244, 222, .78);
  text-align: center;
}

/* ---- eine Unterseite (Datenschutz, Kaeufe, Spielzeit, Hilfe, Ueber) ---- */

.parents-sheet {
  padding: 16px;
  border-radius: 16px;
  background: var(--pergament);
  border: 3px solid var(--holz-rand);
  color: var(--schrift);
}

.parents-sheet h2 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 900;
}

.parents-sheet p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--schrift-lesbar);
}

.parents-sheet p:last-child { margin-bottom: 0; }

/* ------------------------------------------- Inhalte zuruecksetzen */

.parents-hint {
  margin: 0;
  font-size: 14px;
  color: var(--schrift-lesbar);
}

.parents-clear {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 2px solid rgba(169, 113, 75, .35);
}

.parents-clear-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--schrift);
}

/* ⚠️ HIER IST DIE WARNFARBE RICHTIG, anders als beim Papierkorb im
   Malbildschirm: Was hier weggeht, ist auf einen Schlag weg, und nichts
   holt es zurueck. Der zweite Druck ist die Sicherheitsfrage. */
.parents-clear-button {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid #8d3212;
  border-radius: 10px;
  background: #fff;
  color: #8d3212;
  cursor: pointer;
}

.parents-clear-button svg { width: 18px; height: 18px; flex: none; }

.parents-clear-button.sicher {
  background: #8d3212;
  color: #fff;
}

.parents-clear-button.fertig {
  border-color: var(--gruen-tief);
  background: #fff;
  color: var(--gruen-tief);
}

.parents-clear-button:disabled { cursor: default; }

/* ------------------------------------------------------------- Fokus */

.parents-clear-button:focus-visible,
.key:focus-visible,
.pack:focus-visible,
.parents-row:focus-visible,
.gate-input:focus-visible {
  outline: 4px solid var(--fokus);
  outline-offset: 3px;
}
