/* Terminbuchung – schlicht, ruhig, gut lesbar. Farben je Marke kommen als CSS-Variablen aus der Seite. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
a {
  color: var(--btn);
  text-underline-offset: 2px;
}
:focus-visible {
  outline: 3px solid var(--btn);
  outline-offset: 2px;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: #fff;
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
}
.sr-only,
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Kopf und Fuss */
.kopf {
  border-bottom: 1px solid var(--line);
}
.kopf .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}
.marke {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.marke img {
  display: block;
  height: 26px;
  width: auto;
}
.kopf-sub {
  color: var(--muted);
  font-size: 14px;
}
.fuss {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.fuss .wrap {
  padding-top: 16px;
  padding-bottom: 24px;
}
.fuss a {
  color: var(--muted);
}

/* main trägt auch .wrap (padding: 0 …) – darum spezifischer, sonst fehlt der Abstand oben */
main.wrap {
  padding-top: 48px;
  padding-bottom: 64px;
}
h1 {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
h2 {
  font-size: 17px;
  margin: 0 0 6px;
}
.lead {
  font-size: 18px;
  margin: 0 0 30px;
  max-width: 58ch;
}
.raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 56px;
  align-items: start;
}
.hinweis {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 8px;
}

/* Seitenkarte */
.spalte-info {
  position: sticky;
  top: 24px;
  background: var(--surface);
  border-radius: 14px;
  padding: 22px;
  font-size: 15px;
}
.spalte-info p {
  margin: 0 0 16px;
}
.person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.person-foto {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  flex: none;
  background: #fff;
}
.person-rolle,
.person-firma {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.person-name {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}
.fakten {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.fakten div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}
.fakten dt {
  color: var(--muted);
  font-weight: 600;
}
.fakten dd {
  margin: 0;
}

/* Schritte */
.schritt {
  border: 0;
  margin: 0 0 36px;
  padding: 0;
  min-width: 0;
}
.schritt legend {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.schritt[disabled] legend {
  color: var(--muted);
}
.nr {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
}
.schritt[disabled] .nr {
  background: #fff;
  color: var(--muted);
  box-shadow: inset 0 0 0 2px var(--line);
}
.schritt[disabled] .felder {
  display: none;
}
#schritt-angaben[disabled]::after {
  content: "Erst Tag und Uhrzeit wählen – danach tragen Sie hier Ihre Angaben ein.";
  display: block;
  color: var(--muted);
}
.feld-titel {
  font-weight: 700;
  margin: 22px 0 10px;
}
.feld-hilfe {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}
.leer {
  color: var(--muted);
  margin: 0;
}

/* Auswahlkarten: Termintyp */
.typen {
  display: grid;
  gap: 10px;
}
.wahl,
.ort,
.chip,
.kal-tag {
  position: relative;
}
.wahl input,
.ort input,
.chip input,
.kal-tag input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.wahl label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  background: #fff;
}
.wahl label:hover,
.ort label:hover {
  border-color: var(--muted);
}
.wahl-punkt {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: #fff;
}
.wahl-text {
  flex: 1;
  min-width: 0;
}
.wahl input:checked + label {
  border-color: var(--btn);
  box-shadow: inset 0 0 0 1px var(--btn);
  background: var(--surface);
}
.wahl input:checked + label .wahl-punkt {
  border-color: var(--btn);
  background: radial-gradient(circle, var(--btn) 0 5px, #fff 5.5px);
}
.wahl input:focus-visible + label,
.ort input:focus-visible + label,
.chip input:focus-visible + label,
.kal-tag input:focus-visible + label {
  outline: 3px solid var(--btn);
  outline-offset: 2px;
}
.typ-kopf {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}
.typ-dauer {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.typ-text {
  display: block;
  color: var(--muted);
  font-size: 15px;
  margin-top: 3px;
}

/* Ort mit Icon */
.orte-liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.ort label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
}
.ort label svg {
  flex: none;
  color: var(--muted);
}
.ort-name {
  display: block;
  font-weight: 700;
  line-height: 1.25;
}
.ort-text {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}
.ort input:checked + label {
  border-color: var(--btn);
  box-shadow: inset 0 0 0 1px var(--btn);
  background: var(--surface);
}
.ort input:checked + label svg {
  color: var(--btn);
}

/* Kalender + Uhrzeiten */
.kalender-zeit {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.kal-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kal-titel {
  margin: 0;
  font-weight: 700;
}
.kal-nav {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.kal-nav:disabled {
  color: #b8c0cb;
  cursor: default;
}
.kal-wt,
.kal-tage {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.kal-wt span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}
.kal-tag {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 40px;
  border-radius: 10px;
  color: #8a94a3;
  font-variant-numeric: tabular-nums;
}
.kal-tag.frei label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.kal-tag.frei label::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--btn);
}
.kal-tag.frei label:hover {
  box-shadow: inset 0 0 0 1.5px var(--btn);
}
.kal-tag input:checked + label {
  background: var(--btn);
  color: var(--btn-ink);
}
.kal-tag input:checked + label::after {
  background: var(--btn-ink);
}
.kal-legende {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}
.kal-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--btn);
}
.zeit-titel {
  font-weight: 700;
  margin: 10px 0 4px;
}
.zeit-gruppe-titel {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 14px 0 8px;
}
.uhrzeiten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.chip label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.chip label:hover {
  border-color: var(--btn);
}
.chip input:checked + label {
  background: var(--btn);
  border-color: var(--btn);
  color: var(--btn-ink);
}

/* Formular */
.felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.feld {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.feld.breit {
  grid-column: 1 / -1;
}
.feld label,
.weitere summary {
  font-weight: 600;
  font-size: 15px;
}
.opt {
  font-weight: 400;
  color: var(--muted);
}
input[type="text"],
input:not([type]),
input[type="email"],
input[type="tel"],
textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  border: 1.5px solid #8a94a3;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 48px;
  background: #fff;
}
input:focus,
textarea:focus {
  border-color: var(--btn);
  outline: 3px solid color-mix(in srgb, var(--btn) 25%, transparent);
  outline-offset: 0;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #b42318;
}
.weitere summary {
  cursor: pointer;
  padding: 10px 0;
  min-height: 44px;
  color: var(--btn);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.weitere summary .opt {
  text-decoration: none;
  display: inline-block;
}
.weitere textarea {
  margin-top: 8px;
}
.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}
.check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--btn);
}
.check label {
  font-weight: 400;
}

/* Zusammenfassung + Buchen (mit gewählter Zeit unten angeheftet) */
.absenden {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.absenden.bereit {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, 0.18);
}
.zusammenfassung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  min-width: 0;
  flex: 1;
}
.zf-teil {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.zf-teil svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.zf-leer {
  color: var(--muted);
}
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.knopf:hover {
  filter: brightness(1.12);
}
.knopf[disabled] {
  background: #c9d0d8;
  color: #3d4652;
  cursor: not-allowed;
  filter: none;
}
.knopf.zweit {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.knopf.warn {
  background: #b42318;
  color: #fff;
}
.fehler {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fdecea;
  color: #8a1c12;
  font-weight: 600;
}

/* Fertig / Einzelseiten */
.fertig,
.einzeln {
  max-width: 640px;
}
.fertig:focus {
  outline: none;
}
.details {
  margin: 0 0 22px;
  border-top: 1px solid var(--line);
}
.details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.details dt {
  color: var(--muted);
  font-weight: 600;
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.absage {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .raster {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .spalte-info {
    position: static;
  }
  .kalender-zeit {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .kalender-zeit #kalender {
    max-width: 380px;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
  main.wrap {
    padding-top: 28px;
    padding-bottom: 48px;
  }
  .kopf-sub {
    display: none;
  }
  .felder {
    grid-template-columns: 1fr;
  }
  .absenden .knopf {
    width: 100%;
  }
  .details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
