/* AIOTOR ERP V12.7.25 — one native vertical scroll owner.
   Normal ERP screens scroll at the browser/document level. Do not create
   nested vertical scroll containers or capture wheel/trackpad input. */

html.rt-native-document-scroll,
html:has(body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio)) {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: clip !important;
  overflow-y: scroll !important;
  overscroll-behavior-y: auto !important;
  scroll-behavior: auto !important;
}

body.rt-native-document-scroll-body,
body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio),
body:not(.rt-order-entry-active):not(.page-cat-printstudio) {
  position: static !important;
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}

body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio)
:is(.rt-app,.rt-platinum-shell,.rt-dashboard,.rt-content,.rt-main,.rt-table-card,.rt-screen,.rt-screen-body,.rt-workspace,.rt-page,.page-shell,.content-shell,.app-shell) {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
}

body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio) .rt-table-wrap,
body:not(.rt-order-entry-active):not(.page-cat-printstudio) :is(.table-wrap,.table-responsive,.data-table-wrap) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}

/* Wide tables own horizontal overflow only; vertical motion always propagates
   to the page. This avoids the "click the outer right scrollbar first" defect. */
body:not(.rt-order-entry-active):not(.page-cat-printstudio) :is(.rt-table-wrap,.table-wrap,.table-responsive,.data-table-wrap) {
  overflow-x: auto !important;
  scrollbar-gutter: auto !important;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1180px) {
  body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio) .rt-table-wrap {
    overflow-x: visible !important;
  }
}
