/* calendar.jeckdesk.de, JeckDesk-Design (Ubuntu, #4b4b4b, #f4a700), Aufbau nach dem Apple-Designsystem */

@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ubuntu-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ubuntu-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/ubuntu-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --text: #4b4b4b; --dunkel: #2b2b2b; --grau: #8e8e93; --grau-2: #636366;
  --bg: #f2f2f7; --karte: #ffffff; --linie: #ececf0; --grau-200: #e5e5ea; --grau-300: #d1d1d6;
  --orange: #f4a700; --orange-dunkel: #d99400; --orange-hell: #fff3d6; --orange-text: #7a5300;
  --blau: #2683c6;
  --gruen: #198754; --gruen-hell: #d1e7dd; --gruen-text: #0f5132;
  --rot: #c0392b; --rot-hell: #fdecea;
  --schatten: 0 1px 4px rgba(0,0,0,.08); --schatten-gross: 0 6px 24px rgba(0,0,0,.10);
  --radius: 10px; --radius-gross: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
h1, h2, h3 { color: var(--dunkel); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 700; }
h2 { font-size: clamp(18px, 2.6vw, 21px); font-weight: 700; margin: 0 0 12px; }
p { margin: 0 0 12px; }
a { color: var(--blau); }
button, input, textarea, select { font: inherit; }
.sym { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 24px); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid rgba(244,167,0,.55); outline-offset: 2px; }

/* Kopf und Fuß */
.kopf { position: sticky; top: 0; z-index: 30; background: rgba(242,242,247,.92); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo img { display: block; height: 48px; width: auto; }
.kopf-link { color: var(--grau-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.kopf-link:hover { color: var(--dunkel); }
.fuss { margin-top: clamp(32px, 6vw, 56px); padding: 20px 0 28px; font-size: 14px; color: var(--grau); }
.fuss-innen { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fuss nav { display: flex; gap: 18px; flex-wrap: wrap; }
.fuss a { color: var(--grau-2); text-decoration: none; }
.fuss a:hover { color: var(--dunkel); text-decoration: underline; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius); min-height: clamp(42px, 11vw, 48px);
  padding: 0 clamp(14px, 4vw, 20px); font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .05s, opacity .15s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dunkel); }
.btn-secondary { background: var(--grau-200); color: var(--dunkel); }
.btn-secondary:hover { background: #dcdce1; }
.btn-gefahr { background: var(--rot-hell); color: var(--rot); }
.btn-gefahr:hover { background: #fad7d4; }
.btn-block { width: 100%; }
.btn-klein { min-height: 38px; font-size: 14px; padding: 0 14px; }

/* Startseite */
.held { text-align: center; padding: clamp(18px, 4vw, 40px) 0 clamp(16px, 3vw, 28px); }
.held .unter { max-width: 620px; margin: 10px auto 0; }
.unter { color: var(--grau-2); font-size: clamp(15px, 2vw, 17px); }
.typen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 20px); max-width: 920px; margin: 0 auto; }
.typ-karte {
  position: relative; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  background: var(--karte); border-radius: var(--radius-gross); box-shadow: var(--schatten);
  padding: clamp(20px, 3vw, 26px); text-decoration: none; color: var(--text);
  transition: box-shadow .15s, transform .15s;
}
.typ-karte:hover { box-shadow: var(--schatten-gross); transform: translateY(-1px); }
.typ-karte .streifen { position: absolute; left: 0; top: 0; right: 0; height: 6px; background: var(--orange); }
.typ-name { font-size: clamp(18px, 2.4vw, 21px); font-weight: 700; color: var(--dunkel); line-height: 1.25; margin-top: 4px; }
.typ-infos { display: flex; gap: 8px; flex-wrap: wrap; }
.pille { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); color: var(--grau-2); border-radius: 20px; padding: 4px 12px 4px 10px; font-size: 14px; font-weight: 500; }
.pille .sym { width: 16px; height: 16px; }
.typ-kurz { color: var(--grau-2); flex: 1; }
.typ-knopf { margin-top: 4px; }

/* Karten */
.karte { background: var(--karte); border-radius: var(--radius-gross); box-shadow: var(--schatten); padding: clamp(18px, 3vw, 28px); }
.karte.schmal { max-width: 540px; margin: clamp(20px, 5vw, 48px) auto 0; }
.karte.breit { max-width: 920px; margin: clamp(16px, 3vw, 32px) auto 0; }
.karte.breit h2 { margin-top: 28px; display: flex; align-items: center; gap: 10px; }
.karte.breit h1 + .hinweis, .karte.breit h1 + h2 { margin-top: 20px; }
.text-seite { max-width: 820px; margin: clamp(16px, 3vw, 32px) auto 0; }
.text-seite h2 { margin-top: 26px; }
.text-seite ul { padding-left: 20px; margin: 0 0 12px; }
.text-seite li { margin-bottom: 6px; }

/* Buchungsseite */
.buchung { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(14px, 2.4vw, 22px); align-items: start; padding-top: clamp(12px, 2.5vw, 28px); }
.info { position: sticky; top: 84px; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--grau-2); text-decoration: none; font-size: 14px; font-weight: 500; margin: -4px 0 14px -4px; }
.zurueck:hover { color: var(--dunkel); }
.info h1 { font-size: clamp(21px, 2.8vw, 26px); margin-bottom: 14px; }
.fakten { list-style: none; margin: 0 0 14px; padding: 0; }
.fakten li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; color: var(--grau-2); font-weight: 500; }
.fakten .sym { margin-top: 3px; color: var(--grau); }
.info-text { color: var(--grau-2); }

.schritt { display: inline-flex; align-items: center; gap: 8px; color: var(--orange-dunkel); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.schritt i { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font-style: normal; align-items: center; justify-content: center; font-size: 12px; }

.dauer-wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 320px; margin: 0 0 18px; }
.dauer-wahl button { border: none; border-radius: 20px; min-height: 40px; background: var(--bg); color: var(--grau-2); font-weight: 700; cursor: pointer; }
.dauer-wahl button[aria-pressed="true"] { background: var(--dunkel); color: #fff; }

.auswahl { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: clamp(16px, 3vw, 28px); align-items: start; }
.monat-kopf { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 10px; }
.monat-kopf h3 { text-align: center; font-size: 17px; }
.pfeil { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--bg); color: var(--dunkel); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pfeil:hover:not(:disabled) { background: var(--grau-200); }
.pfeil:disabled { opacity: .3; cursor: default; }
.wochentage, .tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wochentage span { text-align: center; font-size: 12px; font-weight: 700; color: var(--grau); text-transform: uppercase; padding: 4px 0; }
.tag {
  aspect-ratio: 1 / 1; width: 100%; border: none; border-radius: 50%; background: transparent; color: var(--grau-300);
  font-weight: 500; font-size: 15px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0; cursor: default;
}
.tag.frei { background: var(--orange-hell); color: var(--orange-text); font-weight: 700; cursor: pointer; }
.tag.frei:hover { background: #ffe7a8; }
.tag.gewaehlt, .tag.gewaehlt:hover { background: var(--orange); color: #fff; }
.tag.heute::after { content: ''; position: absolute; bottom: 12%; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.tag.leer { visibility: hidden; }
.zone { font-size: 13px; color: var(--grau); margin: 12px 0 0; }

.zeiten-kopf { font-weight: 700; color: var(--dunkel); margin: 6px 0 12px; min-height: 24px; }
.zeiten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.zeit { border: none; border-radius: var(--radius); min-height: 44px; background: var(--bg); color: var(--dunkel); font-weight: 700; cursor: pointer; }
.zeit:hover { background: var(--orange-hell); color: var(--orange-text); }
.zeit[aria-pressed="true"] { background: var(--orange); color: #fff; }
.zeiten-leer { color: var(--grau); font-size: 15px; }

.gewaehlt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--bg); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 18px; }
.gewaehlt-zeile strong { color: var(--dunkel); }

/* Formular */
.formular { display: grid; gap: clamp(10px, 2.4vw, 14px); }
.reihe-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(10px, 2.4vw, 14px); }
.reihe-2 > * { min-width: 0; }
.feld { display: block; }
.feld-label { display: block; font-weight: 700; font-size: 13px; color: var(--grau-2); margin-bottom: 6px; }
.feld-label .pflicht { color: var(--orange-dunkel); }
.eingabe {
  width: 100%; min-height: clamp(44px, 11vw, 48px); padding: clamp(9px, 2.2vw, 12px) clamp(11px, 3vw, 14px);
  border: 1.5px solid #e0e0e5; border-radius: var(--radius); background: #fff; color: var(--dunkel);
  font-size: 16px !important; line-height: 1.35; outline: none; transition: border-color .15s, box-shadow .15s;
}
.eingabe:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,167,0,.15); }
textarea.eingabe { min-height: 96px; resize: vertical; }
.feld.fehlerhaft .eingabe { border-color: var(--rot); }
.feld-fehler { display: block; color: var(--rot); font-size: 13px; margin-top: 4px; }
.haken { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.haken input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); }
.haken-text { display: block; color: var(--dunkel); }
.haken-sub { display: block; font-size: 13px; color: var(--grau); margin-top: 2px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Hinweise und Zustände */
.hinweis { border-radius: var(--radius); padding: 12px 14px; font-size: 15px; margin: 0 0 16px; border-left: 4px solid; }
.hinweis-ok { background: var(--gruen-hell); color: var(--gruen-text); border-color: var(--gruen); }
.hinweis-fehler { background: var(--rot-hell); color: #8e2a1f; border-color: var(--rot); }
.hinweis-info { background: #eaf3fb; color: #1d4f78; border-color: var(--blau); }
.laden { display: flex; align-items: center; gap: 12px; color: var(--grau-2); padding: 28px 0; justify-content: center; }
.kreisel { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--grau-200); border-top-color: var(--orange); animation: drehen .8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

.bestaetigung { text-align: center; padding: clamp(8px, 2vw, 16px) 0; }
.bestaetigung .kreis { width: 64px; height: 64px; border-radius: 50%; background: var(--gruen-hell); color: var(--gruen); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.bestaetigung .kreis .sym { width: 34px; height: 34px; stroke-width: 2.4; }
.bestaetigung h2 { font-size: clamp(21px, 3vw, 26px); }
.termin-box { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; margin: 16px auto; max-width: 460px; text-align: left; }
.termin-box strong { display: block; color: var(--dunkel); }
.zeile-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.bestaetigung .zeile-knoepfe { justify-content: center; }
.absage, .verschieben { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--linie); }

.daten { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 14px; margin: 0 0 8px; }
.daten dt { color: var(--grau); font-size: 14px; }
.daten dd { margin: 0; color: var(--dunkel); overflow-wrap: anywhere; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 12px; }
.tabelle th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--grau); padding: 8px 10px; border-bottom: 1px solid var(--grau-200); }
.tabelle td { padding: 9px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle td small { color: var(--grau); }
.ampel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; flex: none; }
.ampel.gruen { background: var(--gruen); }
.ampel.rot { background: var(--rot); }
.marke { display: inline-block; background: var(--orange-hell); color: var(--orange-text); font-size: 12px; font-weight: 700; border-radius: 12px; padding: 1px 8px; margin-left: 6px; }
.klein { font-size: 13px; color: var(--grau); }
code { background: var(--bg); border-radius: 6px; padding: 1px 6px; font-size: 14px; overflow-wrap: anywhere; }

/* Breakpoints */
@media (max-width: 980px) {
  .buchung { grid-template-columns: minmax(0, 1fr); }
  .info { position: static; }
}
@media (max-width: 720px) {
  .auswahl { grid-template-columns: minmax(0, 1fr); }
  .zeiten { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
}
@media (max-width: 640px) {
  .typen { grid-template-columns: minmax(0, 1fr); }
  .reihe-2 { grid-template-columns: minmax(0, 1fr); }
  .daten { grid-template-columns: minmax(0, 1fr); }
  .daten dt { margin-top: 6px; }
  .kopf-innen { height: 60px; }
  .logo img { height: 42px; }
  .fuss-innen { justify-content: center; text-align: center; }
  .fuss nav { justify-content: center; }
  .zeile-knoepfe .btn { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .zeiten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wochentage, .tage { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Auswahlfeld im gleichen Stil wie die Eingaben, eigener Pfeil */
select.eingabe {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
