/* =============================================================================
   konto.css — Anmeldung (konto.mirateq.app)
   =============================================================================
   Hausfarben miraTEQ (brand-tokens): Flaechen #2260D2, Akzent #47B5ED, dunkler
   Grund #111827 / #1a2540, warmweiss #faf9f7. Keine feste Farbe in einer Regel,
   nur Variablen; jede Farbe hat ihren Wert hell und dunkel.
   Schrift Inter, selbst gehostet. Thai faellt auf die Systemschrift zurueck
   (Thonburi, Sukhumvit, Leelawadee), Inter hat keine Thai-Zeichen.
   ============================================================================= */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }

:root {
  --grund: #faf9f7;
  --karte: #ffffff;
  --linie: #d6d3cc;
  --schrift: #111827;
  --leise: #4b5563;
  --marke: #2260d2;
  --marke-schrift: #1d4fb0;
  --auf-marke: #ffffff;
  --gut: #146c43;
  --schlecht: #b42318;
  --achtung-grund: #fdf2e9;
  --achtung-linie: #f0b27a;
  --gut-grund: #e8f5ee;
  --fokus: #2260d2;
  --gewaehlt-grund: #eef2ff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #111827;
    --karte: #1a2540;
    --linie: #334155;
    --schrift: #f3f4f6;
    --leise: #cbd5e1;
    --marke: #47b5ed;
    --marke-schrift: #7cc8f2;
    --auf-marke: #0b1220;
    --gut: #5dd39e;
    --schlecht: #ff8a80;
    --achtung-grund: #2a2016;
    --achtung-linie: #a86b2d;
    --gut-grund: #12291f;
    --fokus: #7cc8f2;
    --gewaehlt-grund: #1e3a6e;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 400 1rem/1.6 Inter, system-ui, -apple-system, 'Segoe UI', 'Leelawadee UI', Thonburi, sans-serif;
}
html[lang="th"] body { line-height: 1.75; }
.rahmen { max-width: 44rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
a { color: var(--marke-schrift); }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }

.kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0 1.5rem; }
.marke img { display: block; width: 140px; height: auto; }
.sprachen { display: flex; gap: 0.25rem; font-size: 0.9rem; }
.sprachen a, .sprachen span { padding: 0.35rem 0.6rem; border-radius: 6px; text-decoration: none; }
.sprachen span { background: var(--gewaehlt-grund); font-weight: 600; }

h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.unter { color: var(--leise); margin: 0 0 2rem; }

.formular fieldset { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
.formular legend { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.75rem; padding: 0; }
.feld { margin-bottom: 1rem; }
.feld label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.feld-reihe { display: grid; gap: 0 1rem; }
@media (min-width: 34rem) { .feld-reihe { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  font: inherit;
  color: var(--schrift);
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  min-height: 48px;
}
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--schlecht); border-width: 2px; }
.hilfe { color: var(--leise); font-size: 0.9rem; margin: 0.3rem 0 0; }
.stand { font-size: 0.9rem; margin: 0.3rem 0 0; min-height: 1.4em; }
.stand.gut { color: var(--gut); }
.stand.schlecht { color: var(--schlecht); }
.adresse { display: flex; align-items: stretch; }
.adresse input { border-radius: 8px 0 0 8px; }
.adresse span {
  display: flex; align-items: center; padding: 0 0.8rem; white-space: nowrap;
  border: 1px solid var(--linie); border-left: 0; border-radius: 0 8px 8px 0; background: var(--gewaehlt-grund); color: var(--leise);
}

.wahl { display: grid; gap: 0.75rem; }
.wahl.zwei { grid-template-columns: 1fr; }
@media (min-width: 34rem) { .wahl.zwei, .wahl.tarife { grid-template-columns: 1fr 1fr; } }
.karte {
  position: relative; display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem; border: 1px solid var(--linie); border-radius: 12px; background: var(--karte); cursor: pointer;
}
.karte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.karte:has(input:checked) { border: 2px solid var(--marke); background: var(--gewaehlt-grund); padding: calc(1rem - 1px); }
.karte:has(input:focus-visible) { outline: 3px solid var(--fokus); outline-offset: 2px; }
.karte-titel { font-weight: 600; }
.karte-preis { font-size: 1.2rem; font-weight: 600; }
.karte-text { color: var(--leise); font-size: 0.92rem; }
.marke-klein { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--marke); color: var(--auf-marke); vertical-align: 0.1em; }

.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 999px; padding: 3px; margin-bottom: 0.9rem; background: var(--karte); }
.umschalter label { cursor: pointer; }
.umschalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.umschalter span { display: block; padding: 0.4rem 1rem; border-radius: 999px; }
.umschalter input:checked + span { background: var(--marke); color: var(--auf-marke); font-weight: 600; }
.umschalter input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 2px; }

.haken { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.8rem; cursor: pointer; }
.haken input { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; flex: none; accent-color: var(--marke); }
.ablauf { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: var(--karte); border: 1px solid var(--linie); }
.ablauf p { margin: 0 0 0.4rem; }
.ablauf ol { margin: 0; padding-left: 1.3rem; color: var(--leise); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; width: 100%;
  font: inherit; font-weight: 600; font-size: 1.05rem; text-decoration: none;
  color: var(--auf-marke); background: var(--marke); border: 0; border-radius: 10px; padding: 0.8rem 1.2rem; cursor: pointer;
}
.knopf:disabled { opacity: 0.7; cursor: wait; }
@media (min-width: 34rem) { .knopf { width: auto; } }

.meldung { padding: 0.9rem 1rem; border-radius: 10px; background: var(--karte); border: 1px solid var(--linie); margin: 0 0 1.25rem; }
.meldung.achtung { background: var(--achtung-grund); border-color: var(--achtung-linie); }
.meldung.gut { background: var(--gut-grund); border-color: var(--gut); }
.adresse-gross { font-size: 1.3rem; font-weight: 600; word-break: break-all; }
.kreisel { display: inline-block; width: 1em; height: 1em; border: 2px solid var(--linie); border-top-color: var(--marke); border-radius: 50%; vertical-align: -0.15em; animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kreisel { animation: none; } }

.falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fuss { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--linie); color: var(--leise); font-size: 0.88rem; }
.fuss p { margin: 0 0 0.3rem; }
[hidden] { display: none !important; }
