/* ============================================================
   Termin-Modal (cal.com im Talara-Rahmen).
   Eigenstaendig, damit index.html, kontakt.html und /sichtbar/
   dieselbe Datei einbinden koennen. Nutzt die Farbvariablen der
   jeweiligen Seite, mit Fallback auf die Talara-Werte.
   ============================================================ */

.tb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: clamp(0px, 3vw, 40px);
}
.tb-overlay[hidden] { display: none; }

.tb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 39, 31, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: tb-fade .22s ease both;
}

.tb-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1060px, 100%);
  max-height: min(92vh, 880px);
  background: var(--paper, #f3e7c5);
  color: var(--ink, #17271f);
  border: 2px solid var(--ink, #17271f);
  border-radius: 16px;
  box-shadow: 8px 8px 0 var(--brick, #b4472c), 0 40px 90px rgba(23, 39, 31, .45);
  overflow: hidden;
  animation: tb-rise .28s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tb-backdrop, .tb-panel { animation: none; }
}

/* ---- Kopf ---- */
.tb-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--line, rgba(23, 39, 31, .19));
  flex: 0 0 auto;
}
.tb-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--forest, #1e3328);
  overflow: hidden;
}
/* Wie .brand-mark auf den uebrigen Seiten: die Marke sitzt IM Kreis,
   nicht formatfuellend — sonst ragen die Strahlen ueber den Rand. */
.tb-mark img { width: 70%; height: 70%; display: block; object-fit: contain; }
.tb-headtext { flex: 1; min-width: 0; }
.tb-eyebrow {
  margin: 0 0 .18rem;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brick, #b4472c);
}
.tb-head h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif; font-weight: 800; letter-spacing: -.02em;
  font-weight: 400;
  font-size: clamp(1.02rem, 2.1vw, 1.4rem);
  letter-spacing: -.05em;
  line-height: 1.05;
}
.tb-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border: 1.5px solid var(--line, rgba(23, 39, 31, .19));
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.tb-close:hover { background: var(--ink, #17271f); color: var(--paper, #f3e7c5); transform: rotate(90deg); }
.tb-close svg { width: 16px; height: 16px; }

/* ---- Buchungsflaeche ---- */
.tb-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.tb-cal { width: 100%; min-height: 460px; }
.tb-cal iframe { border: 0; display: block; }

.tb-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  text-align: center;
  padding: 2rem;
  background: var(--paper, #f3e7c5);
  color: var(--olive, #66705b);
  font-size: .88rem;
}
.tb-loading[hidden] { display: none; }
.tb-dots { display: flex; gap: .4rem; }
.tb-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest, #1e3328);
  opacity: .25;
  animation: tb-pulse 1.1s ease-in-out infinite;
}
.tb-dots i:nth-child(2) { animation-delay: .16s; }
.tb-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes tb-pulse { 0%, 100% { opacity: .22; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tb-dots i { animation: none; opacity: .55; } }

.tb-fallback { max-width: 34ch; line-height: 1.5; }
.tb-fallback a { text-decoration: underline; font-weight: 700; color: var(--ink, #17271f); }

/* ---- Fuss: Talara-Marke statt cal.com-Branding ---- */
.tb-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .62rem 1.15rem calc(.62rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, rgba(23, 39, 31, .19));
  font-size: .76rem;
  color: var(--olive, #66705b);
}
.tb-foot-mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--forest, #1e3328);
  overflow: hidden;
}
.tb-foot-mark img { width: 70%; height: 70%; display: block; object-fit: contain; }
.tb-foot b { color: var(--ink, #17271f); font-weight: 800; }

/* ---- Mobil: Vollbild-Sheet ---- */
@media (max-width: 760px) {
  .tb-overlay { padding: 0; }
  .tb-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .tb-head { padding: calc(.8rem + env(safe-area-inset-top, 0px)) 1rem .8rem; }
  .tb-foot { font-size: .72rem; }
}
/* Auf schmalen Geraeten bleibt im Fuss nur das Wesentliche in einer Zeile */
@media (max-width: 560px) {
  .tb-foot-long { display: none; }
}

/* Seiten-Scroll sperren, solange das Modal offen ist */
html.tb-open, body.tb-open { overflow: hidden; }
