/* System data tables keep one row per record at every viewport size.
   Wide tables scroll inside their own container instead of widening the page. */
:where(
  .tbl-wrap,
  .table-wrap,
  .table-responsive,
  .table-wrapper,
  .data-table-wrapper,
  .table-container,
  .verified-table-wrap,
  .finance-settlement-wrap,
  .cls-wrap
) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

:where(
  .tbl-wrap,
  .table-wrap,
  .table-responsive,
  .table-wrapper,
  .data-table-wrapper,
  .table-container,
  .verified-table-wrap,
  .finance-settlement-wrap,
  .cls-wrap
) > table {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
}

:where(
  .tbl-wrap,
  .table-wrap,
  .table-responsive,
  .table-wrapper,
  .data-table-wrapper,
  .table-container,
  .verified-table-wrap,
  .finance-settlement-wrap,
  .cls-wrap
) > table :where(th, td),
:where(
  .tbl-wrap,
  .table-wrap,
  .table-responsive,
  .table-wrapper,
  .data-table-wrapper,
  .table-container,
  .verified-table-wrap,
  .finance-settlement-wrap,
  .cls-wrap
) > table :where(th, td) * {
  max-width: none !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

/* Verification tables previously had mobile rules that restored wrapping. */
#view-verify-students :where(.tbl-wrap, .table-wrap) > table :where(th, td),
#view-verify-students :where(.tbl-wrap, .table-wrap) > table :where(th, td) *,
#view-verified-students :where(.tbl-wrap, .verified-table-wrap) > table :where(th, td),
#view-verified-students :where(.tbl-wrap, .verified-table-wrap) > table :where(th, td) * {
  max-width: none !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

@media screen and (max-width: 768px) {
  :where(
    .tbl-wrap,
    .table-wrap,
    .table-responsive,
    .table-wrapper,
    .data-table-wrapper,
    .table-container,
    .verified-table-wrap,
    .finance-settlement-wrap,
    .cls-wrap
  ) {
    scrollbar-gutter: stable both-edges;
  }
}

/* Financial settlement headers and controls used stronger legacy wrapping rules. */
body .finance-settlement-wrap > .finance-settlement-table :is(th, td),
body .finance-settlement-wrap > .finance-settlement-table :is(th, td) * {
  max-width: none !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
