/* Small defaults. Existing TablePress selectors can override visual styles. */
.stm-table{max-width:100%;min-width:0;margin:1.25em 0;position:relative;isolation:isolate}
.stm-table *{box-sizing:border-box}
.stm-table .stm-scroll-shell{position:relative;max-width:100%;min-width:0}
.stm-table .stm-scroll{overflow:auto;max-width:100%;width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;position:relative;border:1px solid #ddd;border-radius:2px}
/* Paginated tables grow vertically to show their full page; only horizontal scrolling remains. */
.stm-table.stm-paginated .stm-scroll{max-height:none!important;height:auto!important}
@layer stm-base {
.stm-table .tablepress{border-collapse:separate;border-spacing:0;table-layout:auto;margin:0;width:max-content;min-width:100%;color:inherit;font-size:inherit;line-height:1.6}
.stm-table .tablepress th,.stm-table .tablepress td{padding:10px 12px;border:0;border-right:1px solid #ddd;border-bottom:1px solid #ddd;text-align:left;vertical-align:middle;background:#fff;min-width:70px;white-space:normal}
.stm-table .tablepress th{background:#545454;color:white;font-weight:600}
.stm-table .stm-alternating tbody tr:nth-child(even)>*{background:#f7f7f7}
.stm-table .stm-hover tbody tr:hover>*{background:#f0f5f8}
.stm-table .tablepress img{max-width:100%;height:auto}
}
/* Geometry overrides only: supplied legacy CSS sets all table cells position:static. */
.stm-table .tablepress .stm-fixed-row{position:sticky!important;top:var(--stm-top,0px)!important;z-index:3!important;background-clip:padding-box}
.stm-table .tablepress .stm-fixed-col{position:sticky!important;left:var(--stm-left,0px)!important;z-index:2!important;background-clip:padding-box}
.stm-table .tablepress .stm-fixed-row.stm-fixed-col{z-index:4!important}
.stm-table .tablepress .stm-fixed-col:not(.stm-fixed-row){box-shadow:1px 0 0 #d7d7d7}
.stm-table .stm-scroll-shell.stm-can-right:after{content:"";position:absolute;right:0;top:0;bottom:0;width:18px;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(0,0,0,.12));z-index:5}
.stm-table .stm-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;font-size:.9em;margin:8px 0}
.stm-table .stm-controls[hidden]{display:none}
.stm-table .stm-controls label{display:flex;align-items:center;gap:6px}
.stm-table .stm-controls label.stm-page-length{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px;white-space:nowrap}
/* Only the page-length selector is compact: up to three digits plus the native arrow. */
.stm-table .stm-controls .stm-page-length select{width:5em;min-width:0;max-width:none;flex:0 0 auto;padding:5px 3px}
.stm-table .stm-controls input,.stm-table .stm-controls select,.stm-table .stm-controls button{font:inherit;line-height:1.5;max-width:100%;padding:5px 8px;border:1px solid #ccc;border-radius:3px;background:#fff;color:#333}
.stm-table .stm-controls input{width:230px}
.stm-table .stm-controls button:not(:disabled){cursor:pointer}
.stm-table .stm-controls button:disabled{opacity:.5}
.stm-table .stm-page-buttons{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
/* Keep natural column sizing: a nowrap heading reserves the width of its
   longest authored line, instead of shrinking to a one-character track.
   Label and chevrons remain separate flex items with a minimum visual gap.
   Explicitly width-locked columns may wrap at normal word boundaries. */
.stm-table .tablepress thead th.stm-sortable{padding-left:4px;padding-right:2px}
.stm-table .stm-sortable{cursor:pointer}
.stm-table .stm-sort-head{display:flex;align-items:center;justify-content:center;gap:6px;min-height:76px;width:100%;min-width:0}
.stm-table .stm-sort-label{display:block;flex:1 1 auto;min-width:0;text-align:center;line-height:inherit;white-space:inherit;overflow-wrap:normal}
.stm-table .stm-sort-nowrap:not(.stm-sort-width-locked) .stm-sort-label{min-width:max-content;white-space:nowrap}
.stm-table .stm-sort-width-locked .stm-sort-label{min-width:0;white-space:normal;overflow-wrap:break-word}
.stm-table .stm-sort-button{flex:0 0 11px;display:flex;align-items:center;justify-content:center;width:11px;height:28px;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;line-height:0}
/* Approved design A: two filled 11x8px triangles with 5px between them
   (3px in the preview + 2px). Use actual geometry instead of a shifted SVG,
   so icon spacing does not create invisible column width. */
.stm-table .stm-sort-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:11px;height:21px;pointer-events:none}
.stm-table .stm-sort-icon .stm-arrow-up,.stm-table .stm-sort-icon .stm-arrow-down{display:block;flex:0 0 8px;width:11px;height:8px;background:#BBBBBB}
.stm-table .stm-sort-icon .stm-arrow-up{clip-path:polygon(50% 0,100% 100%,0 100%)}
.stm-table .stm-sort-icon .stm-arrow-down{clip-path:polygon(0 0,100% 0,50% 100%)}
.stm-table .dt-ordering-asc .stm-sort-icon .stm-arrow-up,
.stm-table .dt-ordering-desc .stm-sort-icon .stm-arrow-down{background:#fff!important}
.stm-table .stm-sort-button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.stm-table .stm-scroll:focus-visible{outline:2px solid #2271b1;outline-offset:2px}
.stm-table tr[hidden]{display:none!important}
.stm-table .stm-empty{padding:12px;color:#555}
/* Viewport header is a non-focusable visual mirror of the accessible source. */
.stm-floating-header{position:fixed!important;z-index:900!important;overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;max-width:none!important;pointer-events:auto;contain:layout paint;isolation:isolate;background:transparent}
.stm-floating-header[hidden]{display:none!important}
.stm-floating-header [data-stm-floating-table]{margin:0!important}
.stm-floating-header [data-stm-proxy]{cursor:inherit}
.stm-floating-header .stm-sort-button{cursor:pointer}
.stm-floating-header .stm-floating-fixed-col{background-clip:padding-box;box-shadow:1px 0 0 #d7d7d7}
@media(max-width:600px){.stm-table .stm-controls{gap:8px}.stm-table .stm-controls label{flex-wrap:wrap}.stm-table .stm-controls input{width:180px}.stm-table .tablepress th,.stm-table .tablepress td{padding:8px}}

/* Privileged, dynamically injected table-edit shortcut; public HTML has no link. */
.stm-table .stm-owner-edit{margin:4px 0 6px;font:inherit;line-height:1.5;text-align:left}
.stm-table .stm-owner-edit a{display:inline-block;text-decoration:underline}
