/* Kundenseite und Verwaltung der Terminbuchung.

   Zuerst fürs Handy, ohne Skript und ohne Build. Farben stehen nur oben,
   darunter arbeitet alles mit den Namen. Richtungen immer logisch
   (inline-start statt left), damit Arabisch ohne zweiten Satz Regeln läuft.

   Palette: khalil-umzuege.de, wie der Umzugsrechner. */

:root {
  --gelb: #ffde00;
  /* Weiß darauf hat gerade 4,5:1 (WCAG AA). Nicht aufhellen. */
  --rot: #e13111;
  --blau: #1b4fa0;
  --blau-dunkel: #123058;
  --papier: #fff6e3;
  --schwarz: #141414;
  --weiss: #fff;
  --grau: #5a5a5a;
  --gut: #1c7a3e;
  --gut-flaeche: #dff5e6;
  --warn-flaeche: #fff3b0;
  --schlecht: #a3200a;
  --schlecht-flaeche: #fbe0da;

  --schrift: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --schrift-titel: 'Bangers', 'Bangers-Fallback', Impact, sans-serif;
  color-scheme: light;
}

:root:lang(ar) {
  /* Bangers und Archivo kennen kein Arabisch. */
  --schrift: 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --schrift-titel: var(--schrift);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--schwarz);
  font: 400 1.0625rem/1.5 var(--schrift);
  overflow-wrap: break-word;
}

a { color: var(--blau); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

.rahmen { width: 100%; max-width: 44rem; margin-inline: auto; padding-inline: 1rem; }
.inhalt { flex: 1; padding-block: 1.25rem 2.5rem; }

/* Kopf, Demo, Fuß */

.demo {
  margin: 0;
  padding: .5rem 1rem;
  background: var(--blau-dunkel);
  color: var(--weiss);
  font-size: .875rem;
  line-height: 1.4;
  text-align: center;
}
.demo span { display: inline-block; }
.demo a { color: var(--gelb); }

.kopf { background: var(--gelb); border-block-end: 3px solid var(--schwarz); }
.kopf-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding-block: .5rem;
}
.marke {
  font: 400 1.75rem/1.2 'Bangers', 'Bangers-Fallback', Impact, sans-serif;
  color: var(--schwarz);
  text-decoration: none;
  padding-block: .25rem;
}
.sprachen { display: flex; gap: .125rem; }
.sprachen a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: .6rem;
  color: var(--schwarz);
  font-size: .9375rem;
}
.sprachen a[aria-current] { font-weight: 700; text-decoration: none; border-block-end: 3px solid var(--schwarz); }

.fuss { background: var(--schwarz); color: var(--weiss); font-size: .875rem; }
.fuss a { color: var(--gelb); }
.fuss-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1rem; }
.fuss-links { display: flex; gap: 1rem; }

/* Schrift */

h1 {
  margin: 0 0 .5rem;
  font: 400 2.25rem/1.15 var(--schrift-titel);
  letter-spacing: .01em;
  text-wrap: balance;
}
:lang(ar) h1 { font-weight: 700; font-size: 1.875rem; line-height: 1.4; letter-spacing: 0; }
h2 { margin: 1.75rem 0 .75rem; font-size: 1.1875rem; line-height: 1.3; }
h3 { margin: 0 0 .25rem; font-size: 1rem; line-height: 1.35; }
h3 small { color: var(--grau); font-weight: 400; }

.vorspann { margin: 0 0 1rem; }
.leise { color: var(--grau); font-size: .9375rem; font-weight: 400; }
.zurueck { display: inline-flex; align-items: center; min-height: 2.75rem; margin-block-end: .25rem; }
.zurueck::before { content: '←'; margin-inline-end: .4rem; }
[dir=rtl] .zurueck::before { content: '→'; }
[dir=rtl] .pfeil { display: inline-block; transform: scaleX(-1); }
.telefon { font-weight: 700; white-space: nowrap; }
.mehrzeilig { white-space: pre-line; }
.wann { display: inline-flex; flex-wrap: wrap; column-gap: .5rem; }
.zeile { display: block; }

/* Kacheln */

.kacheln { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 36rem) {
  .kacheln { grid-template-columns: 1fr 1fr; }
}
.kachel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .375rem;
  height: 100%;
  padding: 1rem;
  background: var(--weiss);
  color: var(--schwarz);
  text-decoration: none;
  border: 3px solid var(--schwarz);
  border-radius: .5rem;
  box-shadow: 4px 4px 0 var(--rot);
}
[dir=rtl] .kachel { box-shadow: -4px 4px 0 var(--rot); }
.kachel:hover { background: var(--warn-flaeche); }
.kachel-name { font-size: 1.25rem; font-weight: 800; line-height: 1.3; }
.kachel-satz { flex: 1; }
.dauer {
  display: inline-block;
  padding: .125rem .6rem;
  background: var(--gelb);
  color: var(--schwarz);
  border-radius: 1rem;
  font-size: .875rem;
  font-weight: 700;
}

/* Woche: oben die sieben Tage, darunter die Zeiten des gewählten. */

.woche { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .375rem; }
@media (min-width: 36rem) {
  .woche { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
/* Unsichtbar, aber mit der Tastatur bedienbar. */
.tag-wahl { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; }
.tag {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  padding: .3rem .125rem;
  background: var(--weiss);
  border: 2px solid var(--schwarz);
  border-radius: .375rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.tag-name { font-weight: 800; }
:lang(ar) .tag-name { font-size: .875rem; }
.tag-datum { font-size: .875rem; }
.tag-zahl { max-width: 100%; font-size: .75rem; color: var(--grau); }
.tag-wahl:checked + .tag { background: var(--gelb); box-shadow: inset 0 0 0 1px var(--schwarz); }
.tag-wahl:checked + .tag .tag-zahl { color: var(--schwarz); }
.tag-wahl:focus-visible + .tag { outline: 3px solid var(--blau); outline-offset: 2px; }
.tag-zu { border-color: #c9c1b1; background: transparent; color: var(--grau); cursor: default; }
.tag-zeiten { order: 2; grid-column: 1 / -1; display: none; }
.tag-wahl:checked + .tag + .tag-zeiten { display: block; }
.tag-titel { margin-block: .875rem .125rem; font-size: 1.125rem; }

.teil { margin-block-start: .625rem; }
.teil h4 { margin: 0 0 .375rem; color: var(--grau); font-size: .875rem; }
.zeiten {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: .5rem;
}
.zeiten-bloecke { grid-template-columns: 1fr; }
.zeit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: .5rem;
  min-height: 2.75rem;
  padding: .375rem;
  border: 2px solid var(--blau);
  border-radius: .375rem;
  background: var(--weiss);
  color: var(--blau);
  font-weight: 700;
  text-decoration: none;
}
.zeit:hover { background: var(--blau); color: var(--weiss); }

.blaettern { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-block-start: 1rem; }
.wunsch-ruf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 2px solid var(--schwarz);
  font-weight: 700;
}

/* Meldungen */

.hinweis, .warnung, .status, .gewaehlt {
  margin: .75rem 0;
  padding: .75rem;
  border-radius: .375rem;
  background: var(--weiss);
  border-inline-start: 5px solid var(--blau);
}
.warnung { background: var(--schlecht-flaeche); border-color: var(--schlecht); }
.status-offen { background: var(--warn-flaeche); border-color: var(--schwarz); }
.status-gut { background: var(--gut-flaeche); border-color: var(--gut); }
.gewaehlt { font-size: 1.1875rem; font-weight: 800; border-color: var(--rot); }
.warnung > :first-child, .status > :first-child { margin-block-start: 0; }
.warnung > :last-child, .status > :last-child { margin-block-end: 0; }

/* Formular */

.formular { display: grid; gap: 1rem; margin-block-start: 1rem; }
.schmal { max-width: 22rem; }
.gruppe {
  min-width: 0;
  margin: 0;
  padding: .75rem;
  border: 2px solid var(--schwarz);
  border-radius: .5rem;
  background: var(--weiss);
}
.gruppe legend { padding-inline: .4rem; font-weight: 800; background: var(--weiss); border-radius: .25rem; }
.gruppe > * { margin-block-end: .875rem; }
.gruppe > p { margin-block-start: 0; }
.gruppe > :last-child { margin-block-end: 0; }
.formular label:not(.wahl) { display: block; }
.beschriftung { display: block; margin-block-end: .25rem; font-weight: 600; }
.feld-fehler { display: block; margin-block-end: .25rem; color: var(--schlecht); font-weight: 700; }

input:not([type=radio], [type=checkbox]), select, textarea {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem;
  border: 2px solid var(--grau);
  border-radius: .375rem;
  background: var(--weiss);
  color: var(--schwarz);
  /* Unter 16px zoomt iOS beim Antippen hinein. */
  font: inherit;
  text-align: start;
}
[aria-invalid=true] { border-color: var(--schlecht) !important; }
[dir=rtl] input[dir=ltr] { text-align: right; }
.tage { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }

.wahlen { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.wahl { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; cursor: pointer; }
.wahl input { width: 1.375rem; height: 1.375rem; flex: none; margin: 0; accent-color: var(--blau); }
.einwilligung { align-items: flex-start; font-size: .9375rem; }

/* Knöpfe */

.knopf, .knopf-zweit, .knopf-klein {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: 2px solid var(--schwarz);
  border-radius: .375rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.knopf { background: var(--rot); color: var(--weiss); }
.knopf-zweit { background: var(--weiss); color: var(--schwarz); }
.knopf-klein { background: var(--weiss); color: var(--schwarz); font-size: .875rem; }
.knopf-gross { width: 100%; min-height: 4rem; font-size: 1.375rem; font-weight: 800; }
.formular > .knopf { width: 100%; min-height: 3.25rem; font-size: 1.1875rem; }
.aktionen { display: grid; justify-items: start; gap: .75rem; margin-block-start: 1.5rem; }
.aktionen > form:first-child { width: 100%; }
.absage > summary { display: list-item; min-height: 2.75rem; padding-block: .6rem; cursor: pointer; color: var(--schlecht); }

/* Angaben und Verwaltung */

.angaben { margin: 1rem 0; background: var(--weiss); border: 2px solid var(--schwarz); border-radius: .5rem; }
.angaben > div { padding: .5rem .75rem; }
.angaben > div + div { border-block-start: 1px solid #ddd5c5; }
.angaben dt { color: var(--grau); font-size: .875rem; }
.angaben dd { margin: 0; font-weight: 600; }

.karte {
  margin-block-end: .75rem;
  padding: .75rem;
  background: var(--weiss);
  border: 2px solid var(--schwarz);
  border-radius: .5rem;
  scroll-margin-top: 1rem;
}
.karte:target { outline: 4px solid var(--blau); }
.karte-offen { border-color: var(--rot); }
.karte p { margin: .25rem 0; }
.karte-zeit { font-weight: 800; }
.karte > .knopf { margin-block-start: .5rem; }
.marke-offen, .marke-gut { display: inline-block; padding: .1rem .5rem; border-radius: 1rem; font-size: .875rem; font-weight: 700; }
.marke-offen { background: var(--warn-flaeche); }
.marke-gut { background: var(--gut-flaeche); }
.nachricht { border-style: dashed; }
.nachricht-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; padding-block-start: .375rem; }
