/*
 * Global table horizontal scrolling (single table, no scrollX).
 *
 * The table stays a single <table> (one thead + one tbody), so header and body
 * always align. Horizontal scrolling is pure CSS through the overflow of the
 * wrapper elements — no JS width calculation.
 */

/* Outer wrapper: scroll any plain (non-DataTables) table. */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* DataTables wraps the table in .dataTables_wrapper (100% wide). The wide table
   overflows it, so give the wrapper its own horizontal scroll context too. */
.table-responsive .dataTables_wrapper {
    overflow-x: auto;
}

/* Let the table exceed the container width when content is wide
   (DataTables already sets max-width:none; this guarantees min content width). */
table.dataTable {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
}

/* Plain (non-DataTables) tables. */
.table-responsive > table:not(.dataTable) {
    min-width: max-content;
}

/* Keep cells on one line so the table can grow and scroll. */
table.dataTable thead th,
table.dataTable tbody td {
    white-space: nowrap;
}

/* Keep action buttons on one line inside cells. */
table.dataTable td > .btn,
table.dataTable td .dtr-data {
    white-space: nowrap;
}

/* Sorting icon spacing. */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    padding-right: 1.9rem !important;
}
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after,
table.dataTable thead .sorting_asc_disabled::before,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::before,
table.dataTable thead .sorting_desc_disabled::after {
    right: .65rem !important;
}

.dataTables_wrapper .dataTables_empty {
    text-align: center;
}
