/* mabul.com Phase 14 - phones (767 px and below, where the dark bar exists): the menu / Book Now row stays at the top.
   The header itself is sticky, offset by the height of the phone + language row, so only the bar remains on screen
   and nothing leaves the page flow: no placeholder, no jump. Wider screens are untouched. */
@media (max-width: 767px) {
  html { scroll-padding-top: calc(var(--mb-bar-h, 76px) + 8px); }

  /* `hidden` would make this wrapper the scroller and stop sticky; `clip` cuts the same overflow without that.
     A browser without `clip` keeps `hidden`: the bar then simply scrolls away as it does today. */
  #page_wrapper { overflow: hidden; overflow: clip; height: auto !important; }

  #header.site-header {
    position: -webkit-sticky !important;   /* the theme sets relative with !important */
    position: sticky !important;
    top: calc(-1 * var(--mb-top-h, 61px));
    z-index: 9000;
  }
  /* the bar is always on screen: focusing one of its links must not scroll the page */
  #header .kl-top-header a { scroll-margin-top: calc(-1 * (var(--mb-bar-h, 76px) + 8px)); }

  /* the phone menu now opens from any scroll position, so it covers the screen instead of the top of the page */
  #zn-res-menu.zn-menu-visible {
    position: fixed !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
