/* V1.8.7: keep BOTH scroll axes within the visible table viewport at 100% zoom.
   Applies to Indent Retail/B2B as well as BOM lists. */
#page-stock, #page-pursal {min-width:0!important;max-width:100%!important}
#page-stock .panel, #page-pursal .panel {min-width:0!important;max-width:100%!important}
#stockTable, #pursalTable, #indentTable {min-width:0!important;max-width:100%!important}
#stockTable>.hierarchy-viewport, #pursalTable>.hierarchy-viewport,
#indentTable>.table-scroll {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  height:clamp(210px,43dvh,440px)!important;
  max-height:clamp(210px,43dvh,440px)!important;
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
  scrollbar-width:auto!important;
  scrollbar-color:#417c69 #dcece5!important;
  border:1px solid #d8e7df;
}
#indentTable>.table-scroll>table {width:max-content!important;min-width:100%!important;max-width:none!important;}
#stockTable>.hierarchy-viewport::-webkit-scrollbar,
#pursalTable>.hierarchy-viewport::-webkit-scrollbar,
#indentTable>.table-scroll::-webkit-scrollbar {width:14px!important;height:14px!important;}
#stockTable>.hierarchy-viewport::-webkit-scrollbar-thumb,
#pursalTable>.hierarchy-viewport::-webkit-scrollbar-thumb,
#indentTable>.table-scroll::-webkit-scrollbar-thumb {background:#417c69!important;border:2px solid #dcece5;border-radius:7px}
#stockTable>.hierarchy-viewport::-webkit-scrollbar-track,
#pursalTable>.hierarchy-viewport::-webkit-scrollbar-track,
#indentTable>.table-scroll::-webkit-scrollbar-track {background:#dcece5!important}
#indentTable>.table-scroll thead th {position:sticky;top:0;z-index:7;background:#e8f2ec}
@media(max-height:600px){#stockTable>.hierarchy-viewport,#pursalTable>.hierarchy-viewport,#indentTable>.table-scroll{height:clamp(180px,38dvh,300px)!important;max-height:clamp(180px,38dvh,300px)!important}}
