/* Tables (static/js/tables.js): sortable headers, the table search box, and the density choice.
   The sort marker is drawn only on headers the library made sortable (data-sort-col): the files table draws its own. */
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: -2px; }
.data-table th.sortable[data-sort-col]::after { content: ''; display: inline-block; width: .55em; margin-left: .35em; opacity: .55; }
.data-table th.sortable[data-sort-col][aria-sort="ascending"]::after { content: '\25B4'; }
.data-table th.sortable[data-sort-col][aria-sort="descending"]::after { content: '\25BE'; }

.table-search { display: inline-block; width: 16rem; max-width: 100%; margin: 0 var(--space-sm) var(--space-sm) 0; vertical-align: middle; }
.table-facet { display: inline-block; width: auto; max-width: 100%; margin: 0 var(--space-sm) var(--space-sm) 0; vertical-align: middle; }
.table-search-empty { margin: var(--space-sm) 0; }

/* The administrators' link tables keep each row's Revoke in view: the action column is pinned to the right edge of
   the table's scroll box, on the card's surface (the header on the header's), with a hairline at its left so the
   cells scrolling under it stay readable. */
.data-table.pin-actions th:last-child,
.data-table.pin-actions td:last-child { position: sticky; right: 0; z-index: 1; background: var(--surface-0); box-shadow: inset 1px 0 0 var(--surface-3); white-space: nowrap; }
.data-table.pin-actions th:last-child { background: var(--thead-bg, var(--surface-0)); }

/* The pending invitations table scrolls inside its own box on a narrow screen, like the other section tables. */
#invites-list { overflow-x: auto; }

/* Compact density: tighter rows in every data table and in the dense file table. The default is the
   comfortable density the tables have always had. */
html[data-density="compact"] .data-table td,
html[data-density="compact"] .data-table th { padding-top: .2rem; padding-bottom: .2rem; }
html[data-density="compact"] .data-table .person-avatar { width: 22px; height: 22px; font-size: .6rem; }
html[data-density="compact"] .vault-card-body { padding-top: .5rem; padding-bottom: .5rem; }

.density-choice.selected { font-weight: 600; }
