/* ═══════════════════════════════════════════════════════════════
 * KOPFPUNK Termine — Seite /termin/ (page-termin.php)
 * Baut auf main.css auf (Variablen, .marker, .kontakt-form).
 * ═══════════════════════════════════════════════════════════════ */

/* ─── Intro (dunkel, wie About) ─────────────────────────────── */

.tm-intro {
  padding: 10rem 0 5rem;
  background: var(--black);
  color: var(--paper);
}
.tm-intro-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.tm-intro-headline .marker { line-height: 1.35; }
.tm-intro-headline .marker-white { color: var(--paper); }
.tm-intro-lead {
  max-width: 720px;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.5;
  color: rgba(250, 250, 250, 0.82);
}

/* ─── Buchungsbereich ───────────────────────────────────────── */

.tm-buchung {
  background: #FFFFFF;
  color: var(--black);
  padding: 6rem 0 9rem;
}
.tm-app { max-width: 1100px; }

.tm-step { margin-bottom: 5rem; scroll-margin-top: 7rem; }
.tm-step[hidden] { display: none; }

.tm-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 2rem;
}
.tm-step-nr {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  background: var(--black);
  color: var(--lime);
  padding: 0.25em 0.55em;
  transform: translateY(-0.35em);
}
.tm-step-sub {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: none;
  color: rgba(10, 10, 10, 0.55);
}

/* ─── 01 · Terminarten ──────────────────────────────────────── */

.tm-arten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.tm-art {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  background: transparent;
  border: 2px solid var(--black);
  color: var(--black);
  padding: 1.3rem 1.4rem 1.4rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tm-art:hover { background: var(--lime); }
.tm-art.is-active { background: var(--black); color: var(--paper); }
.tm-art-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.65;
}
.tm-art.is-active .tm-art-meta { color: var(--lime); opacity: 1; }
.tm-art-titel {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  text-transform: uppercase;
}
.tm-art-text { font-size: 1rem; line-height: 1.4; opacity: 0.8; }

/* ─── 02 · Woche ────────────────────────────────────────────── */

.tm-woche-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.tm-nav {
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--black);
  background: transparent;
  color: var(--black);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.tm-nav:hover:not(:disabled) { background: var(--lime); }
.tm-nav:disabled { opacity: 0.2; cursor: default; }
.tm-woche-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  text-transform: uppercase;
  min-width: 13rem;
}
.tm-zeitraum {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.9rem;
  margin-left: 0.6rem;
  color: rgba(10, 10, 10, 0.55);
}

.tm-hinweis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.5rem;
  background: var(--black);
  color: var(--paper);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}
.tm-hinweis[hidden] { display: none; }
.tm-hinweis-btn {
  background: var(--lime);
  color: var(--black);
  border: none;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.tm-hinweis-btn:hover { background: var(--paper); }

.tm-tage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(10, 10, 10, 0.12);
  border: 1px solid rgba(10, 10, 10, 0.12);
  min-height: 14rem;
  transition: opacity 0.2s ease;
}
.tm-tage.is-loading { opacity: 0.35; pointer-events: none; }
.tm-laden {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: rgba(10, 10, 10, 0.5);
}
.tm-tag {
  background: #FFFFFF;
  padding: 1.1rem 1rem 1.3rem;
}
.tm-tag-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--black);
}
.tm-tag.is-zu .tm-tag-kopf { border-bottom-color: rgba(10, 10, 10, 0.15); }
.tm-tag-wt {
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  line-height: 1;
}
.tm-tag-datum {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(10, 10, 10, 0.55);
}
.tm-tag.is-zu .tm-tag-wt { color: rgba(10, 10, 10, 0.3); }

.tm-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.3rem, 1fr));
  gap: 0.4rem;
}
.tm-slot {
  background: transparent;
  border: 1px solid rgba(10, 10, 10, 0.3);
  color: var(--black);
  padding: 0.55rem 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tm-slot:hover { background: var(--lime); border-color: var(--lime); }
.tm-slot.is-active { background: var(--black); border-color: var(--black); color: var(--lime); }
.tm-tag-status {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(10, 10, 10, 0.4);
  padding: 0.6rem 0;
}

/* ─── 03 · Formular ─────────────────────────────────────────── */

.tm-form.kontakt-form { margin-top: 0; max-width: 820px; }
.tm-auswahl {
  font-size: 1.25rem;
  margin: -0.8rem 0 2.5rem;
}
.tm-auswahl strong {
  background: var(--lime);
  padding: 0.05em 0.35em;
}
.tm-hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; pointer-events: none; }
.kontakt-form .is-invalid { border-bottom-color: #E2241A !important; }

.tm-check {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(10, 10, 10, 0.75);
  cursor: pointer;
}
.kontakt-form .tm-check input {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.1rem;
  padding: 0;
  border: 2px solid var(--black);
  background: transparent;
  cursor: pointer;
}
.kontakt-form .tm-check input:checked {
  background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23CCFF00' stroke-width='2.4'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.kontakt-form .tm-check.is-invalid input { border-color: #E2241A; }
.tm-check a { color: var(--black); text-decoration: underline; }

.tm-fehler {
  margin-top: 1.5rem;
  color: #E2241A;
  font-size: 1.1rem;
}
.tm-fehler[hidden] { display: none; }

.tm-form .form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.kontakt-form button.tm-zurueck {
  background: transparent;
  color: var(--black);
  padding: 1.1rem 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.kontakt-form button.tm-zurueck:hover { background: transparent; color: var(--black); text-decoration-color: var(--lime); }
.kontakt-form button:disabled { opacity: 0.5; cursor: wait; }

/* ─── Fertig / Offline ──────────────────────────────────────── */

/* Nach der Buchung: Intro „Let's Talk.“ ausblenden, „Steht.“ steht oben */
.tm-ist-fertig .tm-intro { display: none; }
.tm-ist-fertig .tm-buchung { padding-top: 11rem; min-height: 70vh; }
@media (max-width: 768px) {
  .tm-ist-fertig .tm-buchung { padding-top: 8rem; }
}

.tm-fertig[hidden], .tm-offline[hidden] { display: none; }
.tm-fertig-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
}
.tm-fertig-head .marker { line-height: 1.4; }
.tm-fertig-text {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  max-width: 680px;
  line-height: 1.5;
}

.tm-offline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.tm-offline-links a {
  background: var(--black);
  color: var(--lime);
  padding: 1rem 1.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tm-offline-links a:hover { background: var(--lime); color: var(--black); }

/* ─── Mobil ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .tm-intro { padding: 7rem 0 3.5rem; }
  .tm-buchung { padding: 4rem 0 6rem; }
  .tm-step { margin-bottom: 3.5rem; }
  .tm-tage { grid-template-columns: 1fr; }
  .tm-tag {
    display: grid;
    grid-template-columns: 4.2rem 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 1rem;
  }
  .tm-tag-kopf {
    flex-direction: column;
    gap: 0.2rem;
    border-bottom: none;
    margin: 0;
    padding: 0.35rem 0 0;
  }
  .tm-slots { grid-template-columns: repeat(3, 1fr); }
  .tm-woche-label { min-width: 0; font-size: 1.2rem; }
  .tm-zeitraum { display: block; margin: 0.15rem 0 0; }
}
