/* Keep explicitly hidden pagination items out of the native adapter layout.
   Empty localized controls were omitted by the pre-v3 renderer. */
.dt-container.dt-bootstrap5 .dt-paging .pagination > li[hidden] {
  display: none;
}

/* DataTables maps its sort state to FA7 glyphs; shared-ui owns presentation. */
body .dt-bootstrap5 table.dataTable thead th .dt-column-order::after { display: none; }
body .dt-bootstrap5 table.dataTable thead th .dt-column-order::before { content: "\f338"; font-family: "Font Awesome 7 Free"; font-weight: 900; position: static; display: block; border: 0; width: auto; height: auto; transform: none; opacity: 1; color: currentColor; line-height: 1; }
body .dt-bootstrap5 table.dataTable thead th.dt-ordering-asc .dt-column-order::before { content: "\f30c"; }
body .dt-bootstrap5 table.dataTable thead th.dt-ordering-desc .dt-column-order::before { content: "\f309"; }

/* No-data tables retain one compact semantic row, without inert controls. */
.dt-container.twoip-table-empty .dt-layout-row:not(.dt-layout-table) { display:none; }

/* Paging alignment follows the shared footer contract for every table. */

/* Native search reuses the CDN field family, within its existing layout cell. */
body .dt-container .dt-search .twoip-search-control.twoip-input-field {
  width: 100%; margin: 0;
}
body .t3-mainbody .t3-content .dt-container .dt-search .twoip-search-control > input,
body .modal .dt-container .dt-search .twoip-search-control > input {
  width: 100%; margin: 0;
}

/* DataTables values keep the existing compact row geometry. Entity leaves use
   the shared ellipsis/tooltip owner; intrinsic values use the local scroll owner. */
body table[data-cabinet-table] > :is(thead,tbody,tfoot) > tr > :is(th,td),
body table.twoip-data-table > :is(thead,tbody,tfoot) > tr > :is(th,td),
body .dt-bootstrap5 table.dataTable .dt-column-title {
  white-space: nowrap;
}

/* Explicit prose columns keep the compact DataTables default elsewhere. */
body .dt-bootstrap5 table.dataTable.twoip-data-table--prose { table-layout: auto; width: 100%; }
body table.twoip-data-table > tbody > tr > td.twoip-data-cell--prose {
  white-space: normal; overflow-wrap: anywhere; min-inline-size: 0;
}

/* The Bootstrap DataTables row keeps one grid half-gutter on each side.
   Reserve that same existing inset in native markup, before its wrapper exists. */
body :is(.t3-content,.modal) :is(.table-responsive,.twoip-service-table-scroll):has(> table.twoip-data-table) {
  padding-inline: calc(var(--twoip-grid-gutter) / 2);
}
