/* Terminbuchung – öffentliche Seiten (Grundlage auch für den Admin-Bereich) */
:root {
  --akzent: #1f6f8b;
  --text: #1d2430;
  --gedimmt: #5d6878;
  --linie: #d9dee5;
  --flaeche: #ffffff;
  --grund: #f3f5f8;
  --fehler: #b42318;
  --fehler-grund: #fef3f2;
  --warnung-grund: #fffaeb;
  --warnung: #93370d;
  --ok: #067647;
  --ok-grund: #ecfdf3;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
}

a { color: var(--akzent); }
a:hover { text-decoration-thickness: 2px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
p { margin: 0 0 .9rem; }

.rahmen { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }

.kopf { display: flex; align-items: center; min-height: 48px; margin-bottom: 16px; }
.kopf .logo { max-height: 56px; max-width: 260px; }
.kopf .firma { font-weight: 700; font-size: 1.15rem; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.fuss { margin-top: 20px; font-size: .875rem; color: var(--gedimmt); text-align: center; }
.fuss a { color: inherit; }
.fuss p { margin: 0 0 .4rem; }

/* Fortschritt */
.schritte { display: flex; list-style: none; margin: 0 0 16px; padding: 0; gap: 4px; counter-reset: s; }
.schritte li {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  font-size: .85rem; color: var(--gedimmt); border-bottom: 3px solid var(--linie); min-width: 0;
}
.schritte .nr {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; background: var(--linie); color: var(--text);
}
.schritte .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schritte .erledigt { border-color: color-mix(in srgb, var(--akzent) 45%, white); }
.schritte .erledigt .nr { background: color-mix(in srgb, var(--akzent) 20%, white); }
.schritte .aktiv { color: var(--text); font-weight: 600; border-color: var(--akzent); }
.schritte .aktiv .nr { background: var(--akzent); color: #fff; }
@media (max-width: 560px) {
  .schritte .label { display: none; }
  .schritte .aktiv .label { display: inline; }
  .schritte li { justify-content: center; }
  .schritte .aktiv { flex: 3; justify-content: flex-start; }
}

.ueberzeile { color: var(--gedimmt); font-size: .9rem; margin-bottom: .3rem; }
.einleitung { margin-bottom: 1.25rem; }
.info { color: var(--gedimmt); }
.klein { font-size: .875rem; color: var(--gedimmt); }

/* Formulare */
.feld { margin-bottom: 1.1rem; }
.feld > label, .feld legend, .feld .label { display: block; font-weight: 600; margin-bottom: .35rem; }
fieldset.feld { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.feld-hinweis { font-size: .875rem; color: var(--gedimmt); margin: -.15rem 0 .4rem; }
.feld-hinweis p { margin: 0; }
.pflicht { color: var(--fehler); }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number],
input[type=url], input[type=password], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: inherit; padding: .6rem .7rem;
  border: 1px solid #b9c1cc; border-radius: 8px; background: #fff;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akzent) 35%, transparent); outline-offset: 1px; border-color: var(--akzent);
}
.hat-fehler input, .hat-fehler select, .hat-fehler textarea, input[aria-invalid=true] { border-color: var(--fehler); }
.feld-fehler { color: var(--fehler); font-size: .875rem; margin: .3rem 0 0; }

.wahl { display: grid; gap: 8px; }
.wahl-option {
  display: flex; gap: 10px; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--linie);
  border-radius: 8px; cursor: pointer; font-weight: 400;
}
.wahl-option:hover { border-color: var(--akzent); }
.wahl-option:has(input:checked) { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 7%, white); }
.wahl-option input { margin-top: .3rem; accent-color: var(--akzent); width: 1.05rem; height: 1.05rem; flex: none; }
.wahl-option.einzel { border: 0; padding: 0; }
.feld-hinweistext { padding: .8rem 1rem; background: var(--grund); border-radius: 8px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.standard-knopf { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: .65rem 1.2rem; border-radius: 8px; border: 1px solid #b9c1cc; background: #fff; color: var(--text);
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.knopf:hover { border-color: var(--akzent); color: var(--akzent); }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover { filter: brightness(1.08); color: #fff; }
.knopf.gefahr { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 45%, white); }
.knopf.gefahr:hover { background: var(--fehler-grund); }
.knopf.klein { padding: .4rem .75rem; font-size: .875rem; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--akzent); text-decoration: underline; cursor: pointer; font-weight: 400; font-size: .9em; }

.aktionen { display: flex; justify-content: space-between; gap: 12px; margin-top: 1.5rem; flex-wrap: wrap; }
.aktionen .primaer { margin-left: auto; }
.aktionen.links { justify-content: flex-start; }
.aktionen.links .primaer { margin-left: 0; }

/* Meldungen */
.meldung { padding: .8rem 1rem; border-radius: 8px; background: var(--grund); margin-bottom: 1rem; border: 1px solid var(--linie); }
.meldung.fehler { background: var(--fehler-grund); color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 25%, white); }
.meldung.warnung { background: var(--warnung-grund); color: var(--warnung); border-color: #fedf89; }
.meldung.ok { background: var(--ok-grund); color: var(--ok); border-color: #abefc6; }
.meldung ul { margin: .3rem 0 0; padding-left: 1.2rem; }

/* Terminauswahl */
.tage { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: .5rem; scrollbar-width: thin; }
.tage a {
  flex: none; display: flex; flex-direction: column; align-items: center; padding: .45rem .8rem; border: 1px solid var(--linie);
  border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem;
}
.tage a small { font-weight: 400; color: var(--gedimmt); font-size: .75rem; }
.tage a:hover { border-color: var(--akzent); }
.tag { scroll-margin-top: 12px; }
.tag h2 { font-size: 1rem; padding-top: .5rem; border-top: 1px solid var(--linie); }
.tag:first-of-type h2 { border-top: 0; padding-top: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot {
  font: inherit; font-weight: 600; padding: .6rem .3rem; border-radius: 8px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--akzent) 40%, white); background: color-mix(in srgb, var(--akzent) 6%, white); color: var(--akzent);
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.slot small { font-weight: 400; font-size: .72rem; color: var(--gedimmt); }
.slot:hover, .slot.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.slot:hover small, .slot.aktiv small { color: #fff; }

.gewaehlt { padding: .75rem 1rem; background: color-mix(in srgb, var(--akzent) 7%, white); border-radius: 8px; }

/* Übersicht / Bestätigung */
.uebersicht { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0; margin: 0 0 1rem; border-top: 1px solid var(--linie); }
.uebersicht dt, .uebersicht dd { padding: .6rem 0; border-bottom: 1px solid var(--linie); margin: 0; }
.uebersicht dt { font-weight: 600; color: var(--gedimmt); padding-right: 12px; }
.uebersicht dt .link { display: block; margin-top: 2px; }
@media (max-width: 520px) {
  .uebersicht { grid-template-columns: 1fr; }
  .uebersicht dt { border-bottom: 0; padding-bottom: 0; }
}
.erfolg-symbol {
  width: 56px; height: 56px; border-radius: 50%; background: var(--ok-grund); color: var(--ok);
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem;
}
.aktionsliste { padding-left: 1.2rem; }

@media (max-width: 560px) {
  .karte { padding: 20px 16px; }
  h1 { font-size: 1.35rem; }
  .aktionen .knopf { flex: 1; }
}
