/* Desktop checkout: a single scrolling panel with a separate footer row. */
@media (min-width: 981px) {
  html.daba-desktop-checkout-viewport,
  body.daba-desktop-checkout-ready {
    overflow: hidden;
    overscroll-behavior-y: none;
  }
  body.daba-desktop-checkout-ready .daba-style.has-wp-menu .mdl-reserva {
    position: fixed;
    top: var(--daba-desktop-header-offset, 113px);
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    /* Unlike hidden, clip also prevents scrollIntoView from scrolling this shell. */
    overflow: clip;
  }
  body.daba-desktop-checkout-ready .daba-style.has-wp-menu .mdl-content {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body.daba-desktop-checkout-ready .daba-style.has-wp-menu .mdl-content > .mdl-container {
    min-height: 0;
  }
  body.daba-desktop-checkout-ready .daba-style.has-wp-menu .mdl-footer {
    flex: 0 0 auto;
    position: relative;
  }
}

/* Reservation heading: shared desktop presentation for the train sites. */
.daba-style .nattivus-reservas-intro {
  max-width: 900px;
  margin: 0 auto 34px !important;
  padding: 8px 30px 25px !important;
  text-align: center !important;
  position: relative;
}
.daba-style .nattivus-reservas-kicker {
  color: #c39d63 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 2.5px !important;
  text-transform: uppercase !important;
  margin-bottom: 12px !important;
}
.daba-style .nattivus-reservas-kicker::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 12px auto 0;
  background: #c39d63;
}
.daba-style .nattivus-reservas-intro h1 {
  color: #1f1f1f !important;
  font-family: 'Martel', Georgia, serif !important;
  font-size: 32px !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
  letter-spacing: -0.3px !important;
  text-align: center !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}
.daba-style .nattivus-reservas-intro p {
  max-width: 720px;
  margin: 0 auto !important;
  padding: 0 !important;
  color: #6a6a6a !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
  text-align: center !important;
}
.daba-style .nattivus-reservas-intro::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 760px;
  height: 1px;
  margin: 26px auto 0;
  background: rgba(195, 157, 99, 0.22);
}

@media (max-width: 980px) {
  /* Only the booking content scrolls; the outer document must not scroll too. */
  html.daba-mobile-checkout-viewport,
  body.daba-mobile-header-ready {
    overflow: hidden;
    overscroll-behavior-y: none;
  }
  body.daba-mobile-header-ready #main-header,
  body.daba-mobile-header-ready #top-header,
  body.daba-mobile-header-ready #open-button {
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
  }
  body.daba-mobile-header-hidden #main-header,
  body.daba-mobile-header-hidden #top-header,
  body.daba-mobile-header-hidden #open-button {
    transform: translateY(calc(-1 * var(--daba-mobile-header-distance, 160px))) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  body.daba-mobile-header-ready .daba-style.has-wp-menu .mdl-reserva {
    position: fixed;
    top: calc(var(--daba-mobile-header-offset, 80px) + var(--daba-mobile-page-top, 0px));
    left: 0;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: calc(100vh - var(--daba-mobile-header-offset, 80px) - var(--daba-mobile-page-top, 0px));
    height: calc(100dvh - var(--daba-mobile-header-offset, 80px) - var(--daba-mobile-page-top, 0px));
  }
  body.daba-mobile-header-hidden .daba-style.has-wp-menu .mdl-reserva {
    top: var(--daba-mobile-page-top, 0px);
    height: calc(100vh - var(--daba-mobile-page-top, 0px));
    height: calc(100dvh - var(--daba-mobile-page-top, 0px));
  }
  body.daba-mobile-header-ready .daba-style.has-wp-menu .mdl-content {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body.daba-mobile-header-ready .daba-style.has-wp-menu .mdl-content > .mdl-container { min-height: 0; }
  body.daba-mobile-header-ready .daba-style.has-wp-menu .mdl-footer { flex: 0 0 auto; }
}
@media (max-width: 980px) and (prefers-reduced-motion: reduce) {
  body.daba-mobile-header-ready #main-header,
  body.daba-mobile-header-ready #top-header,
  body.daba-mobile-header-ready #open-button { transition: none; }
}

/* Show a compact page heading only while choosing a season or departure. */
@media (max-width: 980px) {
  .daba-style .mdl-content .nattivus-reservas-intro {
    margin: 0 auto 18px !important;
    padding: 12px 0 0 !important;
  }
  .daba-style .mdl-content .nattivus-reservas-intro h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
  }
  .daba-style .mdl-content .nattivus-reservas-intro .nattivus-reservas-kicker,
  .daba-style .mdl-content .nattivus-reservas-intro > p,
  .daba-style .mdl-content .nattivus-reservas-intro::after {
    display: none !important;
  }
  /* The date grid, rather than a remembered selection, determines the view.
     Returning through browser history can retain the previous card's class. */
  .daba-style .mdl-content:has(#step2.active .m-dates-grid-container[style*="display: none"]) .nattivus-reservas-intro,
  .daba-style .mdl-content:has(.m-step-content.active:not(#step1):not(#step2)) .nattivus-reservas-intro {
    display: none !important;
  }
}

@media (max-width: 980px) {
  /* Keep the introduction visible when the wizard scrolls to the date step. */
  .daba-style .mdl-content #step2 { scroll-margin-top: 240px; }
}
