/* DataTables / Editor theme overrides — load AFTER datatables.bundle.css */

/* Responsive +/- — Ready brand (not SA purple/teal) */
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child:before,
table.dataTable.dtr-column > tbody > tr > td.control:before,
table.dataTable.dtr-column > tbody > tr > th.control:before,
table.dataTable > tbody > tr > td.dtr-control:before {
	background-color: #F03D1E !important;
	color: #fff !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before,
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before,
table.dataTable > tbody > tr.parent > td.dtr-control:before {
	background-color: #c43218 !important;
}

/* Selection — paint cells (BS5 table box-shadow otherwise hides tr background) */
table.dataTable tbody > tr.selected,
table.dataTable tbody > tr > .selected,
table.dataTable.stripe tbody > tr.odd.selected,
table.dataTable.stripe tbody > tr.even.selected,
table.dataTable.display tbody > tr.odd.selected,
table.dataTable.display tbody > tr.even.selected,
table.dataTable.hover tbody > tr.selected:hover,
table.dataTable.display tbody > tr.selected:hover,
table.dataTable.display tbody > tr.selected > .sorting_1,
table.dataTable.display tbody > tr.selected > .sorting_2,
table.dataTable.display tbody > tr.selected > .sorting_3,
table.dataTable.order-column tbody > tr.selected > .sorting_1,
table.dataTable.order-column tbody > tr.selected > .sorting_2,
table.dataTable.order-column tbody > tr.selected > .sorting_3,
table.dataTable.display tbody > tr.odd.selected > .sorting_1,
table.dataTable.display tbody > tr.odd.selected > .sorting_2,
table.dataTable.display tbody > tr.odd.selected > .sorting_3,
table.dataTable.display tbody > tr.even.selected > .sorting_1,
table.dataTable.display tbody > tr.even.selected > .sorting_2,
table.dataTable.display tbody > tr.even.selected > .sorting_3,
table.dataTable tbody > tr.selected > th,
table.dataTable tbody > tr.selected > td,
table.dataTable tbody > tr > th.selected,
table.dataTable tbody > tr > td.selected {
	background-color: rgba(240, 61, 30, 0.22) !important;
	color: var(--bs-body-color, #e8eaed) !important;
	box-shadow: none !important;
	--bs-table-bg: transparent;
	--bs-table-accent-bg: transparent;
	--bs-table-bg-state: transparent;
	--bs-table-color: var(--bs-body-color, #e8eaed);
}
table.dataTable tbody > tr.selected {
	box-shadow: inset 3px 0 0 #F03D1E !important;
	outline: none !important;
}
table.dataTable tbody tr.selected a,
table.dataTable tbody th.selected a,
table.dataTable tbody td.selected a {
	color: #F03D1E !important;
}

[data-bs-theme=dark] table.dataTable tbody tr.child,
[data-bs-theme=dark] table.dataTable tbody tr.child ul.dtr-details {
	background-color: rgba(255, 255, 255, 0.03);
	color: var(--bs-body-color);
}
[data-bs-theme=dark] table.dataTable tbody tr.child ul.dtr-details > li {
	border-color: var(--bs-border-color);
}

/* Editor (DTED) modal — dark surfaces + legacy close button */
[data-bs-theme=dark] .DTED .modal-content,
[data-bs-theme=dark] div.DTE .modal-content {
	background-color: var(--bs-modal-bg, var(--bs-body-bg));
	color: var(--bs-body-color);
	border-color: var(--bs-border-color);
}
[data-bs-theme=dark] .DTED .modal-header,
[data-bs-theme=dark] .DTED .modal-footer,
[data-bs-theme=dark] .DTED .modal-body {
	border-color: var(--bs-border-color);
}
.DTED .modal-header .close,
.DTED .modal-header .btn-close {
	margin: -0.5rem -0.5rem -0.5rem auto;
	padding: 0.5rem;
	box-sizing: content-box;
	width: 1em;
	height: 1em;
	opacity: 0.75;
	cursor: pointer;
	z-index: 2;
}
.DTED .modal-header .close:hover,
.DTED .modal-header .btn-close:hover {
	opacity: 1;
}
[data-bs-theme=dark] .DTED .modal-header .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}
