/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   10. Tables
   ============================================================================= */

.nax-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

.nax-table {
  --nax-table-head-h: 32px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.846rem;
  color: var(--nax-ink-70);
}

.nax-table thead th {
  height: var(--nax-table-head-h);
  padding: 0 12px;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
  background: var(--nax-canvas);
  border-bottom: 1px solid var(--nax-ink-10);
  white-space: nowrap;
  text-align: left;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 1;
}

.nax-table thead th.sortable {
  cursor: pointer;
}

.nax-table thead th.sortable:hover {
  color: var(--nax-ink);
}

.nax-table tbody tr {
  border-bottom: 1px solid var(--nax-ink-06);
  transition: background var(--nax-t);
}

.nax-table tbody tr:last-child {
  border-bottom: none;
}

.nax-table tbody tr:hover {
  background: var(--nax-ink-03);
}

/* A section's header row (TableComponent `group:`) sticks under the column
   headers while its rows scroll past, until the next section's takes over. */
.nax-table th[scope="rowgroup"] {
  position: sticky;
  top: var(--nax-table-head-h);
  z-index: 1;
  height: var(--nax-row-compact);
  padding: var(--nax-space-3) var(--nax-space-3) var(--nax-space-1);
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: start;
  vertical-align: bottom;
  color: var(--nax-ink-text-2);
  background: var(--nax-surface);
  border-block-end: 1px solid var(--nax-ink-06);
}

.nax-table tbody tr.is-selected {
  background: var(--nax-accent-dim);
}

.nax-table tbody tr.is-clickable {
  cursor: pointer;
}

.nax-table td {
  height: var(--nax-row);
  padding: 0 12px;
  vertical-align: middle;
  border-bottom: none;
}

/* Column kinds. A header shares its column's alignment and stays on one
   line, but keeps the header type — only the cells under it go mono. */
.nax-table :is(.col-id, .col-amount, .col-date, .col-status) {
  white-space: nowrap;
}

.nax-table .col-amount {
  text-align: right;
}

.nax-table :is(tbody, tfoot) .col-id {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-table :is(tbody, tfoot) .col-amount {
  font-family: var(--nax-font-mono);
  color: var(--nax-ink);
}

.nax-table :is(tbody, tfoot) .col-date {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
}

/* A table with a growing column (TableComponent `grow: true`) gives it the
   room; every other column hugs its content on one line. */
.nax-table:has(> thead [data-grow]) thead th:not([data-grow]) {
  width: 1%;
}

.nax-table:has(> thead [data-grow]) tbody td:not([data-grow]) {
  white-space: nowrap;
}

.nax-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

.nax-table .col-check {
  width: 36px;
  padding: 0 0 0 12px;
}

.nax-table .col-amount.positive {
  color: var(--nax-green-text);
}

.nax-table .col-amount.negative {
  color: var(--nax-red-text);
}

.nax-table-sm .nax-table td,
.nax-table-sm .nax-table th {
  height: 28px;
  padding: 0 8px;
}

/* ── Row size ────────────────────────────────────────────────────────────
   TableComponent renders the person's row size as data-density. Condensed
   rows leave the picture column out; comfortable and expanded rows make room
   for it. */
.nax-table[data-density="condensed"] tbody td   { height: var(--nax-row-condensed); }
.nax-table[data-density="comfortable"] tbody td { height: var(--nax-row-comfortable); }
.nax-table[data-density="expanded"] tbody td    { height: var(--nax-row-expanded); }

.nax-table[data-density="condensed"] [data-thumbnail] {
  display: none;
}

.nax-table [data-thumbnail] img {
  display: block;
  inline-size: calc(var(--nax-row-comfortable) - 2 * var(--nax-space-1));
  block-size: calc(var(--nax-row-comfortable) - 2 * var(--nax-space-1));
  object-fit: cover;
  border-radius: var(--nax-r-sm);
}

.nax-table[data-density="expanded"] [data-thumbnail] img {
  inline-size: calc(var(--nax-row-expanded) - 2 * var(--nax-space-1));
  block-size: calc(var(--nax-row-expanded) - 2 * var(--nax-space-1));
}

/* A list's row-size switch (RowSizeComponent). The pressed size is the one
   the list is rendered at. Icons sit in one bordered group; the text variant
   spells the sizes out as ghost buttons. */
.nax-row-size fieldset {
  display: inline-flex;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nax-row-size--icons fieldset {
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  overflow: hidden;
}

.nax-row-size--icons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--nax-control-sm);
  block-size: var(--nax-control-sm);
  padding: 0;
  border: 0;
  border-inline-end: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: background var(--nax-t), color var(--nax-t);
}

.nax-row-size--icons button:last-child {
  border-inline-end: 0;
}

.nax-row-size--icons button:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-row-size--icons button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-row-size--icons [aria-pressed="true"],
.nax-row-size--icons [aria-pressed="true"]:hover {
  background: var(--nax-ink);
  color: var(--nax-surface);
}

.nax-row-size--text fieldset {
  gap: var(--nax-space-1);
}

.nax-row-size--text [aria-pressed="true"] {
  background: var(--nax-accent-dim);
  color: var(--nax-accent);
}

/* ── Business-Central-style grid variant ─────────────────────────────────
   Column separators, sentence-case headers, a selected-row pointer. Applied
   by NubocAxis::Interface::TableComponent to an editing table, or when the
   caller passes grid: true. A list rules its rows only. */
.nax-table--grid thead th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}
.nax-table--grid th,
.nax-table--grid td {
  border-right: 1px solid var(--nax-ink-10);
}
.nax-table--grid th:last-child,
.nax-table--grid td:last-child {
  border-right: none;
}
.nax-table--grid tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--nax-accent);
}

/* Boolean check cell (col-check / status columns) */
.nax-check-yes { display: inline-flex; color: var(--nax-green-text); }
.nax-check-no  { color: var(--nax-ink-text-2); }

/* ── Inline "Edit list" cells (autosave) ─────────────────────────────── */
.nax-inline-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--nax-font-sans);
  font-size: 0.846rem;
  color: var(--nax-ink);
  padding: 5px 7px;
  border-radius: var(--nax-r-sm);
  transition: border-color var(--nax-t), background var(--nax-t), box-shadow var(--nax-t);
}
.col-id .nax-inline-input { font-family: var(--nax-font-mono); }
.col-amount .nax-inline-input { text-align: right; font-family: var(--nax-font-mono); }
.nax-inline-input:hover { border-color: var(--nax-ink-20); }
.nax-inline-input:focus {
  outline: none;
  border-color: var(--nax-accent);
  background: var(--nax-surface);
  box-shadow: 0 0 0 3px rgba(21, 71, 212, .18);
}
.nax-inline-input.is-saving { opacity: 0.6; }
.nax-inline-input.is-saved { border-color: var(--nax-green); background: var(--nax-green-bg); }
.nax-inline-input.is-invalid { border-color: var(--nax-red); background: var(--nax-red-bg); }
.nax-inline-check { width: 16px; height: 16px; accent-color: var(--nax-accent); cursor: pointer; }

.nax-table tfoot th,
.nax-table tfoot td {
  height: 34px;
  padding: 0 12px;
  font-weight: 600;
  color: var(--nax-ink);
  background: var(--nax-canvas);
  border-top: 1px solid var(--nax-ink-10);
}

/* A totals row names itself in a row header: "12 items". */
.nax-table tfoot th {
  text-align: start;
}

.nax-table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-table-toolbar-title {
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink);
  flex: 1;
}

.nax-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-table-footer__note {
  margin-left: auto;
  text-align: right;
}

/* Uppercase micro column heads (dashboard idiom) */
.nax-table--caps thead th {
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
}

.nax-table__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nax-table-empty,
.nax-table td.nax-table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--nax-ink-text-2);
  font-size: 0.846rem;
}

/* Toolbar */
.nax-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nax-toolbar__search {
  flex: 1;
}

.nax-toolbar__filters {
  display: flex;
  gap: 0.75rem;
}

.nax-toolbar__filters .nax-select {
  width: auto;
  min-width: 140px;
}

/* Pagination */
.nax-pagination {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nax-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--nax-r-sm);
  border: 1px solid transparent;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--nax-t);
  text-decoration: none;
}

.nax-page-btn:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-page-btn.is-active {
  background: var(--nax-accent);
  border-color: var(--nax-accent);
  color: #fff;
}

.nax-page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}


/* =============================================================================
   Smart column headers — sort link + filter trigger + dropdown menu
   (rendered by NubocAxis::Interface::ColumnHeaderComponent + the
   table-filter Stimulus controller)
   ============================================================================= */

/* -- Column header with filter trigger ---------------------------------------- */
.nax-col-header {
  display: flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.nax-col-header__label {
  flex: 1;
  cursor: pointer;
}

.nax-col-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: all var(--nax-t);
}

th:hover .nax-col-trigger,
.nax-col-trigger.is-filtered {
  opacity: 1;
}

.nax-col-trigger:hover {
  background: var(--nax-ink-10);
  color: var(--nax-ink-70);
}

.nax-col-trigger.is-filtered {
  color: var(--nax-accent);
}

/* -- Active header label (filtered column) ------------------------------------ */
.nax-col-header__label.is-active {
  color: var(--nax-accent);
  font-weight: 700;
}

/* -- Sort indicator on label -------------------------------------------------- */
.nax-sort-indicator {
  display: inline-flex;
  margin-left: 2px;
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-sort-indicator.is-active {
  opacity: 1;
  color: var(--nax-accent);
}

/* -- Column filter dropdown menu ---------------------------------------------- */
.nax-col-menu {
  position: absolute;
  z-index: var(--nax-z-overlay);
  min-width: 180px;
  padding: 4px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.13s ease, transform 0.13s ease;
}

.nax-col-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nax-col-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 3px;
  background: transparent;
  font-size: 0.769rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-70);
  cursor: pointer;
  text-align: left;
  transition: background var(--nax-t);
}

.nax-col-menu__item:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-col-menu__item.is-active {
  color: var(--nax-accent);
  font-weight: 500;
}

.nax-col-menu__item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nax-col-menu__sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--nax-ink-08);
}

.nax-col-menu__label {
  padding: 4px 10px 2px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-col-menu__filter {
  padding: 2px 6px 6px;
}

.nax-col-menu__filter .nax-col-menu__label {
  display: block;
  padding-left: 4px;
}

.nax-col-menu__input {
  width: 100%;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--nax-ink-10);
  border-radius: 3px;
  background: var(--nax-surface);
  font-size: 0.769rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink);
}

.nax-col-menu__input:focus {
  outline: none;
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 2px var(--nax-accent-dim);
}

/* Sort link wrapping label + indicator; hovering it lets Turbo prefetch
   the sorted page so the click swap is instant. */
.nax-col-sort {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nax-col-sort:hover {
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-table thead th[aria-sort] {
  color: var(--nax-ink);
}

/* A right-aligned header — align: :right, or an amount column's — puts its
   label and sort arrow over the numbers' right edge. */
.nax-col-header--right,
.col-amount > .nax-col-header,
:is(.nax-col-header--right, .col-amount > .nax-col-header) .nax-col-sort {
  justify-content: flex-end;
}

:is(.nax-col-header--right, .col-amount > .nax-col-header) .nax-col-header__label {
  flex: none;
}

/* ── Fill mode — the chart-of-accounts feel ──────────────────────────────
   The wrap becomes the page's one scroll surface: viewport-bounded height
   (so the existing sticky thead engages), contained wheel, slim bar. The
   page holds still; only the rows move. Reserve space for chrome around the
   table with --nax-table-fill-offset on any ancestor. */
.nax-table-wrap--fill {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
  max-height: calc(100vh - var(--nax-topbar-h) - var(--nax-settings-chrome, 108px)
                   - var(--nax-table-fill-offset, 220px));
}

.nax-table-wrap--fill::-webkit-scrollbar { width: 8px; height: 8px; }
.nax-table-wrap--fill::-webkit-scrollbar-thumb { background: var(--nax-ink-20); border-radius: 4px; }
.nax-table-wrap--fill::-webkit-scrollbar-track { background: transparent; }

/* Tree-in-table — corporate structure rows (entities list). */
.nax-entity-tree {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nax-entity-tree__tick {
  color: var(--nax-ink-20);
  font-size: 0.769rem;
}

/* Keyboard grid (grid-nav): the focused cell reads as BC's active cell. */
.nax-table select:focus-visible,
.nax-table input:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 1px;
  border-radius: 3px;
}

/* Edit grid (EditGridComponent) — footer pairs an explanatory note with
   the keyboard legend. */
.nax-editgrid__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nax-editgrid__keys {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--nax-ink-35);
}
.nax-editgrid__keys kbd {
  font-family: var(--nax-font-mono);
  font-size: 0.615rem;
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-10);
  border-radius: 3px;
  padding: 0 3px;
  margin: 0 1px;
}

/* Edit grid cells read as text until you're on them (BC's quiet-cell
   look) — the editor chrome appears on hover/focus. */
.nax-editgrid select,
.nax-editgrid input {
  border-color: transparent;
  background: transparent;
}
.nax-editgrid select:hover,
.nax-editgrid input:hover,
.nax-editgrid select:focus,
.nax-editgrid input:focus {
  border-color: var(--nax-ink-20);
  background: var(--nax-surface);
}

/* Current row — BC's real-current band follows the focused cell. */
.nax-editgrid tbody tr.nax-grid-row--current {
  background: var(--nax-accent-dim);
  box-shadow: inset 2px 0 0 var(--nax-accent);
}

/* Background-save feedback: the row pulses instead of the page reloading. */
@keyframes nax-grid-saved {
  0%   { background: var(--nax-green-bg, rgba(34, 154, 84, .14)); }
  100% { background: transparent; }
}
@keyframes nax-grid-error {
  0%, 40% { background: var(--nax-red-bg, rgba(212, 56, 56, .12)); }
  100%    { background: transparent; }
}
.nax-editgrid tbody tr.nax-grid-row--saved td { animation: nax-grid-saved 900ms ease-out; }
.nax-editgrid tbody tr.nax-grid-row--error td { animation: nax-grid-error 1400ms ease-out; }

/* AG Grid row-delete affordance — quiet until hovered. */
.nax-agdel-cell { display: flex; align-items: center; justify-content: center; }
.nax-agdel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--nax-ink-35);
  cursor: pointer;
}
.nax-agdel:hover { color: var(--nax-red, #d43838); background: var(--nax-red-bg, rgba(212,56,56,.10)); }

/* AG Grid draft line — BC's trailing new-record row. */
.nax-ag-draft { opacity: .75; }
.nax-ag-draft .ag-cell { font-style: normal; }

/* AG Grid inline validation — the offending cell wears the error; hover
   for the message (tooltip). Cleared on the next successful save. */
.ag-cell.nax-ag-cell-invalid {
  box-shadow: inset 0 0 0 1.5px var(--nax-red, #d43838);
  background: var(--nax-red-bg, rgba(212, 56, 56, .08));
  border-radius: 3px;
}

/* AG Grid error callout — BC's bubble: the message sits at the cell. */
.nax-ag-bubble {
  position: absolute;
  z-index: 30;
  max-width: 320px;
  padding: 6px 10px;
  font-size: 0.769rem;
  line-height: 1.4;
  color: var(--nax-ink);
  background: var(--nax-surface);
  border: 1px solid var(--nax-red, #d43838);
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.nax-ag-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: var(--nax-surface);
  border-left: 1px solid var(--nax-red, #d43838);
  border-top: 1px solid var(--nax-red, #d43838);
  transform: rotate(45deg);
}

/* Flush AG Grid — edge-to-edge inside a card, no wrapper radius fighting
   the card corners, cell text aligned to the toolbar's 14px inset. */
.nax-ag-flush .ag-root-wrapper { border-radius: 0; border: none; }
.nax-ag-flush .ag-header-cell,
.nax-ag-flush .ag-cell { padding-left: 14px; padding-right: 14px; }

/* Selection column: header select-all and row checkboxes share one left
   inset and drop AG's internal margins, so the whole column lines up. */
.nax-ag-flush .ag-header-cell[col-id="ag-Grid-SelectionColumn"],
.nax-ag-flush .ag-cell.ag-checkbox-cell {
  padding-left: 14px;
  padding-right: 0;
}
.nax-ag-flush .ag-header-select-all,
.nax-ag-flush .ag-selection-checkbox { margin: 0; }

/* =============================================================================
   Statement table — a financial statement (StatementTableComponent). Builds on
   .nax-table. Each line carries data-kind (heading | account | subtotal |
   total) and data-level (its depth in the chart of accounts); everything
   below reads those two attributes.
   ============================================================================= */
.nax-statement-table caption {
  padding-block: var(--nax-space-3);
  text-align: start;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-statement-note {
  margin: var(--nax-space-2) 0 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-statement-table thead th + th {
  text-align: end;
}

.nax-statement-table tbody th {
  height: var(--nax-row);
  padding-block: 0;
  padding-inline: calc(var(--nax-space-3) + var(--nax-space-5) * var(--nax-statement-depth, 0)) var(--nax-space-3);
  font-weight: normal;
  text-align: start;
}

.nax-statement-table tr[data-level="1"] { --nax-statement-depth: 1; }
.nax-statement-table tr[data-level="2"] { --nax-statement-depth: 2; }
.nax-statement-table tr[data-level="3"] { --nax-statement-depth: 3; }
.nax-statement-table tr[data-level="4"] { --nax-statement-depth: 4; }
.nax-statement-table tr[data-level="5"] { --nax-statement-depth: 5; }
.nax-statement-table tr[data-level="6"] { --nax-statement-depth: 6; }

.nax-statement-table td {
  text-align: end;
}

.nax-statement-table tr[data-kind="heading"] th,
.nax-statement-table strong {
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-statement-table tbody tr[data-kind="subtotal"] {
  border-top: 1px solid var(--nax-ink-20);
}

/* The accounting double rule under a total; `medium` is the narrowest width
   that draws two lines. */
.nax-statement-table tbody tr[data-kind="total"] {
  border-top: 1px solid var(--nax-ink-40);
  border-bottom: medium double var(--nax-ink-40);
}

.nax-statement-table td a {
  color: inherit;
  text-decoration: none;
}

.nax-statement-table td a:hover,
.nax-statement-table td a:focus-visible {
  color: var(--nax-accent);
  text-decoration: underline;
}

@media print {
  .nax-statement-table thead th {
    position: static;
    background: none;
  }

  .nax-statement-table tr {
    break-inside: avoid;
  }
}

/* ── Pinned columns ─────────────────────────────────────────────────────
   with_column(..., pinned: true) stays put while the rest scrolls sideways.
   It reads like any other column until the table is scrolled; then an edge
   and a soft shadow show where the scrolling columns pass under it. */
.nax-table [data-pinned] {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--nax-surface);
  transition: box-shadow var(--nax-t);
}

.nax-table thead [data-pinned] {
  z-index: 2;
  background: var(--nax-canvas);
}

.nax-table tfoot [data-pinned] {
  background: var(--nax-canvas);
}

.nax-table tbody tr:hover [data-pinned] {
  background: linear-gradient(var(--nax-ink-03), var(--nax-ink-03)), var(--nax-surface);
}

.nax-table tbody tr.is-selected [data-pinned] {
  background: linear-gradient(var(--nax-accent-dim), var(--nax-accent-dim)), var(--nax-surface);
}

.nax-table-wrap[data-scrolled] [data-pinned] {
  box-shadow: inset -1px 0 0 var(--nax-ink-10), 6px 0 8px -6px var(--nax-ink-20);
}

/* A selectable table's checkbox column: as narrow as its box. */
.nax-table .nax-table-select {
  inline-size: 1%;
  padding-inline-end: 0;
}
