/* MAC Buchung – mobile-first.
   Branding zentral hier anpassen: */
:root {
  --ink: #16161a;        /* Text */
  --bg: #f7f6f3;         /* Hintergrund */
  --card: #ffffff;
  --accent: #c8102e;     /* MAC-Rot, ggf. an Branding anpassen */
  --accent-ink: #ffffff;
  --line: #e2e0da;
  --muted: #6b6b6b;
  --ok: #1d7a3a;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px; line-height: 1.55;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }

header.site {
  background: var(--ink); color: #fff; padding: 14px 16px;
}
header.site .wrap { padding: 0; display: flex; align-items: baseline; gap: 10px; }
header.site .logo { font-weight: 800; letter-spacing: .04em; text-decoration: none; color: #fff; }
header.site .logo span { color: var(--accent); }
header.site .sub { font-size: 13px; color: #bdbdbd; }

h1 { font-size: 26px; line-height: 1.2; margin: 20px 0 6px; }
h2 { font-size: 20px; margin: 24px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }

a { color: var(--accent); }

/* Einstiegskacheln */
.tiles { display: grid; gap: 12px; margin-top: 20px; }
.tile {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
}
.tile strong { display: block; font-size: 19px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 15px; }

/* Klassenliste */
.klasse { border-left: 4px solid var(--accent); }
.klasse .alter { font-size: 14px; color: var(--muted); }

/* Termin-Karten: Wochentag + Datum + Uhrzeit als untrennbare Einheit.
   Das ist das Kernstück gegen Fehlbuchungen. */
.termine { display: grid; gap: 10px; margin-top: 16px; }
.tkarte {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; text-decoration: none; color: var(--ink);
  min-height: 64px; /* große Tap-Fläche */
}
.tkarte .datum {
  flex: 0 0 64px; text-align: center; background: var(--ink); color: #fff;
  border-radius: 8px; padding: 6px 4px; line-height: 1.15;
}
.tkarte .datum .wtag { display: block; font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.tkarte .datum .tag { display: block; font-size: 22px; font-weight: 800; }
.tkarte .datum .monat { display: block; font-size: 11px; color: #cfcfcf; }
.tkarte .zeit { font-size: 19px; font-weight: 700; }
.tkarte .frei { margin-left: auto; font-size: 13px; color: var(--ok); white-space: nowrap; }
.tkarte:active { border-color: var(--accent); }

.hinweis-leer {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--muted);
}

/* Formular */
form.buchung { display: grid; gap: 14px; margin-top: 16px; }
label { font-weight: 600; font-size: 15px; display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=time], select, textarea {
  width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, .tkarte:focus, button:focus, a:focus {
  outline: 3px solid rgba(200, 16, 46, .35); outline-offset: 1px;
}
.feld-fehler { color: var(--accent); font-size: 14px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 2px; }

button.primary {
  background: var(--accent); color: var(--accent-ink); border: 0;
  font-size: 18px; font-weight: 700; padding: 14px 18px; border-radius: 8px;
  width: 100%; cursor: pointer;
}
button.secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  font-size: 16px; padding: 10px 14px; border-radius: 8px; cursor: pointer;
}

/* Zusammenfassung des gewählten Termins über dem Formular */
.gewaehlt {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 14px;
}

/* Erfolg */
.erfolg { border-left: 4px solid var(--ok); background: var(--card);
  border-radius: var(--radius); padding: 16px; }

/* Honeypot unsichtbar */
.hp { position: absolute; left: -9999px; height: 1px; overflow: hidden; }

/* Admin-Tabellen */
table.liste { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
table.liste th, table.liste td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
table.liste th { background: #efede8; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.voll { color: var(--accent); font-weight: 700; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px;
  background: #eee; }
.badge.cancelled, .badge.no_show { background: #fbe3e7; color: var(--accent); }
.badge.attended, .badge.confirmed, .badge.paid { background: #e2f2e7; color: var(--ok); }
.meldung { background: #e2f2e7; border: 1px solid #bfe3ca; padding: 10px 14px;
  border-radius: 8px; margin: 12px 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 560px) {
  .tiles { grid-template-columns: 1fr 1fr; }
}
