/* JUST AQAR — unified document scrolling for desktop, PWA and Android WebView. */
html {
  width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  overscroll-behavior-x: none !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y !important;
  scroll-behavior: auto !important;
  scrollbar-gutter: stable;
}

body {
  width: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y !important;
  -webkit-overflow-scrolling: touch;
}

.app-shell,
.app-main,
main.app-main,
.services-main,
.favorites-main,
.bank-main,
.terms-main,
.faq-main,
.client-request-main,
.notifications-main,
.project-view-main,
.unit-view-main {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}

/* Horizontal strips must never cancel a vertical page gesture. */
.hero-actions,
.notifications-filters,
.store-buttons,
.property-thumbs,
.project-thumbs {
  touch-action: pan-x pan-y !important;
  overscroll-behavior-y: auto !important;
}

/* Lock only while an actual drawer/modal requests it. */
html.drawer-open,
body.drawer-open,
html:has(body.drawer-open) {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

html.just-native-app,
html.just-native-app body {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y !important;
}

html.just-native-app body {
  min-height: 100dvh !important;
  overflow-y: visible !important;
}

html.just-native-app .app-main {
  overflow: visible !important;
}

@media (min-width: 1100px) {
  html,
  body {
    overflow-y: auto !important;
    max-height: none !important;
  }

  body {
    overflow-y: visible !important;
  }

  .app-sidebar {
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
  }
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden !important;
  }
}
