/* The calendar continues the timeline instead of introducing another card. */
.termine-calendar-intro {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto 58px;
  padding: 26px 0;
  border-block: 1px solid rgba(201, 162, 39, .3);
  color: #302923;
}

.termine-calendar-intro::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  height: 58px;
  border-left: 1px solid #c9a227;
}

.termine-calendar-intro-copy {
  flex: 1;
  min-width: 0;
}

.termine-calendar-intro h2 {
  margin: 0 0 7px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.3;
  text-wrap: balance;
}

.termine-calendar-intro p {
  margin: 0;
  max-width: 48ch;
  color: #655e54;
  font-size: .94rem;
  line-height: 1.6;
}

.termine-calendar-intro > .termine-calendar-emblem,
.termine-calendar-intro > .termine-subscribe-mini-link {
  flex-shrink: 0;
}

.appointments-page .termine-roadmap {
  padding-bottom: 56px;
}

/* The old staff extended into the hero; it now starts below the calendar entry. */
.appointments-page .termine-calendar-intro + .termine-roadmap::before,
.appointments-page .termine-calendar-intro + .termine-roadmap::after {
  top: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

.appointments-page .termine-calendar-intro + .termine-roadmap::after {
  height: var(--termin-path-progress);
}

.termine-calendar {
  position: relative;
  padding: 52px 20px 58px;
  text-align: center;
  color: var(--color-text, #262321);
}

.termine-calendar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 38px;
  border-left: 1px solid #c9a227;
}

.termine-calendar-emblem {
  display: inline-flex;
  color: #aa8315;
}

.termine-calendar-emblem svg {
  width: 46px;
  height: 46px;
}

.termine-calendar-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 22px 0 12px;
}

.termine-calendar-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
  text-wrap: balance;
}

.termine-calendar-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #655e54;
  font: inherit;
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.termine-calendar-description {
  max-width: 43ch;
  margin: 0 auto 26px;
  color: #655e54;
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.termine-calendar-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.termine-subscribe-mini-link,
.termine-subscribe-mini-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 23px;
  border: 1px solid var(--color-primary, #d0021b);
  border-radius: 999px;
  font: 700 .9rem/1.4 Arial, Helvetica, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}

.termine-calendar-primary {
  background: var(--color-primary, #d0021b);
  color: #fff;
}

.termine-calendar-primary:hover {
  background: #a80217;
  color: #fff;
}

.termine-calendar-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  color: #655e54;
  font-size: .88rem;
  text-underline-offset: 4px;
}

.termine-calendar-download-option {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e8dfd5;
  font-size: .88rem;
  color: #655e54;
}

.termine-calendar-panels .termine-calendar-download-label {
  margin-bottom: 0;
  color: #302923;
  font-weight: 700;
}

.termine-calendar-download-option .termine-calendar-download {
  padding-left: 0;
  color: #a80217;
  font-weight: 700;
}

.termin-title-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.termin-calendar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  margin-top: 14px;
  color: #8c1222;
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.termin-calendar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #aa8315;
}

.termin-title-button:focus-visible,
.termin-calendar-link:focus-visible {
  outline: 2px solid #aa8315;
  outline-offset: 4px;
}

.termin-title-button:hover,
.termin-title-button:focus-visible {
  box-shadow: none !important;
  filter: none;
}

/* Readable inline fallback when scripting or native dialogs are unavailable. */
.termine-calendar-panels {
  max-width: 560px;
  margin: 28px auto 0;
  text-align: left;
  line-height: 1.65;
}

.termine-calendar-panels section + section {
  margin-top: 28px;
}

.termine-calendar-panels > section {
  scroll-margin-top: 120px;
}

.termine-calendar-dialog {
  position: fixed;
  inset: 0;
  width: min(560px, calc(100% - 32px));
  max-height: min(780px, calc(100dvh - 32px));
  margin: auto;
  padding: clamp(22px, 4vw, 36px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e8dfd5;
  border-radius: 22px;
  background: #fff;
  color: #302923;
  box-shadow: 0 24px 70px #21000030;
}

.termine-calendar-dialog::backdrop {
  background: #21000080;
}

.termine-calendar-dialog .termine-calendar-panels {
  margin: 0;
}

.termine-calendar-dialog [data-calendar-panel] {
  margin: 0;
}

.termine-calendar-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #655e54;
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.termine-calendar-kicker {
  margin: 0 40px 6px 0;
  color: #806119;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.termine-calendar-panels h2 {
  margin: 0 12px 22px 0;
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  line-height: 1.3;
}

.termine-calendar-panels h3 {
  margin: 22px 0 6px;
  font-size: 1rem;
}

.termine-calendar-panels p {
  margin: 0 0 12px;
}

.termine-calendar-providers details {
  border-top: 1px solid #e8dfd5;
}

.termine-calendar-providers details:last-child {
  border-bottom: 1px solid #e8dfd5;
}

.termine-calendar-providers summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 12px 4px;
  list-style: none;
  font-weight: 700;
  cursor: pointer;
}

.termine-calendar-providers {
  counter-reset: calendar-provider;
}

.termine-calendar-providers summary::before {
  counter-increment: calendar-provider;
  content: "0" counter(calendar-provider);
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  margin-right: 2px;
  border: 1px solid #e6d8b6;
  border-radius: 50%;
  color: #806119;
  font-size: .72rem;
}

.termine-calendar-providers summary::-webkit-details-marker {
  display: none;
}

.termine-calendar-providers summary::after {
  content: "+";
  color: #aa8315;
  font-size: 1.3rem;
  margin-left: auto;
}

.termine-calendar-providers details[open] > summary::after {
  content: "−";
}

.termine-calendar-instructions {
  padding: 0 4px 12px;
  font-size: .9rem;
}

.termine-calendar-instructions ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.termine-calendar-instructions li + li {
  margin-top: 8px;
}

.termine-calendar-instructions .termine-subscribe-mini-link {
  margin-bottom: 14px;
}

.termine-calendar-copy {
  margin-top: 24px;
}

.termine-calendar-copy label {
  display: block;
  margin-bottom: 8px;
  font-size: .88rem;
  font-weight: 700;
}

.termine-calendar-copy-row {
  display: flex;
  gap: 8px;
}

.termine-calendar-copy input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d8cdbb;
  border-radius: 10px;
  background: #faf8f4;
  color: #544d45;
  font: inherit;
  font-size: .85rem;
  user-select: text;
}

.termine-subscribe-mini-copy {
  flex-shrink: 0;
  padding: 10px 15px;
  background: #fff;
  color: var(--color-primary, #d0021b);
}

.termine-subscribe-mini-copy:disabled {
  opacity: .6;
  cursor: wait;
}

.termine-calendar-panels .termine-calendar-status {
  min-height: 1.65em;
  margin: 10px 0 0;
  color: #544d45;
  font-size: .85rem;
}

.termine-calendar :is(a, button, input, summary):focus-visible,
.termine-calendar-intro :is(a, button):focus-visible {
  outline: 2px solid #aa8315;
  outline-offset: 4px;
}

.mvo-calendar-is-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .termine-calendar-intro {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 42px;
    padding: 22px 16px;
  }

  .termine-calendar-intro .termine-calendar-emblem svg {
    width: 32px;
    height: 32px;
  }

  .termine-calendar-intro > .termine-subscribe-mini-link {
    grid-column: 2;
    justify-self: start;
  }

  .termine-calendar-intro::after {
    left: 28px;
    height: 42px;
  }

  /* Connect the mobile timeline on the left with its centered conclusion. */
  .termine-calendar::before {
    left: 28px;
    width: calc(50% - 28px);
    height: 24px;
    border-bottom: 1px solid #c9a227;
    border-radius: 0 0 0 18px;
  }
}

@media (max-width: 480px) {
  .termine-calendar-heading {
    gap: 2px;
  }

  .termine-calendar-copy-row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .termine-calendar :is(a, button),
  .termine-calendar-intro :is(a, button) {
    transition: none;
  }
}
