@import url("vendor/fonts/fonts.css");

:root {
  --nacht: #14306b;
  --court: #1f4f9c;
  --court-hell: #2d64bd;
  --ball: #e3ea3b;
  --glas: #eef2f8;
  --linie: #d5dcea;
  --text-leise: #56658a;
  --rot: #b8392a;
  --gruen: #2f7d4f;
  --radius: 10px;
  --breit: 640px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 16px/1.5 Barlow, system-ui, sans-serif; color: var(--nacht);
  background: var(--glas); min-height: 100vh;
}
h1, h2, h3, .zahl { font-family: "Barlow Semi Condensed", Barlow, sans-serif; font-weight: 700; line-height: 1.05; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
a { color: var(--court); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; }

/* Kopf: blaues Band mit der Grundlinie eines Courts */
.kopf { background: var(--court); color: #fff; padding: 18px 20px 22px; position: relative; }
.kopf::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 9px; height: 2px; background: rgba(255,255,255,.55); }
.kopf .innen { max-width: var(--breit); margin: 0 auto; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kopf .ort { font: 600 .95rem "Barlow Semi Condensed", sans-serif; opacity: .85; }
.kopf a { color: #fff; font-size: .95rem; }
.kopf h1 { font-size: 1.7rem; }

main { max-width: var(--breit); margin: 0 auto; padding: 18px 16px 120px; }
.leise { color: var(--text-leise); }
.klein { font-size: .875rem; }
.hinweis { background: #fff; border-left: 4px solid var(--ball); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 14px 0; }
.fehler { border-left-color: var(--rot); }

/* Tage */
.tage { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.tage::-webkit-scrollbar { display: none; }
.tag {
  flex: 0 0 auto; width: 58px; padding: 8px 0; border: 1.5px solid var(--linie); border-radius: var(--radius);
  background: #fff; text-align: center; cursor: pointer; scroll-snap-align: start;
}
.tag b { display: block; font: 700 1.35rem "Barlow Semi Condensed", sans-serif; }
.tag span { font-size: .78rem; color: var(--text-leise); }
.tag[aria-pressed="true"] { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.tag[aria-pressed="true"] span { color: rgba(255,255,255,.75); }

/* Dauer */
.dauer { display: inline-flex; background: #fff; border: 1.5px solid var(--linie); border-radius: 999px; padding: 3px; margin: 6px 0 18px; }
.dauer button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-weight: 500; }
.dauer button[aria-pressed="true"] { background: var(--court); color: #fff; }

/* Court mit Slots */
.court { background: #fff; border-radius: var(--radius); padding: 14px 14px 16px; margin-bottom: 14px; }
.court h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.court h2 small { font: 500 .8rem Barlow, sans-serif; color: var(--text-leise); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  border: 0; border-radius: 8px; padding: 8px 4px 7px; cursor: pointer; text-align: center;
  background: var(--glas); color: var(--nacht);
}
.slot b { display: block; font: 700 1.15rem "Barlow Semi Condensed", sans-serif; }
.slot span { font-size: .78rem; color: var(--text-leise); }
.slot.haupt { background: #e2e9f6; }
.slot:hover { background: #d8e2f3; }
.slot[aria-pressed="true"] { background: var(--ball); }
.slot[aria-pressed="true"] span { color: var(--nacht); }
.leer { color: var(--text-leise); font-size: .9rem; }

/* Buchungsleiste unten */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--nacht); color: #fff;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .22s ease;
  box-shadow: 0 -6px 24px rgba(20,48,107,.25);
}
.leiste.offen { transform: none; }
.leiste .innen { max-width: var(--breit); margin: 0 auto; }
.leiste .was { font: 600 1.05rem "Barlow Semi Condensed", sans-serif; margin-bottom: 10px; }
.leiste label { display: block; font-size: .85rem; opacity: .85; margin: 8px 0 3px; }
.leiste input[type=email], .leiste input[type=text] {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 0; background: #fff; color: var(--nacht);
}
.reihe { display: flex; gap: 10px; }
.reihe > * { flex: 1; }
.schalter { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: .95rem; cursor: pointer; }
.schalter input { width: 20px; height: 20px; accent-color: var(--ball); }

.knopf {
  display: block; width: 100%; border: 0; border-radius: var(--radius); padding: 14px 16px; margin-top: 12px;
  background: var(--ball); color: var(--nacht); font: 700 1.1rem "Barlow Semi Condensed", sans-serif; cursor: pointer; text-align: center; text-decoration: none;
}
.knopf:disabled { opacity: .6; cursor: progress; }
.knopf.zweit { background: #fff; color: var(--court); border: 1.5px solid var(--linie); }
.knopf.leise-knopf { background: none; color: var(--text-leise); text-decoration: underline; font: 500 .95rem Barlow, sans-serif; }

/* Zugangspass: ein Padel-Court von oben */
.pass {
  position: relative; background: var(--court); color: #fff; border-radius: 14px; padding: 22px 22px 20px; overflow: hidden;
  margin: 4px 0 18px;
}
.pass::before { /* Spielfeldlinien: Außenlinie, Aufschlaglinien, Mittellinie */
  content: ""; position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.5); border-radius: 6px; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) center 30% / calc(100% - 0px) 2px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) center 70% / 100% 2px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) center / 2px 40% no-repeat;
}
.pass .netz { position: absolute; left: 10px; right: 10px; top: 50%; height: 3px; background: var(--ball); opacity: .9; }
.pass > *:not(.netz) { position: relative; }
.pass .kopfzeile { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.pass h2 { font-size: 1.8rem; margin: 6px 0 2px; }
.pass .qr { background: #fff; border-radius: 10px; width: 196px; height: 196px; margin: 26px auto 22px; padding: 12px; }
.pass .qr img { width: 100%; height: 100%; display: block; }
.pass .pin { text-align: center; }
.pass .pin small { display: block; font-size: .85rem; opacity: .85; }
.pass .pin .zahl { font-size: 3.2rem; letter-spacing: .14em; background: var(--nacht); display: inline-block; padding: 4px 14px 6px 22px; border-radius: 8px; margin-top: 4px; }
.pass .fuss { text-align: center; font-size: .85rem; opacity: .9; margin-top: 12px; }

.karte { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.karte h2 { margin-bottom: 8px; }
.anteile { display: flex; gap: 6px; margin: 10px 0; }
.anteile i { flex: 1; height: 8px; border-radius: 4px; background: var(--linie); }
.anteile i.bezahlt { background: var(--gruen); }
.feld { margin: 10px 0; }
.feld label { display: block; font-size: .85rem; color: var(--text-leise); margin-bottom: 3px; }
.feld input { width: 100%; padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--linie); background: #fff; }
.zeile { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--glas); }
.zeile:last-child { border-bottom: 0; }
.status { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--glas); white-space: nowrap; align-self: center; }
.status.storniert { color: var(--rot); }

.warten { display: flex; align-items: center; gap: 12px; }
.ball { width: 22px; height: 22px; border-radius: 50%; background: var(--ball); box-shadow: inset -4px -3px 0 rgba(20,48,107,.18); }
@media (prefers-reduced-motion: no-preference) { .warten .ball { animation: hupf .7s ease-in-out infinite alternate; } }
@keyframes hupf { from { transform: translateY(0); } to { transform: translateY(-10px); } }

@media (min-width: 700px) {
  h1 { font-size: 2.3rem; }
  .kopf h1 { font-size: 2rem; }
}
.pass.kurz { min-height: 420px; display: flex; flex-direction: column; }
.pass.kurz .einladung { margin: auto 0 6px; text-align: center; font-size: 1.1rem; }
