/* Tables retain natural height; only the page scrolls vertically. */
@media screen{
 body:has(#clinic-adaptive-header) #screen-app.screen.active .page .clinic-table-viewport{
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
  height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:hidden!important;
  padding:0!important;scrollbar-gutter:auto!important;scrollbar-width:none!important;
  border:1px solid #dce5ec;border-radius:7px;background:#fff;
 }
 body:has(#clinic-adaptive-header) #screen-app .clinic-table-viewport>table>thead{position:static!important}
 body:has(#clinic-adaptive-header) #screen-app .clinic-table-viewport>table>thead>tr>:is(th,td){top:0!important}
 #screen-app.screen.active .page :has(.clinic-table-viewport){scrollbar-gutter:auto!important}
 body:has(#clinic-adaptive-header) #screen-app .clinic-table-viewport::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}
 #screen-app .clinic-table-viewport:focus-visible{outline:2px solid #176fc1;outline-offset:2px}
 body>.page-table-scroll-rail{
  position:fixed;z-index:1200;height:16px;box-sizing:border-box;overflow-x:scroll;overflow-y:hidden;
  background:#edf2f6;scrollbar-width:auto;scrollbar-color:auto;
 }
 body>.page-table-scroll-rail[hidden]{display:none!important}
 body>.page-table-scroll-rail>div{height:1px;pointer-events:none}
 body>.page-table-scroll-rail::-webkit-scrollbar{height:14px}
 body>.page-table-scroll-rail::-webkit-scrollbar-track{background:#edf2f6}
 body>.page-table-scroll-rail::-webkit-scrollbar-thumb{background:#8b9dac;border:2px solid #edf2f6;border-radius:8px}
 body>.page-table-scroll-rail:focus-visible{outline:2px solid #176fc1;outline-offset:-2px}
}
@media print{.page-table-scroll-rail{display:none!important}.clinic-table-viewport{height:auto!important;max-height:none!important;overflow:visible!important}}

@media screen and (max-width:768px){
 body>.page-table-sticky-head{position:fixed;display:none;overflow:hidden;pointer-events:none;z-index:430;margin:0;padding:0;border:0;background:var(--page-table-head-color,#176fc1)}
 body>.page-table-sticky-head.is-visible{display:block}
 body>.page-table-sticky-head>table{position:relative;margin:0!important;border-spacing:0!important;table-layout:fixed}
 body>.page-table-sticky-head thead{display:table-header-group!important}
}

/* Extra travel only for wide tables; fitting tables keep their current width. */
@media screen{
 #screen-app.screen.active .clinic-table-viewport.table-overflows-x>table{margin-right:24px!important}
}

@media screen{
 body>div.page-table-sticky-head{border-radius:0!important}
}
