/*
 * Urbanstart V5 priority UX patch.
 *
 * This stylesheet is deliberately additive. Deactivating the plugin restores
 * the original theme behavior without changing a template or a database row.
 */

@media (max-width: 60rem) {
  /*
   * The original panel is absolute inside a sticky header. While the page is
   * scroll-locked that containing block can sit outside the visual viewport.
   * Fix the complete header to the viewport for the lifetime of the open menu.
   */
  html.us-ux-menu-open body {
    position: fixed !important;
    top: var(--us-ux-scroll-lock-offset, 0) !important;
    right: 0;
    left: 0;
    width: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  html.us-ux-menu-open .urbanstart-v5 .us-header {
    position: fixed !important;
    top: var(--us-admin-bar-offset, 0) !important;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 10020;
  }

  html.us-ux-menu-open .urbanstart-v5 .us-nav.us-is-open {
    top: 100% !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    height: calc(100dvh - var(--us-header-height) - var(--us-admin-bar-offset, 0)) !important;
    max-height: calc(100dvh - var(--us-header-height) - var(--us-admin-bar-offset, 0));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/*
 * JavaScript owns the contextual decision; CSS makes that decision win over
 * the original single-target observer and removes the control from hit testing.
 */
.urbanstart-v5 .us-mobile-booking.us-ux-suppressed,
body.single-post .us-mobile-booking,
body.us-blog-article .us-mobile-booking {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(calc(100% + 1rem)) !important;
}

@media (prefers-reduced-motion: reduce) {
  .urbanstart-v5 .us-mobile-booking {
    transition: none !important;
  }
}

