/* Tables that scroll inside their own frame: the frame is sized to the window,
   so the rows scroll up-down and left-right inside it and the bottom scrollbar
   is always on screen. Used by the Clients table (patches/apply.mjs marks its
   frame) and the Revenue tables (features/revenue). */

/* Clients table. The frame starts 222px down the page (title, search, filter
   chips) and stops above the collapsed "Create New Client" bar. Its column
   headings are already sticky, so they stay on top while the rows scroll. */
div.stamm-table-frame{overflow:auto;max-height:max(240px,calc(100vh - 284px));overscroll-behavior-x:contain}

/* A drawn scrollbar is always shown; the system one hides itself on a Mac
   until you scroll, which is easy to miss on a wide table. The console asks
   for thin system scrollbars on every element, and a browser that honours
   that ignores drawn ones, so these frames opt back out first. */
.stamm-table-frame,.rl-grid-scroll{scrollbar-width:auto;scrollbar-color:auto}
.stamm-table-frame::-webkit-scrollbar,.rl-grid-scroll::-webkit-scrollbar{width:12px;height:12px}
.stamm-table-frame::-webkit-scrollbar-track,.rl-grid-scroll::-webkit-scrollbar-track,
.stamm-table-frame::-webkit-scrollbar-corner,.rl-grid-scroll::-webkit-scrollbar-corner{background:var(--surface-2)}
.stamm-table-frame::-webkit-scrollbar-thumb,.rl-grid-scroll::-webkit-scrollbar-thumb{background:var(--text-lo);border-radius:6px;border:3px solid var(--surface-2)}
.stamm-table-frame::-webkit-scrollbar-thumb:hover,.rl-grid-scroll::-webkit-scrollbar-thumb:hover{background:var(--text-mid)}
/* Firefox has no drawn scrollbars; give its own the same colours. */
@supports not selector(::-webkit-scrollbar){.stamm-table-frame,.rl-grid-scroll{scrollbar-color:var(--text-lo) var(--surface-2)}}
