/* =========================================================================
   Kennenlerngespraech buchen (/termin/ + Seiten hinter den Mail-Links) – Prefix .tm-
   Gleiches System wie /zusatzleistungen/ und /laufanalyse/:
     Hero navy | Buchung auf --bg mit weisser Karte | Schrift Eyebrow · H1 · H2 · Lead · Text · klein
   Mobile zuerst: 16 px Seitenrand (--gutter), Auswahlfelder mind. 44 px hoch.
   ========================================================================= */

.page-termin {
  --tm-section-y: clamp(2.5rem, 1.5rem + 4vw, 5.5rem);
  --tm-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);
  --tm-h2: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
  --tm-lead: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --tm-body: 1.0625rem;
  --tm-small: .9375rem;
  --tm-radius: 14px;
  --tm-border: 1px solid rgba(13, 33, 48, .1);
  --tm-shadow: 0 1px 2px rgba(13, 33, 48, .04), 0 10px 28px -14px rgba(13, 33, 48, .16);
  --tm-on-dark: #b7c5d3;
  --tm-on-dark-muted: #8b9db0;
  --tm-pick-line: rgba(13, 33, 48, .18);
}
.page-termin main { overflow-x: clip; }
.page-termin main :is(h1, h2, h3, p, li, dd) { text-wrap: pretty; }
.page-termin [hidden] { display: none !important; }
.page-termin main :focus-visible { outline: 2px solid var(--navy-900); outline-offset: 3px; }
.page-termin .tm-hero :focus-visible { outline-color: #fff; }

.tm-wrap { width: 100%; max-width: var(--container); margin-inline: auto; }
.tm-eyebrow {
  margin: 0 0 1rem; color: var(--accent-dark);
  font-size: .8125rem; font-weight: 700; line-height: 1.2; letter-spacing: .18em; text-transform: uppercase;
}
.tm-h2 {
  margin: 0; color: var(--navy-900);
  font-size: var(--tm-h2); font-weight: 750; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance;
}
.tm-text { margin: .75rem 0 0; color: var(--muted); font-size: var(--tm-body); font-weight: 500; line-height: 1.65; }
.tm-text a, .tm-side__alt a, .tm-note a, .tm-empty__text a {
  color: var(--navy-900); font-weight: 600; text-decoration-color: var(--accent-dark); text-underline-offset: 4px;
}
.tm-text a:hover, .tm-side__alt a:hover, .tm-note a:hover { color: var(--accent-dark); }
.tm-note { margin: .75rem 0 0; color: var(--muted); font-size: var(--tm-small); font-weight: 500; line-height: 1.5; }

/* ---------- Buttons (wie .zl-btn) ---------- */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .85rem 1.6rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.tm-btn--block { width: 100%; }
.tm-btn--accent { background: var(--accent); color: var(--navy-900); }
.tm-btn--accent:hover { background: var(--accent-hover); color: var(--navy-900); }
.tm-btn--dark { background: var(--navy-900); color: #fff; }
.tm-btn--dark:hover { background: var(--accent); color: var(--navy-900); }
.tm-btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--tm-pick-line); }
.tm-btn--ghost:hover { color: var(--navy-900); border-color: var(--navy-900); }
.tm-btn--danger { background: var(--danger); color: #fff; }
.tm-btn--danger:hover { background: #8f1c13; color: #fff; }
.tm-btn[disabled], .tm-btn.is-loading { opacity: .7; cursor: progress; }
.tm-link {
  padding: .5rem 0; background: none; border: 0; cursor: pointer;
  color: var(--navy-900); font: inherit; font-size: var(--tm-small); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--accent-dark); text-underline-offset: 4px;
}
.tm-link:hover { color: var(--accent-dark); }

/* ---------- Hero (Navy) ---------- */
.tm-hero {
  background: var(--navy-900); color: #fff;
  padding: clamp(2.75rem, 1.75rem + 4vw, 5.5rem) var(--gutter) clamp(2.5rem, 1.5rem + 4vw, 5rem);
}
.tm-hero .tm-eyebrow { color: var(--accent); }
.tm-hero__title {
  margin: 0; max-width: 18ch; color: #fff;
  font-size: var(--tm-h1); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance;
}
.tm-hero__lead { margin: 1.25rem 0 0; max-width: 36em; color: var(--tm-on-dark); font-size: var(--tm-lead); font-weight: 500; line-height: 1.6; }
.tm-hero__coach {
  display: flex; align-items: center; gap: .85rem; margin: 1.75rem 0 0; padding-top: 1.25rem; max-width: 36em;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: var(--tm-on-dark-muted); font-size: var(--tm-small); font-weight: 500; line-height: 1.5;
}
.tm-hero__coach img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--navy-800); }
.tm-hero__coach a { color: #fff; font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tm-hero__coach a:hover { color: var(--accent); }

/* ---------- Buchung: Karte + Seitenspalte ---------- */
.tm-book { background: var(--bg); padding: var(--tm-section-y) var(--gutter); scroll-margin-top: var(--header-h); }
.tm-book__grid { display: grid; gap: clamp(2.5rem, 1.5rem + 3vw, 4rem); align-items: start; }
@media (min-width: 960px) {
  .tm-book__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(3rem, 5vw, 5rem); }
  .tm-side { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.tm-card {
  min-width: 0; padding: clamp(1.125rem, .75rem + 2vw, 2.25rem);
  background: #fff; border: var(--tm-border); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow);
  scroll-margin-top: calc(var(--header-h) + 12px);
}
@media (max-width: 479px) {
  /* Handy: etwas weniger Innenabstand, damit vier Tage bzw. Uhrzeiten nebeneinander passen */
  .tm-card { padding: 1.125rem 14px 1.25rem; }
}

/* Fortschritt */
.tm-progress {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem;
  margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: none;
}
.tm-progress li {
  display: flex; align-items: center; gap: .5rem; min-width: 0; padding-top: .6rem;
  border-top: 3px solid var(--line-soft); color: var(--muted);
  font-size: .875rem; font-weight: 600; line-height: 1.2;
}
.tm-progress__num {
  display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--bg); color: var(--muted); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tm-progress li.is-current, .tm-progress li[aria-current] { border-top-color: var(--accent); color: var(--navy-900); }
.tm-progress li.is-current .tm-progress__num, .tm-progress li[aria-current] .tm-progress__num { background: var(--accent); color: var(--navy-900); }
.tm-progress li.is-done { border-top-color: var(--accent-dark); color: var(--navy-900); }
.tm-progress li.is-done .tm-progress__num { background: var(--accent-soft); color: var(--accent-dark); }

.tm-step { display: grid; gap: 1.25rem; }
.tm-step__title {
  margin: 0; color: var(--navy-900);
  font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); font-weight: 750; line-height: 1.15; letter-spacing: -.02em;
}
.tm-step__title:focus { outline: none; }
.tm-step__title:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 4px; border-radius: 4px; }

.tm-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.tm-legend {
  display: block; width: 100%; padding: 0; margin: 0 0 .65rem;
  color: var(--ink); font-size: var(--fs-sm); font-weight: 600; line-height: 1.4;
}

/* Gemeinsame Optik der Auswahlfelder: echtes Radio unsichtbar darueber, Box daneben zeigt den Zustand */
.tm-day, .tm-time, .tm-option, .tm-chip { position: relative; display: block; min-width: 0; cursor: pointer; }
.tm-day > input, .tm-time > input, .tm-option > input, .tm-chip > input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.tm-day__box, .tm-time > span, .tm-option__body, .tm-chip > span {
  display: block; height: 100%; border: 1px solid var(--tm-pick-line); border-radius: 10px; background: #fff;
  color: var(--navy-900); transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.tm-day:hover .tm-day__box, .tm-time:hover > span, .tm-option:hover .tm-option__body, .tm-chip:hover > span { border-color: var(--navy-900); }
.tm-day > input:checked + .tm-day__box, .tm-time > input:checked + span,
.tm-option > input:checked + .tm-option__body, .tm-chip > input:checked + span {
  border-color: var(--navy-900); background: var(--navy-900); color: #fff;
}
.tm-day > input:focus-visible + .tm-day__box, .tm-time > input:focus-visible + span,
.tm-option > input:focus-visible + .tm-option__body, .tm-chip > input:focus-visible + span {
  outline: 2px solid var(--navy-900); outline-offset: 3px;
}
.has-error .tm-option__body, .has-error .tm-chip > span { border-color: var(--danger); }

/* Tage */
.tm-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .5rem; }
.tm-day__box { display: grid; justify-items: center; gap: .1rem; padding: .6rem .25rem .55rem; text-align: center; line-height: 1.2; }
.tm-day__wd { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tm-day__date { font-size: 1.0625rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.tm-day > input:checked + .tm-day__box .tm-day__wd { color: var(--tm-on-dark); }

/* Uhrzeiten */
.tm-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .5rem; }
.tm-time > span {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tm-error {
  margin: 0; padding: .8rem 1rem; border-radius: 8px; background: #fdecea; color: var(--danger);
  font-size: var(--tm-small); font-weight: 600; line-height: 1.45;
}

/* Gewaehlter Termin */
.tm-picked {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap;
  padding: .9rem 1rem; border-radius: 10px; background: var(--accent-soft);
}
.tm-picked__label { margin: 0; color: var(--accent-dark); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tm-picked__value { margin: .2rem 0 0; color: var(--navy-900); font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }

/* Formular (Grundlage: .form-field aus site.css) */
.tm-fields { display: grid; gap: 1.1rem; }
.tm-form .form-field input, .tm-form .form-field textarea { border-radius: 8px; }
.tm-form .form-field input:focus, .tm-form .form-field textarea:focus { border-color: var(--navy-900); box-shadow: 0 0 0 1px var(--navy-900); }
.tm-form .form-field textarea { min-height: 112px; }
.tm-form .form-field.has-error input:not([type="radio"]), .tm-form .form-field.has-error textarea { border-color: var(--danger); }
.tm-optional { margin-left: .25rem; color: var(--muted); font-weight: 500; }
.tm-options { display: grid; gap: .5rem; }
.tm-options--two { grid-template-columns: 1fr; }
@media (min-width: 420px) { .tm-options--two { grid-template-columns: 1fr 1fr; } }
.tm-option__body { display: grid; gap: .15rem; padding: .8rem 1rem; }
.tm-option__title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.tm-option__text { color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1.4; }
.tm-option > input:checked + .tm-option__body .tm-option__text { color: var(--tm-on-dark); }
.tm-options--chips { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .tm-options--chips { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); } }
.tm-chip > span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem .75rem;
  font-size: .9375rem; font-weight: 700; line-height: 1.25; text-align: center;
}
.tm-counter-row { display: flex; justify-content: space-between; gap: 1rem; }
.tm-counter { flex: none; font-variant-numeric: tabular-nums; }
.tm-counter.is-near { color: var(--danger); font-weight: 600; }
.tm-form .form-check { margin-top: .25rem; }
.tm-form .form-check a { color: inherit; }
.tm-form .form-alert a { color: var(--danger); font-weight: 700; }

/* Fast geschafft */
.tm-done { justify-items: start; }
.tm-done__icon { width: 44px; height: 44px; padding: 8px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); }
.tm-done__text { margin: 0; color: var(--text); font-size: var(--tm-lead); font-weight: 500; line-height: 1.6; }
.tm-done__text a { color: var(--navy-900); font-weight: 700; text-decoration-color: var(--accent-dark); text-underline-offset: 4px; }
.tm-done__text strong { color: var(--navy-900); overflow-wrap: anywhere; }
.tm-picked--done { width: 100%; }

/* Kein Termin / Fehler / alter Browser */
.tm-empty { display: grid; gap: 1rem; justify-items: start; }
.tm-empty__text { margin: 0; color: var(--muted); font-size: var(--tm-body); font-weight: 500; line-height: 1.6; }
.tm-empty__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
@media (max-width: 479px) { .tm-empty .tm-btn { width: 100%; } }

/* Seitenspalte */
.tm-side { min-width: 0; }
.tm-h2--next { margin-top: 2.25rem; }
.tm-next { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: tm-next; }
.tm-next li {
  position: relative; padding: 1rem 0 1rem 2.75rem; border-top: 1px solid var(--line-soft); counter-increment: tm-next;
}
.tm-next li::before {
  content: counter(tm-next, decimal-leading-zero); position: absolute; left: 0; top: 1.1rem;
  color: var(--accent-dark); font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tm-next__title { margin: 0; color: var(--navy-900); font-size: 1.0625rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.tm-next .tm-text { margin-top: .3rem; font-size: var(--tm-small); line-height: 1.55; }
.tm-side__alt { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: var(--tm-small); font-weight: 500; }

/* ---------- Seiten hinter den Mail-Links ---------- */
.tm-status-page { background: var(--bg); padding: clamp(2rem, 1rem + 4vw, 5rem) var(--gutter) clamp(3rem, 2rem + 4vw, 6rem); }
.tm-status-card {
  max-width: 600px; margin-inline: auto; padding: clamp(1.25rem, .75rem + 2vw, 2.5rem);
  background: #fff; border: var(--tm-border); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow);
}
.tm-status-title {
  margin: 0; color: var(--navy-900);
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance;
}
.tm-status-card > .tm-text { margin-top: 1rem; }
.tm-status-form { margin: 1.5rem 0 0; }
.tm-status-form--row { display: flex; flex-wrap: wrap; gap: .75rem; }
.tm-status-form--cancel { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }
.tm-status-actions { margin: 1.5rem 0 0; }
@media (max-width: 479px) {
  .tm-status-form--row .tm-btn, .tm-status-actions .tm-btn, .tm-status-form--cancel .tm-btn { width: 100%; }
}
.tm-summary { margin: 1.5rem 0 0; padding: 1rem 1.1rem; border-radius: 10px; background: var(--bg); }
.tm-status {
  display: inline-block; margin: 0 0 .75rem; padding: .25rem .65rem; border-radius: 999px;
  background: #fff; color: var(--navy-900); font-size: .8125rem; font-weight: 700; line-height: 1.3;
}
.tm-status--requested { background: var(--accent-soft); color: var(--accent-dark); }
.tm-status--confirmed { background: var(--accent); color: var(--navy-900); }
.tm-status--declined, .tm-status--cancelled_by_guest, .tm-status--cancelled_by_coach, .tm-status--expired { background: #fdecea; color: var(--danger); }
.tm-summary__list { display: grid; gap: .5rem; margin: 0; }
.tm-summary__list > div { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .75rem; }
.tm-summary__list dt { color: var(--muted); font-size: var(--tm-small); font-weight: 600; }
.tm-summary__list dd { margin: 0; color: var(--navy-900); font-size: 1rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.tm-summary__tz { color: var(--muted); font-weight: 500; font-size: var(--tm-small); }
.tm-summary__action { margin: 1rem 0 0; }
