/* Column tools (features/lists/tableTools.mjs): the two controls added to each
   table heading, the heading menu, and the drop marker shown while a column is
   being moved. The column layout itself is written per table by the script. */

/* Only for a heading that is not already positioned (both tables' are). */
.stamm-col-head{position:relative}

/* Resize edge: the right 9px of a heading. */
.stamm-col-grip{position:absolute;top:0;right:0;bottom:0;width:9px;cursor:col-resize;z-index:2;touch-action:none}
.stamm-col-grip::after{content:"";position:absolute;top:22%;bottom:22%;right:3px;width:2px;border-radius:1px;background:transparent;transition:background var(--dur-fast)}
th:hover>.stamm-col-grip::after{background:var(--hairline-strong)}
.stamm-col-grip:hover::after,.stamm-col-grip.is-active::after{background:var(--accent)}

/* "⋮" options button: shown on hover or focus, and kept visible on a pinned
   column. The selectors are deliberately heavy: the Revenue table styles every
   button in its headings as a full-width sort button. */
th>button.stamm-col-menu[data-stamm-tool]{position:absolute;top:50%;right:12px;transform:translateY(-50%);z-index:2;display:grid;place-items:center;width:20px;height:20px;padding:0;border:0;border-radius:6px;background:var(--surface-3);color:var(--text-hi);font:inherit;font-size:14px;line-height:1;cursor:pointer;opacity:0;transition:opacity var(--dur-fast)}
th:hover>button.stamm-col-menu[data-stamm-tool],th>button.stamm-col-menu[data-stamm-tool]:focus-visible,th>button.stamm-col-menu[data-stamm-tool][aria-expanded="true"]{opacity:1}
th>button.stamm-col-menu[data-stamm-tool]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
th[data-stamm-pinned]>button.stamm-col-menu[data-stamm-tool]{opacity:1;background:var(--accent);color:var(--on-accent)}
/* A heading that is itself a button (the Revenue table's sort headings, with
   their arrow at the right end) keeps that end clear for the options button. */
th[data-stamm-col]>button:not([data-stamm-tool]){padding-right:36px}

.stamm-col-pop{position:fixed;z-index:900;display:flex;flex-direction:column;min-width:150px;padding:6px;border-radius:10px;background:var(--surface-2);border:1px solid var(--hairline-strong);box-shadow:0 12px 32px -8px rgba(0,0,0,.6)}
.stamm-col-pop button{padding:8px 10px;border:0;border-radius:6px;background:transparent;color:var(--text-hi);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.stamm-col-pop button:hover:not(:disabled),.stamm-col-pop button:focus-visible{background:var(--surface-3);outline:none}
.stamm-col-pop button:disabled{color:var(--text-lo);cursor:default}
.stamm-col-pop .stamm-col-pop-reset{margin-top:4px;padding-top:10px;border-top:1px solid var(--hairline);border-radius:0 0 6px 6px}

/* Where a column being dragged will land. */
.stamm-col-marker{position:fixed;z-index:899;width:2px;background:var(--accent);pointer-events:none}
.stamm-col-moving,.stamm-col-moving *{cursor:grabbing!important;user-select:none}
.stamm-col-resizing,.stamm-col-resizing *{cursor:col-resize!important;user-select:none}
