.tbd-direct-page {
  margin: 0;
}

.tbd-booking {
  --tbd-columns: 1;
  box-sizing: border-box;
  width: 100%;
  padding: clamp(20px, 5vw, 64px) 16px;
  color: var(--tbd-text-color);
  background: var(--tbd-page-background);
  font-family: var(--tbd-font-family);
  font-size: var(--tbd-font-size);
  font-weight: var(--tbd-font-weight);
  line-height: 1.55;
}

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

.tbd-booking__box {
  width: min(100%, var(--tbd-form-width));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--tbd-border-color);
  border-radius: var(--tbd-radius);
  background: var(--tbd-box-background);
  box-shadow: var(--tbd-shadow);
}

.tbd-booking__header,
.tbd-booking__description,
.tbd-booking__facts,
.tbd-booking__instructions,
.tbd-booking__availability,
.tbd-booking__form,
.tbd-booking__footer {
  margin-block: 0 var(--tbd-spacing);
}

.tbd-booking__eyebrow {
  margin: 0 0 8px;
  color: var(--tbd-accent-color);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tbd-booking__title,
.tbd-booking h2,
.tbd-booking h3 {
  color: var(--tbd-text-color);
  line-height: 1.2;
}

.tbd-booking__title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.tbd-booking__intro,
.tbd-booking__description,
.tbd-booking__footer,
.tbd-field__help {
  color: var(--tbd-muted-color);
}

.tbd-booking__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--tbd-radius) * 0.75);
}

.tbd-booking__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tbd-booking__facts span {
  padding: 6px 10px;
  border: 1px solid var(--tbd-border-color);
  border-radius: 999px;
  color: var(--tbd-muted-color);
  font-size: 0.9em;
}

.tbd-booking__availability {
	padding: var(--tbd-spacing);
	border-radius: calc(var(--tbd-radius) * 0.75);
	background: var(--tbd-field-background);
	background: color-mix(in srgb, var(--tbd-accent-color) 8%, var(--tbd-box-background));
}

.tbd-booking--dark .tbd-booking__availability {
  background: rgba(0, 0, 0, 0.2);
}

.tbd-booking__availability h2,
.tbd-booking__availability h3 {
  margin: 0 0 12px;
  font-size: 1.1em;
}

.tbd-booking__availability h3 {
  margin-top: 20px;
}

.tbd-booking__phase-notice {
  margin: 0;
  padding: 12px 14px;
  border-inline-start: 4px solid var(--tbd-accent-color);
  color: var(--tbd-muted-color);
  background: var(--tbd-box-background);
}

.tbd-booking__slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}

.tbd-booking__slot {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--tbd-border-color);
  border-radius: var(--tbd-button-radius);
  color: var(--tbd-text-color);
  background: var(--tbd-available-color);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tbd-booking__slot:hover {
  color: var(--tbd-button-text-color);
  background: var(--tbd-hover-color);
}

.tbd-booking__slot.is-selected {
  color: var(--tbd-button-text-color);
  background: var(--tbd-selected-color);
}

.tbd-booking__notice {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-inline-start: 4px solid var(--tbd-accent-color);
  color: var(--tbd-muted-color);
  background: var(--tbd-box-background);
}

.tbd-booking__notice--error {
  border-inline-start-color: var(--tbd-error-color);
  color: var(--tbd-error-color);
}

.tbd-booking__notice--success {
  border-inline-start-color: var(--tbd-success-color);
  color: var(--tbd-success-color);
}

.tbd-booking__form {
  display: grid;
  grid-template-columns: repeat(var(--tbd-columns), minmax(0, 1fr));
  gap: var(--tbd-spacing);
}

.tbd-field,
.tbd-form-content {
  grid-column: span min(var(--tbd-column-span, var(--tbd-columns)), var(--tbd-columns));
  min-width: 0;
}

fieldset.tbd-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.tbd-field__label {
  display: block;
  margin-bottom: 7px;
  color: var(--tbd-text-color);
  font-weight: 600;
}

.tbd-booking .tbd-field__control {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--tbd-field-border-color, var(--tbd-border-color));
  border-radius: max(4px, calc(var(--tbd-radius) * 0.5));
  color: var(--tbd-text-color);
  background: var(--tbd-field-background);
  font: inherit;
}

textarea.tbd-field__control {
  min-height: 120px;
  resize: vertical;
}

.tbd-field__control:focus-visible,
.tbd-booking input:focus-visible,
.tbd-booking a:focus-visible,
.tbd-booking button:focus-visible {
	outline: 3px solid var(--tbd-accent-color);
  outline-offset: 2px;
}

.tbd-field__control:disabled,
.tbd-booking__submit:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.tbd-field__help {
  margin-top: 6px;
  font-size: 0.88em;
}

.tbd-field--choice label,
.tbd-field__options label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.tbd-field__options {
  display: grid;
  gap: 8px;
}

.tbd-booking a {
  color: var(--tbd-accent-color);
}

.tbd-booking__submit {
  min-height: 48px;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--tbd-button-radius);
  color: var(--tbd-button-text-color);
  background: var(--tbd-button-color);
  font: inherit;
  font-weight: 700;
}

.tbd-booking__submit:not(:disabled):hover {
  background: var(--tbd-hover-color);
  cursor: pointer;
}

.tbd-honeypot {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.tbd-booking-status {
  width: min(100% - 32px, 760px);
  margin: 40px auto;
  padding: 18px 20px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
}

.tbd-booking-status--error {
  border-inline-start: 5px solid #b42318;
}

@media (max-width: 767px) {
  .tbd-booking__form {
    grid-template-columns: 1fr;
  }

  .tbd-field,
  .tbd-form-content {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tbd-booking[data-tbd-animations="true"] .tbd-booking__box {
    transition: box-shadow 180ms ease, transform 180ms ease;
  }
}

/* Feste Farbprofile gelten auch für native Bedienelemente. */
.tbd-booking--dark { color-scheme: dark; }
.tbd-booking--light { color-scheme: light; }
.tbd-calendar [hidden] { display: none !important; }
.tbd-calendar__navigation { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 8px; margin-bottom: 20px; }
.tbd-calendar__title { margin: 0; text-align: center; color: var(--tbd-text-color); font-size: 1.15em; font-weight: 650; line-height: 1.4; }
.tbd-booking .tbd-calendar__arrow,
.tbd-booking .tbd-calendar__day,
.tbd-booking .tbd-calendar__retry { appearance: none; box-shadow: none; font: inherit; text-transform: none; letter-spacing: normal; cursor: pointer; }
.tbd-booking .tbd-calendar__arrow { display: grid; place-items: center; min-width: 0; width: 40px; height: 44px; padding: 0; border: 1px solid var(--tbd-border-color); border-radius: var(--tbd-button-radius); background: var(--tbd-box-background); color: var(--tbd-text-color); }
.tbd-calendar__weekdays, .tbd-calendar__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tbd-calendar__weekdays { margin-bottom: 10px; text-align: center; color: var(--tbd-muted-color); font-size: .8em; font-weight: 600; }
.tbd-booking .tbd-calendar__day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 48px; padding: 6px 0; border: 1px solid transparent; border-radius: var(--tbd-button-radius); color: var(--tbd-text-color); background: var(--tbd-available-color); font-weight: 650; line-height: 1.1; }
.tbd-calendar__day small { margin-top: 3px; font-size: .55em; font-weight: 500; }
.tbd-booking .tbd-calendar__day:disabled { color: var(--tbd-muted-color); background: var(--tbd-blocked-color); cursor: default; opacity: .65; }
.tbd-booking .tbd-calendar__arrow:disabled { opacity: .4; cursor: default; }
.tbd-booking .tbd-calendar__day:not(:disabled):hover, .tbd-booking .tbd-calendar__arrow:not(:disabled):hover { border-color: var(--tbd-accent-color); }
.tbd-booking .tbd-calendar__day[aria-pressed="true"] { background: var(--tbd-selected-color); color: var(--tbd-button-text-color); border-color: var(--tbd-text-color); }
.tbd-calendar__status { color: var(--tbd-muted-color); font-size: .88em; min-height: 1.55em; margin: 16px 0 10px; }
.tbd-calendar__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .72em; color: var(--tbd-muted-color); }
.tbd-calendar__legend span { display: inline-flex; align-items: center; gap: 5px; }
.tbd-calendar__legend span::before { content: ''; width: 10px; height: 10px; border: 1px solid var(--tbd-border-color); border-radius: 3px; background: var(--tbd-available-color); }
.tbd-calendar__legend span:nth-child(2)::before { background: var(--tbd-blocked-color); }
.tbd-calendar__legend span:nth-child(3)::before { background: var(--tbd-selected-color); }
.tbd-booking .tbd-calendar__retry { padding: 8px 12px; border: 1px solid var(--tbd-border-color); border-radius: var(--tbd-button-radius); color: var(--tbd-text-color); background: var(--tbd-box-background); }
@media (max-width: 480px) {
  .tbd-booking__box { padding: 18px 12px; }
  .tbd-booking__availability { padding: 16px 8px; }
  .tbd-calendar__days, .tbd-calendar__weekdays { gap: 3px; }
  .tbd-calendar__title { font-size: 1em; }
  .tbd-booking .tbd-calendar__day { min-height: 44px; }
}

.tbd-booking .tbd-calendar[data-density="compact"] .tbd-calendar__day { min-height: 44px; }

/* Eigene Buttonzustände: Theme-Farben dürfen keine Auswahl oder Buchung umlackieren. */
.tbd-booking button.tbd-booking__submit,
.tbd-booking button.tbd-booking__submit:is(:hover, :focus, :active) {
  appearance: none;
  border: 0;
  border-radius: var(--tbd-button-radius);
  color: var(--tbd-button-text-color);
  background: var(--tbd-button-color);
  background-image: none;
  box-shadow: none;
  text-shadow: none;
}
.tbd-booking button.tbd-booking__submit:not(:disabled):hover {
  background: var(--tbd-hover-color);
}
.tbd-booking button.tbd-calendar__day,
.tbd-booking button.tbd-calendar__day:is(:hover, :focus, :active),
.tbd-booking button.tbd-booking__slot,
.tbd-booking button.tbd-booking__slot:is(:hover, :focus, :active) {
  appearance: none;
  border-radius: var(--tbd-button-radius);
  border-color: var(--tbd-available-border-color, var(--tbd-choice-base-border, var(--tbd-border-color)));
  color: var(--tbd-choice-text, var(--tbd-available-text-color, var(--tbd-text-color)));
  background: var(--tbd-choice-background, var(--tbd-available-color));
  background-image: none;
  box-shadow: none;
  text-shadow: none;
}
.tbd-booking button.tbd-calendar__day { --tbd-choice-base-border: transparent; border-color: var(--tbd-available-border-color, transparent); }
.tbd-booking button.tbd-booking__slot { border-color: var(--tbd-available-border-color, var(--tbd-border-color)); }
.tbd-booking button.tbd-calendar__day:not(:disabled):is(:hover, :focus-visible, :active),
.tbd-booking button.tbd-booking__slot:not(:disabled):is(:hover, :focus-visible, :active) {
  --tbd-choice-text: var(--tbd-button-text-color);
  --tbd-choice-background: var(--tbd-hover-color);
}

.tbd-booking button.tbd-calendar__day[aria-pressed="true"],
.tbd-booking button.tbd-booking__slot.is-selected {
  --tbd-choice-text: var(--tbd-button-text-color);
  --tbd-choice-background: var(--tbd-selected-color);
  border-color: var(--tbd-accent-color);
  box-shadow: inset 0 0 0 2px var(--tbd-button-text-color);
}
.tbd-booking button.tbd-calendar__day:disabled {
  --tbd-choice-text: var(--tbd-muted-color);
  --tbd-choice-background: var(--tbd-blocked-color);
  border-color: transparent;
}
.tbd-booking button.tbd-calendar__arrow:is(:hover, :focus, :active),
.tbd-booking button.tbd-calendar__retry:is(:hover, :focus, :active) {
  color: var(--tbd-text-color);
  background: var(--tbd-box-background);
  background-image: none;
  box-shadow: none;
}
.tbd-booking input[type="checkbox"],
.tbd-booking input[type="radio"] { accent-color: var(--tbd-accent-color); }

.tbd-calendar__legend span:first-child::before { border-color: var(--tbd-available-border-color, var(--tbd-border-color)); }

/* Bewusst aktivierbare kompakte Ansicht; Feldreihenfolge und Beschriftungen bleiben erhalten. */
.tbd-booking.tbd-booking--compact { padding: 16px 12px; }
.tbd-booking--compact .tbd-booking__box { padding: 22px 24px; }
.tbd-booking--compact .tbd-booking__heading-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.tbd-booking--compact .tbd-booking__eyebrow { margin: 0; font-size: .72em; }
.tbd-booking--compact .tbd-booking__heading-meta .tbd-booking__facts { margin: 0; gap: 6px 12px; }
.tbd-booking--compact .tbd-booking__facts span { padding: 0; border: 0; border-radius: 0; font-size: .82em; }
.tbd-booking--compact .tbd-booking__title { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 6px; }
.tbd-booking--compact .tbd-booking__intro { font-size: .9em; line-height: 1.45; }
.tbd-booking--compact .tbd-booking__intro > :first-child { margin-top: 0; }
.tbd-booking--compact .tbd-booking__intro > :last-child { margin-bottom: 0; }
.tbd-booking--compact :is(.tbd-booking__header, .tbd-booking__description, .tbd-booking__instructions, .tbd-booking__availability, .tbd-booking__form) { margin-bottom: 14px; }
.tbd-booking--compact .tbd-booking__availability { padding: 14px 16px; }
.tbd-booking--compact .tbd-booking__availability h2 { margin-bottom: 8px; font-size: 1em; }
.tbd-booking--compact .tbd-booking__availability h3 { margin-top: 12px; margin-bottom: 8px; font-size: 1em; }
.tbd-booking--compact .tbd-calendar__navigation { margin-bottom: 8px; }
.tbd-booking--compact .tbd-calendar__title { font-size: 1em; }
.tbd-booking--compact .tbd-calendar__weekdays { margin-bottom: 6px; }
.tbd-booking--compact :is(.tbd-calendar__days,.tbd-calendar__weekdays) { gap: 4px; }
.tbd-booking.tbd-booking--compact .tbd-calendar .tbd-calendar__day { min-height: 38px; padding: 4px 0; font-size: 14px; }
.tbd-booking--compact .tbd-calendar__day small { font-size: 10px; margin-top: 2px; }
.tbd-booking--compact .tbd-calendar__status { margin: 8px 0 6px; font-size: .82em; }
.tbd-booking--compact .tbd-booking__notice { margin-top: 8px; padding: 8px 10px; }
.tbd-booking--compact .tbd-booking__form { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 12px 16px; }
.tbd-booking--compact .tbd-booking__form > :is(.tbd-field,.tbd-form-content) { grid-column: 1/-1; }
.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="first_name"],
.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="last_name"],
.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="email"],
.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="phone"] { grid-column: span 6; }
.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="participant_count"] { grid-column: span 3; min-width: 120px; }
.tbd-booking--compact .tbd-field__label { margin-bottom: 4px; font-size: .9em; }
.tbd-booking--compact .tbd-field__control { min-height: 42px; padding: 8px 10px; }
.tbd-booking--compact textarea.tbd-field__control { min-height: 88px; }
.tbd-booking--compact .tbd-booking__form > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .tbd-booking.tbd-booking--compact { padding: 10px 8px; }
  .tbd-booking--compact .tbd-booking__box { padding: 16px 12px; }
  .tbd-booking--compact .tbd-booking__availability { padding: 12px 8px; }
  .tbd-booking--compact .tbd-booking__form { display: flex; flex-direction: column; gap: 12px; }
  .tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="participant_count"] { width: 150px; max-width: 100%; }
  .tbd-booking.tbd-booking--compact .tbd-calendar .tbd-calendar__day { min-height: 44px; }
  .tbd-booking--compact .tbd-field__control { min-height: 44px; }
}

/* Prozentbreiten berücksichtigen Zwischenräume, ohne die Reihenfolge zu verändern. */
.tbd-booking .tbd-booking__form { display: flex; flex-wrap: wrap; --tbd-field-gap: var(--tbd-spacing); gap: var(--tbd-field-gap); }
.tbd-booking.tbd-booking--compact .tbd-booking__form { --tbd-field-gap: 16px; gap: 12px var(--tbd-field-gap); }
.tbd-booking .tbd-booking__form > :is(.tbd-field, .tbd-form-content) {
  flex: 0 0 calc((100% + var(--tbd-field-gap)) * var(--tbd-field-share, 1) - var(--tbd-field-gap));
  min-width: 0; max-width: 100%; overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .tbd-booking .tbd-booking__form { flex-direction: column; }
  .tbd-booking .tbd-booking__form > :is(.tbd-field, .tbd-form-content) { flex-basis: auto; width: 100%; }
  .tbd-booking.tbd-booking--compact .tbd-booking__form > [data-tbd-field-type="participant_count"][data-tbd-desktop-width="0"] { width: 150px; max-width: 100%; }
}

/* Nach erfolgreicher Buchung ersetzt die Zusammenfassung die gesamte Eingabe. */
.tbd-booking [data-tbd-booking-content][hidden],
.tbd-booking [data-tbd-confirmation][hidden] { display: none !important; }
.tbd-booking__confirmation { outline-offset: 6px; container-type: inline-size; }
.tbd-booking .tbd-booking__confirmation > .tbd-booking__eyebrow { margin: 0 0 12px; }
.tbd-booking .tbd-booking__confirmation > .tbd-booking__title { font-size: clamp(1.25rem, 3.5cqi, 2rem); line-height: 1.25; margin: 0 0 12px; }
.tbd-booking .tbd-booking__confirmation-mail { color: var(--tbd-accent-color); margin: 32px 0 0; }
.tbd-booking__summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px 24px; margin: 20px 0 0; }
.tbd-booking__summary dt { color: var(--tbd-muted-color); }
.tbd-booking__summary dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .tbd-booking__summary { grid-template-columns: 1fr; gap: 4px; }
  .tbd-booking__summary dd { margin-bottom: 12px; }
}

.tbd-booking .tbd-booking__privacy-link { margin-top: 8px; font-size: 0.875em; }
.tbd-booking .tbd-booking__privacy-link a { color: var(--tbd-text-color); text-decoration: underline; text-underline-offset: 0.2em; display: inline-block; padding: 6px 0; }

.tbd-booking__confirmation-close { margin: 24px 0 0; }
@media (min-width: 1024px) {
  .tbd-booking:has(> .tbd-booking__box > [data-tbd-confirmation]:not([hidden])) {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
  }
}

/* Keep the provider widget below the button without an additional frame. */
.tbd-booking .tbd-booking__turnstile { width: 300px; max-width: 100%; margin-top: 20px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.tbd-booking .tbd-booking__turnstile [data-tbd-turnstile] { max-width: 300px; padding: 0; border: 0; background: transparent; }

/* Keep appointment metadata and description on larger screens only. */
@media (max-width: 767px) {
  .tbd-booking .tbd-booking__facts,
  .tbd-booking .tbd-booking__description { display: none; }
}

/* Numbered sections share the saved light/dark design values. */
.tbd-booking .tbd-booking__step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.35;
}
.tbd-booking__form > .tbd-booking__step-heading { margin: 0; }
.tbd-booking__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.8em;
  width: 1.8em;
  height: 1.8em;
  border: 1px solid var(--tbd-accent-color);
  border-radius: 50%;
  color: var(--tbd-text-color);
  font-size: .85em;
  line-height: 1;
}

/* A button remains keyboard accessible while appearing as a quiet text link. */
.tbd-booking button.tbd-booking__renew {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 0;
  min-height: 44px;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tbd-text-color);
  font: inherit;
  font-size: .9em;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .2em;
  white-space: normal;
  cursor: pointer;
}
.tbd-booking button.tbd-booking__renew:hover { color: var(--tbd-accent-color); background: transparent; }
.tbd-booking button.tbd-booking__renew[hidden] { display: none !important; }
.tbd-booking button.tbd-booking__renew[aria-disabled="true"] { cursor: wait; }

/* Make the final booking action clearly readable in both colour modes. */
.tbd-booking button.tbd-booking__submit { font-weight: 700; }
