/* HKA_HYDROLOGY_SCROLL_V1 — keep one scroll surface for data and SOP results.
   The original desktop graph hotfix hides body overflow at widths >=1001px.
   These ID-scoped rules also win over the shared dashboard dialog overrides. */
html body #bwsHydroOverlay #bwsHydroDialog {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  height: min(900px, calc(var(--hka-vv-height, 100dvh) - 32px)) !important;
  max-height: calc(var(--hka-vv-height, 100dvh) - 32px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

html body #bwsHydroOverlay #bwsHydroDialog > .bws-hydro-body {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scroll-padding-block: 16px;
  -webkit-overflow-scrolling: touch;
}

html body #bwsHydroOverlay #bwsHydroAnalysisView:not([hidden]) {
  display: block !important;
  min-width: 0;
}

html body #bwsHydroOverlay #bwsHydroDialog > .bws-hydro-head,
html body #bwsHydroOverlay #bwsHydroDialog > .bws-hydro-tabs,
html body #bwsHydroOverlay #bwsHydroDialog > .bws-hydro-footer {
  min-width: 0;
  position: relative;
}
