/* Öffentliche Terminbuchung – klare, luftige Buchungsseite in der Firmenfarbe (--tb-brand aus den Einstellungen).
   Nur hell. Keine Webfonts, keine Bibliotheken: schnell auch im Mobilnetz. */
:root {
  --tb-brand: #05173D; --tb-rgb: 5,23,61;      /* 19.19: Navy (34f12b); die Seite setzt die Firmenfarbe selbst */
  --tb-ink: #1a1a1a; --tb-ink-2: #4d5562; --tb-ink-3: #737b87;
  --tb-line: #E6E1D6; --tb-bg: #F4F2EC; --tb-card: #ffffff;   /* 19.19: warme Flächen (34f12b) */
  --tb-tint: rgba(var(--tb-rgb), .08); --tb-tint-2: rgba(var(--tb-rgb), .16);
  --tb-radius: 10px;
  --tb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tb { margin: 0; background: var(--tb-bg); color: var(--tb-ink); font: 16px/1.5 var(--tb-font); -webkit-font-smoothing: antialiased; }
body.tb-embed { background: transparent; }
a { color: var(--tb-brand); }
.tb-ico { flex: none; vertical-align: -3px; }
.tb-skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.tb-skip:focus { left: 8px; }
.tb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(var(--tb-rgb), .45); outline-offset: 2px; border-radius: 6px; }

.tb-wrap { padding: 56px 16px 24px; }
.tb-embed .tb-wrap { padding: 0; }
.tb-foot { text-align: center; color: var(--tb-ink-3); font-size: 13px; margin: 6px 0 28px; }
.tb-foot a { color: var(--tb-ink-3); }

/* Karte */
.tb-card { position: relative; background: var(--tb-card); border: 1px solid var(--tb-line); border-radius: var(--tb-radius);
  box-shadow: 0 1px 10px rgba(0,0,0,.06); margin: 0 auto; }
.tb-embed .tb-card { border: 0; box-shadow: none; border-radius: 0; }
.tb-book { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; max-width: 820px; min-height: 560px; transition: max-width .2s; }
.tb-book.has-day { max-width: 1060px; }
.tb-step-form { max-width: 1000px; }

/* Infospalte */
.tb-info { padding: 28px 26px; border-right: 1px solid var(--tb-line); }
.tb-logo { display: block; max-height: 44px; max-width: 180px; height: auto; width: auto; margin: 4px 0 20px; }
.tb-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tb-brand); color: #fff;
  font-weight: 700; font-size: 18px; letter-spacing: .5px; margin: 0 0 18px; }
.tb-back { position: absolute; top: 22px; left: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--tb-line); color: var(--tb-brand); background: #fff; }
.tb-back:hover { background: var(--tb-tint); }
.tb-back + .tb-logo, .tb-back + .tb-mark { margin-top: 52px; }
.tb-host { margin: 0 0 4px; color: var(--tb-ink-3); font-weight: 600; font-size: 15px; }
.tb-title { margin: 0 0 18px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.tb-meta { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; color: var(--tb-ink-2); font-weight: 600; font-size: 15px; }
.tb-meta li { display: flex; gap: 10px; align-items: flex-start; }
.tb-meta .tb-ico { margin-top: 3px; color: var(--tb-ink-3); }
.tb-meta-when { color: var(--tb-ink); }
.tb-meta-old { color: var(--tb-ink-3); font-weight: 500; }
.tb-desc { color: var(--tb-ink-2); font-size: 15px; line-height: 1.6; }

/* Hauptbereich */
.tb-main { padding: 28px 32px 32px; min-width: 0; }
.tb-h2 { margin: 2px 0 22px; font-size: 20px; font-weight: 700; }
.tb-cal-wrap { display: grid; grid-template-columns: 1fr; gap: 28px; }
.has-day .tb-cal-wrap { grid-template-columns: minmax(300px, 1fr) 220px; }
.tb-cal-head { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 0 0 16px; }
.tb-month { margin: 0; font-size: 16px; font-weight: 600; min-width: 150px; text-align: center; }
.tb-nav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--tb-brand); background: var(--tb-tint); }
.tb-nav:hover { background: var(--tb-tint-2); }
.tb-nav.is-off { color: #c3c7cd; background: transparent; }
.tb-grid { width: 100%; border-collapse: separate; border-spacing: 2px 6px; table-layout: fixed; }
.tb-grid th { font-size: 12px; font-weight: 600; color: var(--tb-ink-3); padding: 0 0 6px; letter-spacing: .04em; }
.tb-grid td { text-align: center; padding: 0; height: 48px; }
.tb-day { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 15px; color: #9aa0a8;
  position: relative; text-decoration: none; }
.tb-day.is-free { color: var(--tb-brand); background: var(--tb-tint); font-weight: 700; }
.tb-day.is-free:hover { background: var(--tb-tint-2); }
.tb-day.is-sel { background: var(--tb-brand); color: #fff; }
.tb-day.is-today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: currentColor; }
.tb-nofree { color: var(--tb-ink-3); font-size: 14px; text-align: center; margin: 4px 0 0; }
.tb-tz { margin-top: 18px; }
.tb-tz label { display: block; font-size: 15px; margin-bottom: 6px; }
.tb-tz-row { display: flex; align-items: center; gap: 8px; color: var(--tb-ink-2); flex-wrap: wrap; }
.tb-tz-row select { flex: 1 1 0; min-width: 0; }
.tb-tz select { border: 0; background: transparent; font: inherit; color: var(--tb-ink); padding: 6px 4px; max-width: 100%; cursor: pointer; }
.tb-tz-off { color: var(--tb-ink-3); font-size: 13px; }

/* Zeitslots */
.tb-slots { min-width: 0; }
.tb-slots-day { margin: 2px 0 18px; font-size: 16px; font-weight: 500; }
.tb-slot-list { list-style: none; margin: 0; padding: 0 4px 0 0; display: grid; gap: 10px; max-height: 452px; overflow-y: auto; }
.tb-slot { display: flex; align-items: center; justify-content: center; height: 52px; border: 1px solid rgba(var(--tb-rgb), .5); border-radius: 6px;
  color: var(--tb-brand); font-weight: 700; font-size: 16px; text-decoration: none; background: #fff; }
.tb-slot:hover { border: 2px solid var(--tb-brand); }
.tb-slot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-slot-pair .tb-slot-on { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 6px; background: #5f6670; color: #fff;
  font-weight: 700; }
.tb-slot-pair .tb-next { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 6px; background: var(--tb-brand); color: #fff;
  font-weight: 700; text-decoration: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* PLZ / Person */
.tb-plz, .tb-people { margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--tb-line); border-radius: 8px; background: #fafbfc; }
.tb-plz label, .tb-people label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.tb-plz-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tb-plz input { width: 140px; }
.tb-hint { margin: 8px 0 0; color: var(--tb-ink-3); font-size: 13.5px; }
.tb-err { color: #b42318; font-weight: 600; }
.tb-alert { background: #fdecea; color: #8a1c13; border: 1px solid #f5c2bc; border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; font-size: 15px; }
.tb-alert p { margin: 2px 0; }
.tb-empty { color: var(--tb-ink-3); padding: 18px 0; }

/* Formular */
.tb-form { max-width: 520px; }
.tb-field { margin: 0 0 18px; border: 0; padding: 0; }
.tb-field label, .tb-field legend { display: block; font-weight: 600; font-size: 15px; margin: 0 0 7px; padding: 0; }
.tb-req { color: #b42318; }
.tb-opt { color: var(--tb-ink-3); font-weight: 400; }
.tb input[type=text], .tb input:not([type]), .tb input[type=email], .tb input[type=tel], .tb textarea, .tb select:not([data-tz-select]) {
  width: 100%; font: inherit; color: var(--tb-ink); background: #fff; border: 1px solid #c9cdd3; border-radius: 8px; padding: 11px 13px; min-height: 46px; }
.tb textarea { min-height: 96px; resize: vertical; }
.tb input:focus, .tb textarea:focus, .tb select:focus { outline: none; border-color: var(--tb-brand); box-shadow: 0 0 0 3px rgba(var(--tb-rgb), .2); }
.tb-addr input + .tb-addr-row, .tb-addr-row { margin-top: 10px; }
.tb-addr-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.tb-choices { display: grid; gap: 8px; }
.tb-choice { display: flex !important; gap: 10px; align-items: center; font-weight: 400 !important; margin: 0 !important; padding: 10px 12px;
  border: 1px solid var(--tb-line); border-radius: 8px; cursor: pointer; }
.tb-choice:has(input:checked) { border-color: var(--tb-brand); background: var(--tb-tint); }
.tb-choice input { width: 18px; height: 18px; accent-color: var(--tb-brand); }
.tb-hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.tb-legal { color: var(--tb-ink-3); font-size: 13px; margin: 6px 0 18px; }
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--tb-brand); background: var(--tb-brand);
  color: #fff; font: inherit; font-weight: 700; border-radius: 999px; padding: 10px 20px; min-height: 44px; text-decoration: none; cursor: pointer; }
.tb-btn:hover { filter: brightness(.95); }
.tb-btn-sm { min-height: 46px; padding: 8px 18px; border-radius: 8px; }
.tb-btn-lg { padding: 13px 28px; font-size: 16px; }
.tb-btn-ghost { background: #fff; color: var(--tb-brand); }
.tb-btn-ghost:hover { background: var(--tb-tint); filter: none; }
.tb-btn-danger { background: #c4302b; border-color: #c4302b; }
.tb-btn[disabled] { opacity: .6; cursor: wait; }

/* Übersicht der Terminarten */
.tb-card-index { max-width: 780px; padding: 40px 40px 34px; }
.tb-index-head { text-align: center; border-bottom: 1px solid var(--tb-line); padding-bottom: 26px; margin-bottom: 26px; }
.tb-index-head .tb-logo { margin: 0 auto 16px; }
.tb-index-head .tb-mark { margin: 0 auto 14px; }
.tb-index-name { margin: 0; font-size: 22px; }
.tb-index-sub { margin: 4px 0 0; color: var(--tb-ink-3); font-weight: 600; }
.tb-index-intro { margin: 14px auto 0; max-width: 520px; color: var(--tb-ink-2); }
.tb-types { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tb-type { display: flex; gap: 14px; align-items: flex-start; padding: 20px 18px 20px 20px; border: 1px solid var(--tb-line); border-radius: 10px;
  text-decoration: none; color: var(--tb-ink); min-height: 112px; position: relative; background: #fff; }
.tb-type:hover { border-color: var(--tb-type, var(--tb-brand)); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.tb-type-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--tb-type, var(--tb-brand)); margin-top: 2px; }
.tb-done-type .tb-type-dot { display: inline-block; width: 14px; height: 14px; margin: 0 10px -1px 0; }
.tb-type-main { display: grid; gap: 5px; min-width: 0; flex: 1; }
.tb-type-name { font-weight: 700; font-size: 18px; }
.tb-type-meta { color: var(--tb-ink-2); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tb-type-meta .tb-ico { color: var(--tb-ink-3); }
.tb-sep { color: #c3c7cd; }
.tb-type-desc { color: var(--tb-ink-3); font-size: 14px; }
.tb-type-go { color: var(--tb-ink-3); align-self: center; }

/* Bestätigung */
.tb-card-done { max-width: 640px; padding: 40px 40px 34px; text-align: center; }
.tb-card-done .tb-logo { margin: 0 auto 20px; }
.tb-card-done .tb-mark { margin: 0 auto 18px; }
.tb-done-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 14px; background: #1f8a4c; color: #fff; }
.tb-done-icon.is-cancel { background: #8a8f98; }
.tb-done-h { margin: 0 0 6px; font-size: 24px; }
.tb-done-sub { margin: 0 auto 24px; color: var(--tb-ink-2); max-width: 460px; }
.tb-done-box { text-align: left; border: 1px solid var(--tb-line); border-radius: 10px; padding: 20px 22px; margin: 0 auto 22px; max-width: 480px; }
.tb-done-type { font-weight: 700; font-size: 18px; margin: 0 0 14px; }
.tb-done-box .tb-meta { margin: 0; }
.tb-addcal { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 18px; }
.tb-done-links { display: flex; gap: 12px; justify-content: center; font-weight: 600; margin: 0 0 10px; }
.tb-done-links span { color: #c3c7cd; }
.tb-answers { text-align: left; max-width: 480px; margin: 18px auto 0; color: var(--tb-ink-2); font-size: 14px; }
.tb-answers summary { cursor: pointer; font-weight: 600; }
.tb-answers dt { font-weight: 600; margin-top: 8px; }
.tb-answers dd { margin: 0; }
.muted { color: var(--tb-ink-3); }

/* Handy */
@media (max-width: 860px) {
  .tb-book, .tb-book.has-day { grid-template-columns: 1fr; max-width: 560px; }
  .tb-info { border-right: 0; border-bottom: 1px solid var(--tb-line); padding: 22px 20px 18px; }
  .tb-back { top: 16px; left: 16px; }
  .tb-main { padding: 22px 18px 26px; }
  .has-day .tb-cal-wrap { grid-template-columns: 1fr; }
  .tb-slot-list { max-height: none; grid-template-columns: 1fr 1fr; }
  .tb-slot-list li:has(.tb-slot-pair) { grid-column: 1 / -1; }
  .tb-wrap { padding: 16px 10px; }
  .tb-card-index, .tb-card-done { padding: 28px 18px 24px; }
  .tb-title { font-size: 22px; }
}
@media (max-width: 380px) { .tb-day { width: 38px; height: 38px; } .tb-grid td { height: 42px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 19.17: Profilbild des Mitarbeiters (wie Calendly) – rund, groß; ohne Bild Initialen im Türkis-Kreis (docs/DESIGN.md) */
.tb-avatar { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex: none;
  margin: 0 0 16px; background: #EEEBE3; box-shadow: 0 0 0 4px #fff, 0 0 0 5px #E6E1D6; }
.tb-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tb-avatar-ini { background: #3D6189; color: #fff; font-weight: 700; font-size: 30px; letter-spacing: .5px; }
.tb-back + .tb-avatar { margin-top: 52px; }
.tb-index-head .tb-avatar, .tb-card-done .tb-avatar { margin: 0 auto 16px; }
@media (max-width: 720px) {
  .tb-info .tb-avatar { width: 64px; height: 64px; margin-bottom: 12px; }
  .tb-info .tb-avatar-ini { font-size: 22px; }
  .tb-back + .tb-avatar { margin-top: 48px; }
}
