/* Room booking modal shell (BOOK-01). Mask markup + datepicker = same as the block. */

/* Easepick wrapper is injected after the date input; anchor above/below in this column. */
.booking-mask__field--date {
  position: relative;
  overflow: visible;
}

/*
 * Header booking strip (Ironmonger): picker extends over the hero sibling below.
 * Only at rest - do not override sticky-header.css (.is-sticky { position: fixed }).
 */
.site-header:has(.site-header__booking):not(.is-sticky):not(.is-sticky-out) {
  position: relative;
  z-index: 5;
}

.booking-overlay[hidden] {
  display: none !important;
}

.booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.booking-overlay.is-open {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.booking-overlay__scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.52);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.booking-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 3rem));
  margin: auto;
  padding: 2.75rem 1.625rem 1.625rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

.booking-overlay__panel .booking-mask .container {
  padding-inline: 0;
  max-width: none;
}

.booking-overlay .easepick-wrapper {
  --easepick-z-index: 110;
}

/* Portaled by booking-mask-dates.js (hero + booking overlay; mobile = bottom sheet). */
.easepick-wrapper--viewport-portal {
  z-index: 10150 !important;
}

html.booking-overlay-open .easepick-wrapper--viewport-portal {
  z-index: 10250 !important;
}

@media (min-width: 768px) {
  .booking-overlay.is-open {
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    min-height: 100%;
  }
}

@media (max-width: 767.98px) {
  .booking-overlay__panel {
    width: calc(100% - 1.25rem);
    max-width: none;
    margin: auto auto 0;
    padding: 2.75rem 1rem 1.25rem;
  }

  .booking-overlay.is-open {
    justify-content: flex-end;
  }
}

.booking-overlay__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dv-color-border, #dde9e7);
  background: var(--dv-color-bg, #fff);
  color: var(--dv-color-heading, #0e3d4a);
  cursor: pointer;
  line-height: 1;
  font-size: 1.25rem;
}

html.booking-overlay-open {
  overflow: hidden;
}
