/* Table White Background Fix - Forces clean white backgrounds for all DataTables elements */

:root {
  /* Override any gradient variables used by tables.css */
  --table-header-gradient: #ffffff !important;
  --table-row-hover-gradient: #f8fafc !important;
}

/* Header: no longer force white globally to avoid mixed dark/white headers with DataTables clones.
   If a view needs white headers, wrap the table with .dt-white-head and we will scope below. */

.dt-white-head table.dataTable thead,
.dt-white-head table.dataTable thead tr,
.dt-white-head table.dataTable thead th,
.dt-white-head table.dataTable thead td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
}

.dt-white-head table.dataTable thead th,
.dt-white-head table.dataTable thead td {
  border-bottom: 1px solid #e5e7eb !important; /* slate-200 */
}

.dt-white-head table.dataTable.no-footer {
  border-bottom: 1px solid #e5e7eb !important;
}

/* Body rows */
table.dataTable,
table.dataTable tbody,
table.dataTable tbody tr,
table.dataTable tbody td {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Remove stripes to keep full white */
table.dataTable.display tbody tr.odd,
table.dataTable.display tbody tr.even,
table.dataTable.stripe tbody tr.odd,
table.dataTable.stripe tbody tr.even,
table.dataTable.order-column.stripe tbody tr.odd > .sorting_1,
table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
  background-color: #ffffff !important;
}

/* Hover state - subtle gray only */
table.dataTable.display tbody tr:hover,
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
  background-color: #f8fafc !important; /* slate-50 */
}

/* Remove selection and sorted-column tinting */
table.dataTable tbody tr.selected,
table.dataTable tbody tr > .selected,
table.dataTable tbody tr td.selected,
table.dataTable tbody tr th.selected,
table.dataTable.order-column tbody tr > .sorting_1,
table.dataTable.display tbody tr > .sorting_1,
table.dataTable.display tbody tr:hover > .sorting_1 {
  background-color: #ffffff !important;
}

/* Keep header cells white regardless of sorting state (scoped) */
.dt-white-head table.dataTable thead th.sorting,
.dt-white-head table.dataTable thead th.sorting_asc,
.dt-white-head table.dataTable thead th.sorting_desc,
.dt-white-head table.dataTable thead th.sorting_asc_disabled,
.dt-white-head table.dataTable thead th.sorting_desc_disabled {
  background-color: #ffffff !important;
}

/* Remove any gradient backgrounds applied via classes */
.dataTables_wrapper,
.dataTables_wrapper .dataTables_scroll,
.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody,
.dataTables_wrapper .dataTables_scrollFoot {
  background: #ffffff !important;
}
/* Extended enforcement: cover all nested structural elements and dark mode overrides */
.dataTables_wrapper table,
.dataTables_wrapper table thead,
.dataTables_wrapper table tbody,
.dataTables_wrapper table tfoot,
.dataTables_wrapper table tr,
.dataTables_wrapper table th,
.dataTables_wrapper table td,
.dataTables_wrapper .dataTables_scrollHeadInner,
.dataTables_wrapper .dataTables_scrollBody table,
body.dark-mode .dataTables_wrapper,
body.dark-mode .dataTables_wrapper table,
body.dark-mode .dataTables_wrapper table tr,
body.dark-mode .dataTables_wrapper table th,
body.dark-mode .dataTables_wrapper table td {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Neutralize any potential gradient or image backgrounds on table structure only */
.dataTables_wrapper table,
.dataTables_wrapper table thead,
.dataTables_wrapper table tbody,
.dataTables_wrapper table tfoot,
.dataTables_wrapper table tr,
.dataTables_wrapper table th,
.dataTables_wrapper table td,
body.dark-mode .dataTables_wrapper table,
body.dark-mode .dataTables_wrapper table thead,
body.dark-mode .dataTables_wrapper table tbody,
body.dark-mode .dataTables_wrapper table tfoot,
body.dark-mode .dataTables_wrapper table tr,
body.dark-mode .dataTables_wrapper table th,
body.dark-mode .dataTables_wrapper table td {
  background-image: none !important;
}

/* Ensure borders remain subtle and consistent */
.dataTables_wrapper table th,
.dataTables_wrapper table td {
  border-color: #e5e7eb !important; /* slate-200 */
}

/* Optional: clearer hover without dark mode variations */
body.dark-mode table.dataTable.display tbody tr:hover,
body.dark-mode table.dataTable.hover tbody tr:hover,
body.dark-mode table.dataTable.display tbody tr.odd:hover,
body.dark-mode table.dataTable.display tbody tr.even:hover {
  background-color: #f8fafc !important; /* keep same subtle hover */
}
