/* ==========================================================
   Terminbuchung · im Stil der Hauptseite (Tokens aus styles.css)
   ========================================================== */

.termin-seite { background: var(--bg-2); }
.termin-seite .nav { background: rgba(245, 245, 247, .76); }

.termin { padding: clamp(40px, 6vw, 72px) 0 clamp(80px, 10vw, 128px); }

.termin__kopf { text-align: center; margin-bottom: clamp(32px, 4vw, 48px); }
.termin__titel {
  font-size: clamp(2.375rem, 1.4rem + 4vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.termin__kopf .lead { margin-top: 14px; }

/* ---------- Karte ---------- */

.t-karte {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.t-karte[hidden] { display: none; }

/* ---------- Kalender ---------- */

.t-kal { padding: clamp(24px, 3.4vw, 40px); }

.t-kal__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.t-kal__monat { font-size: 1.3125rem; font-weight: 600; letter-spacing: -.02em; }
.t-kal__nav { display: flex; gap: 8px; }

.t-rund {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--blue);
  font: inherit;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.t-rund:hover:not(:disabled) { background: #e8e8ed; }
.t-rund:disabled { color: #c7c7cc; cursor: default; }

.t-kal__wochentage,
.t-kal__tage {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.t-kal__wochentage span {
  padding-bottom: 10px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.t-kal__tage { row-gap: 6px; }

.t-tag {
  position: relative;
  justify-self: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c7c7cc;
  font: inherit;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  cursor: default;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.t-tag--frei {
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.t-tag--frei::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--blue);
}
.t-tag--frei:hover { background: var(--bg-2); }
.t-tag[aria-pressed="true"] { background: var(--blue); color: #fff; }
.t-tag[aria-pressed="true"]::after { background: #fff; }

/* ---------- Uhrzeiten ---------- */

.t-zeiten {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.4vw, 40px);
  border-left: 1px solid rgba(0, 0, 0, .06);
  background: #fbfbfd;
}
.t-zeiten__tag {
  margin-bottom: 18px;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -.02em;
  min-height: 1.6em;
}
.t-zeiten__liste {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  max-height: 336px;
  overflow-y: auto;
  padding: 2px;
}
.t-zeit {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--blue);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.t-zeit:hover { border-color: var(--blue); }
.t-zeit:active { background: var(--blue); color: #fff; }
.t-zeiten__leer { grid-column: 1 / -1; color: var(--ink-2); }
.t-zeiten__hinweis { margin-top: auto; padding-top: 18px; font-size: .8125rem; color: var(--ink-3); }

/* ---------- Formular ---------- */

.t-karte--form,
.t-karte--fertig {
  display: block;
  max-width: 640px;
  padding: clamp(28px, 4vw, 48px);
}
.t-karte--form[hidden],
.t-karte--fertig[hidden] { display: none; }

.t-zurueck {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: 1.0625rem;
  cursor: pointer;
}
.t-zurueck:hover { text-decoration: underline; }

.t-form__titel {
  margin: 14px 0 28px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.028em;
  text-wrap: balance;
}

.t-form__zeit { color: var(--ink-2); }

.t-form { display: grid; gap: 18px; }
.t-form__reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.feld { display: grid; gap: 7px; }
.feld__label { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.feld__label em { font-style: normal; font-weight: 400; color: var(--ink-3); }

.feld input,
.feld textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.feld textarea { resize: vertical; min-height: 96px; }
.feld input:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .18);
}
.feld input[aria-invalid="true"],
.feld textarea[aria-invalid="true"] { border-color: #d70015; }

/* Umschalter Telefon / Video */
.seg { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg legend { margin-bottom: 8px; padding: 0; }
.seg__box {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  min-width: 260px;
  padding: 3px;
  border-radius: 12px;
  background: #e8e8ed;
}
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg__opt span {
  display: block;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-2);
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg__opt input:checked + span {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.seg__opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.t-form__art-info { margin-top: -8px; font-size: .9375rem; color: var(--ink-2); }

.haken {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .9375rem;
  color: var(--ink-2);
  cursor: pointer;
}
.haken input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}
.haken a { color: var(--link); }

.t-falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.t-meldung {
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff2f2;
  color: #b0000f;
  font-size: .9375rem;
}
.t-meldung[hidden] { display: none; }

.t-senden { width: 100%; margin-top: 6px; }
.t-senden[disabled] { opacity: .6; cursor: progress; }
.t-klein { font-size: .875rem; color: var(--ink-2); text-align: center; }
.t-klein a { color: var(--link); }

/* ---------- Bestätigung ---------- */

.t-karte--fertig { text-align: center; }
.t-haken { width: 64px; height: 64px; margin: 0 auto 20px; display: block; }
.t-haken circle { fill: var(--green); }
.t-haken path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.t-fertig__titel {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.035em;
  margin-bottom: 12px;
}
.t-karte--fertig .t-klein { max-width: 30em; margin: 16px auto 0; }
.t-fertig__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Kurzfristig / dringend ---------- */

.t-dringend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  max-width: 920px;
  margin: 20px auto 0;
  padding: clamp(24px, 3.4vw, 36px) clamp(24px, 3.4vw, 40px);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-1);
}
.t-dringend__titel { font-size: 1.3125rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.t-dringend p { color: var(--ink-2); max-width: 34em; }
.t-dringend__aktionen { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

.btn--grau { background: #e8e8ed; color: var(--ink); }
.btn--grau:hover { background: #dcdce1; }
.btn--rot { background: #d70015; }
.btn--rot:hover { background: #e3001a; }

/* ---------- Dialog Soforthilfe ---------- */

.t-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: clamp(28px, 4vw, 44px);
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .45);
  overflow-y: auto;
}
.t-dialog::backdrop {
  background: rgba(0, 0, 0, .36);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.t-dialog[open] { animation: dialog-auf .35s var(--ease-out); }
@keyframes dialog-auf { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.t-dialog__zu {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
.t-dialog__titel {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
}
.t-dialog__text { margin: 10px 0 20px; color: var(--ink-2); font-size: var(--fs-text); }
.t-dialog .eyebrow { margin-bottom: 6px; color: #d70015; font-size: 1rem; }

.t-preis {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-2);
  font-size: 1rem;
  line-height: 1.5;
}
.t-preis span { display: block; margin-top: 4px; font-size: .875rem; color: var(--ink-2); }
#sofort-fertig { text-align: center; padding: 12px 0; }

/* ---------- Detailseite einer dringenden Anfrage ---------- */

.anfrage { background: var(--bg-2); }
.anfrage main { padding: 56px var(--gutter) 80px; }
.anfrage__titel { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.anfrage__anruf { display: flex; margin: 28px 0; }
.anfrage__text { padding: 22px; border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-1); }
.anfrage__label { font-size: .875rem; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.anfrage__hinweis { margin-top: 20px; font-size: .875rem; color: var(--ink-2); }

/* ---------- Responsiv ---------- */

@media (max-width: 767px) {
  .t-karte { grid-template-columns: 1fr; }
  .t-zeiten { border-left: 0; border-top: 1px solid rgba(0, 0, 0, .06); }
  .t-zeiten__liste { max-height: none; }
  .t-form__reihe { grid-template-columns: 1fr; }
  .t-dringend { flex-direction: column; align-items: stretch; }
  .t-dringend__aktionen .btn { flex: 1 1 auto; }
  .t-tag { width: 40px; height: 40px; }
}

@media (max-width: 359px) {
  .t-zeiten__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-tag { width: 36px; height: 36px; font-size: 1rem; }
}
