/* ==========================================================================
   Terminbuchung – Ausgabe

   Grundsatz wie im Child-Theme: KEINE font-family. Schriftarten kommen
   ausschliesslich aus Uncode (Theme Options). Hier stehen nur Groesse,
   Laufweite, Abstaende und Linien.

   Farben laufen ueber currentColor (passt sich hellen und dunklen Sektionen
   von selbst an) und ueber die Tokens der Palette: --pgs-rule, --pgs-moss.
   Trennung durch Haarlinien und Weissraum, nie durch Kaesten und Schatten.

   Eigene Links sind mit .ttm praefixiert, sonst gewinnt Uncodes
   .style-light a { color: #303133 } (Spezifitaet 0,1,1).
   ========================================================================== */

.ttm {
  --ttm-rule:   var(--pgs-rule, #C6CDBC);
  --ttm-accent: var(--pgs-moss, #435331);
  --ttm-ease:   cubic-bezier(.22, .61, .36, 1);
  --ttm-hoehe:  760px;
  --ttm-hoehe-mobil: 1040px;

  color: inherit;
  scroll-margin-top: 120px;
}

.ttm *,
.ttm *::before,
.ttm *::after { box-sizing: border-box; }

/* -------------------------------------------------- Kopfzeile */

.ttm__kopf { margin-bottom: 2rem; }

.ttm__sub {
  margin: 0 0 .35em;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ttm-accent);
}

.ttm__head {
  margin: 0;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.ttm__text {
  margin-top: .9rem;
  max-width: 60ch;
  opacity: .82;
}

.ttm__text p:last-child { margin-bottom: 0; }

/* -------------------------------------------------- Standortumschaltung */

.ttm__standorte {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--ttm-rule);
}

.ttm .ttm__standort {
  margin: 0 0 -1px;
  padding: 0 0 .7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: currentColor;
  opacity: .6;
  cursor: pointer;
  transition: opacity .3s var(--ttm-ease), border-color .3s var(--ttm-ease);
}

.ttm .ttm__standort:hover,
.ttm .ttm__standort:focus-visible { opacity: 1; }

.ttm .ttm__standort.is-aktiv {
  opacity: 1;
  border-bottom-color: currentColor;
}

.ttm .ttm__standort:focus-visible {
  outline: 2px solid var(--ttm-accent);
  outline-offset: 4px;
}

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

/* Die Hoehe ist nur der Startwert, bis Calendly seine eigene meldet
   (calendly.page_height). Ohne das bliebe unter dem kurzen Formularschritt
   eine Luecke bis zur Fusszeile stehen. */
.ttm__kalender {
  min-height: var(--ttm-hoehe);
  transition: height .35s var(--ttm-ease);
}

/* Solange das Widget nicht gebaut ist, steht hier der noscript-Hinweis. */
.ttm__kalender noscript {
  display: block;
  padding: 2rem 0;
  border-top: 1px solid var(--ttm-rule);
  border-bottom: 1px solid var(--ttm-rule);
}

.ttm__kalender iframe { display: block; }

/* -------------------------------------------------- Bestaetigung */

.ttm__danke {
  margin: 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--ttm-rule);
  border-bottom: 1px solid var(--ttm-rule);
  font-size: 1.125rem;
  max-width: 52ch;
}

/* -------------------------------------------------- Fusszeile und Rueckfall */

/* Der Kalender zentriert seine Karte selbst – die Fusszeile steht deshalb
   mittig darunter und nicht linksbuendig unter einer zentrierten Flaeche. */
.ttm__fuss {
  margin: 1.25rem 0 0;
  font-size: .9375rem;
  text-align: center;
  opacity: .8;
}

.ttm__rueckfall {
  margin: 1.5rem 0 0;
  font-size: .9375rem;
  opacity: .8;
}

.ttm__rueckfall {
  margin-top: 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--ttm-rule);
  border-bottom: 1px solid var(--ttm-rule);
  font-size: 1.0625rem;
  opacity: 1;
}

.ttm .ttm__link {
  color: currentColor;
  text-decoration: none;
  border-bottom: 1px solid var(--ttm-rule);
  transition: border-color .3s var(--ttm-ease);
}

.ttm .ttm__link:hover,
.ttm .ttm__link:focus-visible { border-bottom-color: currentColor; }

.ttm__trenner { margin: 0 .5em; opacity: .5; }

.ttm__zeiten {
  display: block;
  margin-top: .35em;
  opacity: .75;
}

/* -------------------------------------------------- Mobil */

@media (max-width: 959px) {
  .ttm__kalender { min-height: var(--ttm-hoehe-mobil); }

  .ttm__standorte { gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ttm .ttm__standort,
  .ttm .ttm__link,
  .ttm__kalender { transition: none; }
}
