/* Gestaltung nach https://tcc-teltow.de/ (Kopf, Fuß, Grundschrift); Layout in website.php */

@font-face { font-family: "Open Sans"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/open-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/open-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/open-sans-latin-700-normal.woff2) format("woff2"); }

:root {
  --rot: #a81919;
  --rot-hell: #c00;
  --gold: #ccad5a;
  --gold-dunkel: #8a7230;
  --text: #212121;
  --text-leise: #5a5a5a;
  --linie: #e4e4e4;
  --flaeche: #f6f4ef;
  --hintergrund: #fff;
  --container: 1140px;
  --textbreite: 70ch;
  --abstand: 1rem;
  --tippflaeche: 44px;
  --kopf-hoehe: 5rem;
}

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

html { font-size: 17px; scroll-padding-top: var(--kopf-hoehe); scroll-padding-bottom: 7rem; -webkit-text-size-adjust: 100%; }
@media (min-width: 1024px) { html { font-size: 18px; } }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--hintergrund);
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

main { flex: 1; overflow-wrap: break-word; padding-block-start: 2rem; }
@media (min-width: 768px) { main { padding-block-start: 3rem; } }

h1, h2, h3 { color: var(--rot); margin: 0 0 .6em; font-family: inherit; font-weight: 700; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-weight: 700; }

p, ul, ol { max-width: var(--textbreite); margin: 0 0 1em; }
a { color: var(--rot); text-underline-offset: .15em; }
a:hover, a:focus { color: var(--rot-hell); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); padding-inline: var(--abstand); margin-inline: auto; }

.skip-link { position: absolute; top: -4rem; left: .5rem; z-index: 100; padding: .75rem 1rem; background: var(--hintergrund); color: var(--rot); font-weight: 600; }
.skip-link:focus { top: .5rem; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 40; background: var(--hintergrund); border-bottom: 4px solid var(--gold); }
.kopf-innen { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding-block: .5rem; }
.marke { display: flex; align-items: center; gap: .75rem; min-width: 0; min-height: var(--tippflaeche); color: var(--rot); font-size: .8rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.marke:hover, .marke:focus { text-decoration: none; }
.marke-text small { display: block; color: var(--text-leise); font-size: .75rem; font-weight: 400; line-height: 1.1; }
.marke:hover small, .marke:focus-visible small { color: var(--rot); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.wappen { flex: none; width: 48px; }
.kopf nav ul { max-width: none; margin: 0; padding: 0; list-style: none; }
.kopf nav a { display: flex; align-items: center; min-height: var(--tippflaeche); padding: 0 .75rem; color: var(--text); font-weight: 600; text-decoration: none; }
.kopf nav a:hover, .kopf nav a[aria-current=page] { color: var(--rot); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.nav-mobil summary { display: flex; align-items: center; min-height: var(--tippflaeche); padding: 0 .75rem; color: var(--rot); font-weight: 600; cursor: pointer; }
.nav-mobil[open] ul { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; padding: 0 var(--abstand) .5rem; background: var(--hintergrund); border-bottom: 1px solid var(--linie); box-shadow: 0 6px 10px #00000026; }
.nav-zeile { display: none; }
@media (min-width: 768px) {
  .kopf-innen { column-gap: 1.5rem; }
  .marke { font-size: 1.1rem; }
}
@media (min-width: 900px) {
  .nav-mobil { display: none; }
  .kopf nav .nav-zeile { display: flex; flex-wrap: nowrap; }
}

/* Fuß */
.fuss { margin-top: 3rem; padding-block: 1.5rem 1rem; background: var(--gold); color: var(--text); }
.fuss p { margin: 0 0 .5em; }
.fuss a { color: var(--text); font-weight: 600; }
.copy { margin: 1rem 0 0; font-size: .85rem; }

.visuell-versteckt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.klein { font-size: .85rem; color: var(--text-leise); }

/* Hinweisbox wie auf tcc-teltow.de */
.hinweisbox { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--flaeche); border-left: 4px solid var(--gold); }
.hinweisbox.warnung { border-left-color: var(--rot); }
.hinweisbox p:last-child { margin-bottom: 0; }

/* Breite Tabellen scrollen auf dem Handy in sich */
.tabelle { overflow-x: auto; }

/* Formular (index.php) */
.formular { max-width: 46rem; }
fieldset { min-width: 0; margin: 0 0 1.5rem; padding: 0; border: 0; }
legend { margin-bottom: .5rem; padding: 0; color: var(--text); font-size: 1.1rem; font-weight: 700; }
label { font-weight: 600; }
input[type=text], input[type=email], input[type=tel] {
  width: 100%;
  min-height: var(--tippflaeche);
  padding: .4rem .6rem;
  border: 1px solid #b5b5b5;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
input:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--gold-dunkel); }
input[aria-invalid=true] { border-color: var(--rot); background: #fdf3f3; }
.fehler { margin: .25rem 0 0; color: var(--rot); font-size: .85rem; font-weight: 600; }
.fehler:empty { display: none; }
.optional { color: var(--text-leise); font-weight: 400; font-size: .85rem; }

.felder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem 1rem; }
.feld { grid-column: span 6; }
.feld label { display: block; margin-bottom: .2rem; }
@media (min-width: 600px) {
  .feld-halb { grid-column: span 3; }
  .feld-gross { grid-column: span 4; }
  .feld-klein { grid-column: span 2; }
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tippflaeche);
  padding: .4rem 1.4rem;
  border: 2px solid var(--rot);
  border-radius: 4px;
  background: var(--rot);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.knopf:hover { background: var(--rot-hell); border-color: var(--rot-hell); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf-zurueck { background: #fff; color: var(--rot); }
.knopf-zurueck:hover { background: var(--flaeche); color: var(--rot); }

/* Leiste mit Summe bzw. Zurück/Weiter; in Schritt 1 klebt sie unten (Platz dafür: scroll-padding-bottom bei html) */
.leiste { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.leiste .knopf { flex: 1 1 8rem; }
@media (min-width: 600px) { .leiste .knopf { flex: 0 0 auto; } }
/* Schritt 1: Gesamtpreis über dem Weiter-Knopf */
.leiste-summe { position: sticky; bottom: 0; z-index: 10; flex-direction: column; align-items: stretch; gap: .4rem; margin-inline: calc(-1 * var(--abstand)); padding: .6rem var(--abstand) .75rem; background: var(--hintergrund); border-top: 1px solid var(--linie); }
.leiste-summe .summe { margin: 0; text-align: right; }
.leiste-summe .knopf { flex: none; }
@media (min-width: 600px) { .leiste-summe { align-items: flex-end; } }

/* Schrittanzeige */
.schritte { display: flex; max-width: none; margin: 1.5rem 0 2rem; padding: 0; list-style: none; counter-reset: schritt; }
.schritte li { flex: 1; position: relative; padding-top: 2.4rem; color: var(--text-leise); font-size: .8rem; text-align: center; counter-increment: schritt; }
.schritte li:before { content: counter(schritt); position: absolute; top: 0; left: 50%; z-index: 1; width: 2rem; height: 2rem; margin-left: -1rem; border: 2px solid var(--linie); border-radius: 50%; background: #fff; line-height: 1.75rem; font-weight: 700; }
.schritte li + li:after { content: ""; position: absolute; top: 1rem; right: 50%; width: 100%; border-top: 2px solid var(--linie); }
.schritte li.erledigt:before { border-color: var(--gold); background: var(--gold); color: var(--text); }
.schritte li.erledigt + li:after, .schritte li[aria-current]:after { border-color: var(--gold); }
.schritte li[aria-current] { color: var(--rot); font-weight: 700; }
.schritte li[aria-current]:before { border-color: var(--rot); background: var(--rot); color: #fff; }
.schritt h2:focus { outline: none; }

/* Kartenauswahl (print_kartenauswahl() in lib/bestellung.lib.php) */
.veranstaltungen { max-width: none; margin: 0; padding: 0; list-style: none; }
.veranstaltung { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--linie); }
.veranstaltung:first-child { border-top: 1px solid var(--linie); }
.veranstaltung h3 { margin: 0; color: var(--text); font-size: 1.05rem; }
.veranstaltung p { margin: 0; }
.veranstaltung .verfuegbar { color: var(--text-leise); font-size: .85rem; }
.veranstaltung--aus { opacity: .6; }
.veranstaltung--aus .datumskachel { background: var(--text-leise); }
.veranstaltung .anzahl-bereich, .veranstaltung .fehler { grid-column: 2; }
.anzahl-bereich { width: max-content; }
.veranstaltung .zeilenpreis { margin-top: .2rem; font-weight: 700; text-align: center; }
.veranstaltung .zeilenpreis:empty { display: none; }
@media (min-width: 600px) {
  .veranstaltung { grid-template-columns: auto minmax(0, 1fr) auto; }
  .veranstaltung .anzahl-bereich { grid-column: 3; }
  .veranstaltung .fehler { grid-column: 2 / 4; }
}
.datumskachel { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 4.2rem; padding: .4rem 0; border-radius: 4px; background: var(--rot); color: #fff; line-height: 1.15; text-align: center; }
.datumskachel .wochentag { font-size: .7rem; font-weight: 600; letter-spacing: .05em; }
.datumskachel .tag { font-size: 1.05rem; font-weight: 700; }
.datumskachel .jahr { font-size: .7rem; }
.datumskachel .uhrzeit { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid rgba(255, 255, 255, .5); font-size: .7rem; font-weight: 600; }
.anzahl { display: flex; align-items: center; }
.anzahl input { width: 3.2rem; border-radius: 0; text-align: center; }
.anzahl button { width: var(--tippflaeche); height: var(--tippflaeche); border: 1px solid #b5b5b5; background: var(--flaeche); color: var(--rot); font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer; }
.anzahl button:first-child { border-radius: 4px 0 0 4px; border-right: 0; }
.anzahl button:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
.anzahl button:disabled { color: #b5b5b5; cursor: default; }

/* Auswahlkarten (Zahlungsart) und Haken */
.auswahl { display: flex; gap: .75rem; margin-bottom: .75rem; padding: 1rem; border: 2px solid var(--linie); border-radius: 6px; font-weight: 400; cursor: pointer; }
.auswahl:has(input:checked) { border-color: var(--rot); background: #fdf6f6; }
.auswahl:has(input:disabled) { opacity: .6; cursor: default; }
.auswahl input, .haken input { flex: none; width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; accent-color: var(--rot); }
.auswahl strong { display: block; font-size: 1.05rem; }
.auswahl .gebuehr { display: block; margin-top: .25rem; font-weight: 600; }
.auswahl .grund { display: block; color: var(--rot); font-weight: 600; }
.auswahl .grund:empty { display: none; }
.haken { display: flex; gap: .75rem; margin: 1.5rem 0 1rem; font-weight: 400; cursor: pointer; }

/* Zusammenfassung */
.uebersicht { margin-bottom: 1rem; padding: 1rem 1.25rem; background: var(--flaeche); border-radius: 6px; }
.uebersicht p:last-child { margin-bottom: 0; }
.uebersicht-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.uebersicht h3 { margin: 0; color: var(--text); font-size: 1rem; }
.aendern { min-height: var(--tippflaeche); padding: 0 .25rem; border: 0; background: none; color: var(--rot); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.preise { width: 100%; border-collapse: collapse; }
.preise td { padding: .3rem 0; vertical-align: top; }
.preise td:last-child { padding-left: 1rem; text-align: right; white-space: nowrap; }
.preise .zwischensumme td { border-top: 1px solid var(--linie); }
.preise .gesamt td { border-top: 2px solid var(--text); font-weight: 700; font-size: 1.1rem; }

/* Impressum */
.angaben { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; max-width: var(--textbreite); margin: 0 0 1.5rem; }
.angaben dt { font-weight: 600; }
.angaben dd { margin: 0 0 .75rem; }
@media (min-width: 600px) {
  .angaben { grid-template-columns: auto 1fr; }
  .angaben dd { margin-bottom: .4rem; }
}

/* Fenster für AGB, Datenschutz, Impressum (js/fenster.js) */
.fenster { width: min(100% - 2rem, 50rem); max-height: calc(100% - 2rem); padding: 0 1.5rem 1.5rem; border: 0; border-top: 4px solid var(--gold); border-radius: 6px; color: var(--text); box-shadow: 0 10px 30px #00000040; overscroll-behavior: contain; }
.fenster::backdrop { background: #00000080; }
.fenster-inhalt { padding-top: .5rem; }
.fenster-inhalt h1 { font-size: 1.6rem; padding-right: 2.5rem; }
.fenster-schliessen { position: sticky; top: 0; float: right; z-index: 1; width: var(--tippflaeche); height: var(--tippflaeche); margin: .5rem -1rem 0 0; border: 0; border-radius: 50%; background: var(--hintergrund); color: var(--rot); font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.fenster-schliessen:hover { background: var(--flaeche); }
body:has(.fenster[open]) { overflow: hidden; }
@media (max-width: 599px) {
  .fenster { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; padding-inline: var(--abstand); }
}
