/* Öffentliche Buchungsseiten (ab Version 1.1). Nur Systemschriften, keine externen Ressourcen.
   Markenfarben kommen als CSS-Variablen aus dem Layout: --primary, --primary-dark, --on-primary, --primary-text, --accent, --on-accent */
:root {
  --primary: #1f5fbf; --primary-dark: #184a96; --on-primary: #ffffff; --primary-text: #1f5fbf;
  --accent: #e8f0fc; --on-accent: #111827;
  --text: #1c2430; --muted: #566273; --line: #dde2ea; --bg: #f4f5f7; --card: #ffffff;
  --ok: #17703a; --bad: #b3261e; --warn: #8a5300;
  --radius: 16px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 12px 28px rgba(16, 24, 40, .09);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body.pub { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--primary-text); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 750; }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.req { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; background: #fff; color: var(--text); padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--primary-text); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- Kopfbereich ---------- */
.brand-mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.wordmark { font-weight: 750; font-size: 1.3rem; letter-spacing: -.01em; }

.topbar { background: var(--primary); color: var(--on-primary); }
.topbar .wrap { padding-top: 12px; padding-bottom: 12px; }

.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--on-primary); padding: 40px 0 56px; }
.hero.has-image {
  background-image: linear-gradient(rgba(12, 18, 28, .52), rgba(12, 18, 28, .70)), var(--hero-image);
  background-size: cover; background-position: center; color: #fff;
}
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero-inner > * { max-width: 100%; }
.hero .wordmark { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.hero-title { margin: 0; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; }
.hero-lead { max-width: 46rem; margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.35rem); line-height: 1.5; }

main.wrap { padding-top: 32px; padding-bottom: 56px; }
.section-title { margin-bottom: 18px; }
.crumbs { margin: 0 0 14px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Logo im Kopfbereich ----------
   Seitenverhältnis bleibt immer erhalten (width/height:auto + object-fit:contain), die Fläche passt sich dem Logo an
   (keine quadratische Vorgabe). Hintergrund je nach Logo: tone-light (dunkles Logo -> helle neutrale Fläche),
   tone-dark (helles Logo -> dunkle Fläche), tone-flush (Logo mit eigenem Hintergrund -> ohne Rahmenfläche). */
.logo-plate { --plate-bg: #f8f8f6; --plate-border: rgba(16, 24, 40, .08);
  display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; box-sizing: border-box;
  padding: 16px 24px; border-radius: 16px; background: var(--plate-bg); border: 1px solid var(--plate-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .14); }
.logo-plate.tone-dark { --plate-bg: #1c2230; --plate-border: rgba(255, 255, 255, .16); }
.logo-plate.tone-flush { padding: 0; overflow: hidden; background: transparent; }
.logo-plate.shape-tall:not(.tone-flush) { min-width: 96px; }
.logo { display: block; width: auto; height: auto; max-width: 100%; object-fit: contain; }
.hero .logo { max-width: 420px; max-height: 200px; max-width: min(420px, calc(100vw - 82px)); }
.topbar .logo { max-width: 300px; max-height: 96px; max-width: min(300px, calc(100vw - 80px)); }
.topbar .logo-plate { padding: 10px 16px; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .15); }
.topbar .logo-plate.tone-flush { padding: 0; }
/* Mit Titelbild: Logo als gut lesbare Overlay-Karte, deutlich vom Foto abgesetzt */
.hero.has-image .logo-plate { --plate-border: rgba(255, 255, 255, .6); box-shadow: 0 14px 44px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .30); }
.hero.has-image .logo-plate.tone-dark { --plate-border: rgba(255, 255, 255, .28); }
.hero.has-image .logo-plate.tone-flush { border: 1px solid rgba(255, 255, 255, .6); }
.hero .logo-plate.tone-flush { border: 1px solid rgba(255, 255, 255, .35); }

/* ---------- Karten ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 20px; box-shadow: var(--shadow-sm); }
.card.narrow { max-width: 600px; }
.card > :last-child { margin-bottom: 0; }

.type-grid { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }
.type-grid > * { flex: 1 1 290px; max-width: 480px; min-width: 0; }
.type-card { position: relative; display: flex; flex-direction: column; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--primary); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.type-card.has-media { border-top-width: 1px; }
.type-card:hover, .type-card:focus-within { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary); }
.type-card-media { aspect-ratio: 3 / 2; max-height: 260px; background: var(--accent); overflow: hidden; }
.type-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.type-card-body { display: block; flex: 1 1 auto; padding: 20px 22px 24px; }
.type-card h3 { margin-bottom: 8px; }
.type-desc { color: var(--muted); font-size: .98rem; margin-bottom: 14px; }
.type-card .btn { display: flex; width: 100%; margin-top: 4px; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.chips { list-style: none; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 8px; padding: 0; margin: 0 0 18px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; max-width: 100%; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 12px 4px 10px; font-size: .92rem; font-weight: 600; line-height: 1.4; }
.chips .icon { flex: none; width: 18px; height: 18px; }
.chips li span { overflow: hidden; text-overflow: ellipsis; }

.type-banner { margin: -22px -24px 18px; aspect-ratio: 16 / 6; max-height: 280px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--accent); }
.type-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.type-head h1 { margin-bottom: 12px; }

.step-title { display: flex; align-items: center; gap: 12px; }
.step-text { flex: 1 1 auto; min-width: 0; }
.step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 1rem; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border-radius: 12px; border: 1px solid #c3cad6; background: #fff; color: var(--text); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn .icon { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- Formulare ---------- */
.field { margin: 0 0 18px; }
.field label { display: block; font-weight: 650; margin-bottom: 6px; }
.field label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.field label.check > span { flex: 1 1 auto; min-width: 0; }
.field label.check input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #b6bfcc; border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: 1rem;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-text); outline: 3px solid var(--accent); outline-offset: 0; }
small.error, .error { color: var(--bad); }
small.error { display: block; margin-top: 4px; font-size: .92rem; }
.row2 { display: flex; gap: 0 18px; }
.row2 > * { flex: 1 1 0; min-width: 0; }
input[type=hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.selected { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; }

.alert { padding: 14px 18px; border-radius: 12px; margin: 0 0 20px; border: 1px solid; }
.alert.ok { background: #e8f6ed; border-color: #b4dcc1; color: #14532d; }
.alert.error { background: #fdecea; border-color: #f3b8b3; color: #7a1712; }
.alert.warn { background: #fff4e0; border-color: #f0cf94; color: #5f3b00; }
.alert.info { background: var(--accent); border-color: var(--line); color: var(--on-accent); }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .9rem; font-weight: 650; background: #e4e8ee; color: #2a3340; }
.badge.good { background: #dcf3e4; color: #14532d; }
.badge.bad { background: #fbdcd9; color: #7a1712; }
.badge.warn { background: #ffecc7; color: #5f3b00; }

.details { margin: 16px 0 0; overflow: hidden; }
.details dt { float: left; clear: left; width: 8.5rem; color: var(--muted); padding: 4px 0; }
.details dd { margin: 0 0 0 9rem; padding: 4px 0; font-weight: 550; }

/* ---------- Terminwahl (Kalender und Uhrzeiten; Markup und IDs gehören zu booking.js) ---------- */
#booking-app { display: block; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-nav strong { font-size: 1.1rem; }
.cal-nav button { width: 48px; height: 48px; padding: 0; border-radius: 12px; border: 1px solid #c3cad6; background: #fff; color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.cal-nav button:hover:not([disabled]) { border-color: var(--primary); }
.cal-nav button[disabled] { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 460px; }
.cal-grid > * { min-width: 0; }
.cal-grid .dow { text-align: center; font-size: .82rem; font-weight: 650; color: var(--muted); padding: 4px 0; }
.cal-grid button { width: 100%; min-height: 46px; padding: 0; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 1rem; cursor: pointer; }
.cal-grid button[disabled] { color: #aab2bf; cursor: default; }
.cal-grid button.has { background: var(--accent); color: var(--on-accent); border-color: var(--primary); font-weight: 700; }
.cal-grid button.has:hover { box-shadow: 0 0 0 2px var(--primary) inset; }
.cal-grid button.sel { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
#slot-status { color: var(--muted); margin: 14px 0 10px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.slots button { flex: 0 0 96px; }
.slots button { min-height: 46px; padding: 0 10px; border-radius: 10px; border: 1px solid #b6bfcc; background: #fff; color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.slots button:hover { border-color: var(--primary); background: var(--accent); color: var(--on-accent); }
.slots button.sel { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

#booking-app { display: flex; flex-wrap: wrap; gap: 8px 44px; align-items: flex-start; }
.pick-cal { flex: 0 1 460px; min-width: 0; width: 100%; }
.pick-slots { flex: 1 1 260px; min-width: 240px; }
@media (min-width: 860px) { #slot-status { margin-top: 10px; } }

/* ---------- Portal, Fusszeile ---------- */
.pub-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 28px 20px 40px; color: var(--muted); font-size: .94rem; border-top: 1px solid var(--line); }
.pub-foot a { color: var(--muted); }
.pub-foot .foot-name { font-weight: 650; color: var(--text); margin-right: auto; }
.brand-tile { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--primary); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); min-height: 96px; }
.brand-tile:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.brand-tile strong { font-size: 1.15rem; }
.brand-tile .logo { max-height: 48px; max-width: 150px; }
.empty { color: var(--muted); }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  body.pub { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .hero { padding: 28px 0 36px; }
  .logo-plate { padding: 12px 16px; border-radius: 14px; }
  .hero .logo { max-width: 280px; max-height: 150px; max-width: min(280px, calc(100vw - 72px)); }
  .topbar .logo { max-width: 220px; max-height: 72px; max-width: min(220px, calc(100vw - 72px)); }
  .topbar .logo-plate { padding: 8px 12px; }
  .hero-inner { gap: 16px; }
  main.wrap { padding-top: 22px; padding-bottom: 40px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .type-banner { margin: -18px -16px 16px; aspect-ratio: 16 / 8; }
  .type-grid { gap: 16px; }
  .type-grid > * { flex-basis: 100%; max-width: none; }
  .type-card-body { padding: 18px; }
  .row2 { flex-direction: column; }
  .btn, button.btn { display: flex; width: 100%; }
  .actions .btn { flex: 1 1 100%; }
  .cal-grid { gap: 4px; max-width: none; }
  .pick-cal, .pick-slots { flex-basis: 100%; }
  .details dt { float: none; width: auto; padding-bottom: 0; font-size: .9rem; }
  .details dd { margin-left: 0; padding-top: 0; margin-bottom: 8px; }
  .pub-foot { padding: 22px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .type-card, .btn { transition: none; }
  .type-card:hover, .type-card:focus-within { transform: none; }
}
