/* NYALA MOBILE POPUPS V2.2 */
@media screen and (max-width: 767px) {

  html {
    --nyala-v22-dock: calc(
      94px + env(safe-area-inset-bottom, 0px)
    );
  }

  /* Keep the dock accessible during all popups. */
  html body .nyala-bar-v20,
  html body.single-experience.nyala-investment-v21-open .nyala-bar-v20,
  html body.single-experience.nyala-booking-v21-open .nyala-bar-v20 {
    z-index: 100700 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Center Investment in the space above the dock. */
  html body.single-experience
  .nyala-investment-v3__panel:not([hidden]) {
    top: calc((100dvh - var(--nyala-v22-dock)) / 2) !important;
    max-height: calc(
      100dvh - var(--nyala-v22-dock) - 28px
    ) !important;
    overflow-y: auto !important;
  }

  /* Precisely centered SVG close button. */
  html body.single-experience .nyala-investment-v3__close {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    line-height: 1 !important;
  }

  .nyala-investment-v3__close svg {
    display: block;
    width: 19px;
    height: 19px;
  }

  /* Search: independent centered popup, not a bottom sheet. */
  html body .nyala-experience-search__modal:not([hidden]),
  html body.single-experience .nyala-experience-search__modal:not([hidden]),
  html body .nyala-activity-search__modal:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 14px 16px calc(var(--nyala-v22-dock) + 14px) !important;
    z-index: 100050 !important;
  }

  html body .nyala-experience-search__panel,
  html body.single-experience .nyala-experience-search__panel,
  html body .nyala-activity-search__sheet {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 440px !important;
    max-height: calc(
      100dvh - var(--nyala-v22-dock) - 28px
    ) !important;
    margin: 0 !important;
    padding: 24px 20px !important;
    box-sizing: border-box !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
    color: #17212b !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 65px rgba(8,18,30,.3) !important;
  }

  /* Consultation and Booking share the same safe viewport. */
  html body .nyala-bar-v20__modal:not([hidden]) {
    padding: 14px 16px calc(var(--nyala-v22-dock) + 14px) !important;
  }

  html body .nyala-bar-v20__panel {
    max-height: calc(
      100dvh - var(--nyala-v22-dock) - 28px
    ) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  html body .nyala-bar-v20__modal:not([hidden]) {
    z-index: 100500 !important;
  }
}

/* NYALA POPUP LAYER CSS V2.2.1 */
@media screen and (max-width: 767px) {

  html body .nyala-experience-search__modal:not([hidden]),
  html body .nyala-activity-search__modal:not([hidden]) {
    z-index: 2147483000 !important;
  }

  html body .nyala-bar-v20 {
    z-index: 2147483001 !important;
  }

  html body .nyala-experience-search__modal {
    --search-navy: #17212B;
  }

  /* Consultation and Booking close button */
  html body .nyala-bar-v20__modal
  .nyala-bar-v20__close {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
  }

  html body .nyala-bar-v20__modal
  .nyala-bar-v20__close::before,
  html body .nyala-bar-v20__modal
  .nyala-bar-v20__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    pointer-events: none;
  }

  html body .nyala-bar-v20__modal
  .nyala-bar-v20__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  html body .nyala-bar-v20__modal
  .nyala-bar-v20__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}
/* END NYALA POPUP LAYER CSS V2.2.1 */
