/*
 * Kompatibilitas tampilan DataTables 1.10.18 -> 1.13.11 (+ Responsive 2.5, Select 1.7), integrasi Bootstrap 3.
 * Mengembalikan gaya 1.10 (satu ikon sort di kanan bawah, warna baris lewat background baris)
 * supaya tema yang meng-override gaya lama tetap tampil sama.
 * Dimuat setelah CSS DataTables. Selector diberi awalan `html` agar menang dari CSS DataTables
 * tanpa !important, sehingga override tema (uiux_datatables.css, style.min.css tema) tetap berlaku.
 */

/* ---------- Ikon sort: 1.13 memakai ::before (▲) + ::after (▼), 1.10 hanya ::after (glyphicon) ---------- */
html table.dataTable thead > tr > th.sorting,
html table.dataTable thead > tr > th.sorting_asc,
html table.dataTable thead > tr > th.sorting_desc,
html table.dataTable thead > tr > td.sorting,
html table.dataTable thead > tr > td.sorting_asc,
html table.dataTable thead > tr > td.sorting_desc {
    padding-right: 30px;
}
html table.dataTable thead > tr > th.sorting:before,
html table.dataTable thead > tr > th.sorting_asc:before,
html table.dataTable thead > tr > th.sorting_desc:before,
html table.dataTable thead > tr > th.sorting_asc_disabled:before,
html table.dataTable thead > tr > th.sorting_desc_disabled:before,
html table.dataTable thead > tr > td.sorting:before,
html table.dataTable thead > tr > td.sorting_asc:before,
html table.dataTable thead > tr > td.sorting_desc:before {
    display: none;
}
html table.dataTable thead > tr > th.sorting:after,
html table.dataTable thead > tr > th.sorting_asc:after,
html table.dataTable thead > tr > th.sorting_desc:after,
html table.dataTable thead > tr > th.sorting_asc_disabled:after,
html table.dataTable thead > tr > th.sorting_desc_disabled:after,
html table.dataTable thead > tr > td.sorting:after,
html table.dataTable thead > tr > td.sorting_asc:after,
html table.dataTable thead > tr > td.sorting_desc:after {
    position: absolute;
    top: auto;
    bottom: 8px;
    right: 8px;
    display: block;
    font-family: 'Glyphicons Halflings';
    font-size: inherit;
    line-height: inherit;
    opacity: .5;
}
html table.dataTable thead > tr > th.sorting:after,
html table.dataTable thead > tr > td.sorting:after {
    opacity: .2;
    content: "\e150";
}
/* th aktif kini berkelas "sorting sorting_asc" sekaligus; aturan asc/desc di bawah menang karena urutan */
html table.dataTable thead > tr > th.sorting_asc:after,
html table.dataTable thead > tr > td.sorting_asc:after {
    opacity: .5;
    content: "\e155";
}
html table.dataTable thead > tr > th.sorting_desc:after,
html table.dataTable thead > tr > td.sorting_desc:after {
    opacity: .5;
    content: "\e156";
}
html table.dataTable thead > tr > th.sorting_asc_disabled:after,
html table.dataTable thead > tr > th.sorting_desc_disabled:after {
    color: #eee;
}
html table.dataTable.table-condensed thead > tr > th.sorting:after,
html table.dataTable.table-condensed thead > tr > th.sorting_asc:after,
html table.dataTable.table-condensed thead > tr > th.sorting_desc:after {
    top: 6px;
    right: 6px;
}
/* scrollX/scrollY: header salinan (tinggi 0) di dalam scrollBody tidak boleh menampilkan ikon,
   kalau tidak muncul panah kecil di bawah setiap judul kolom */
html div.dataTables_scrollBody > table.dataTable > thead > tr > th:before,
html div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,
html div.dataTables_scrollBody > table.dataTable > thead > tr > td:before,
html div.dataTables_scrollBody > table.dataTable > thead > tr > td:after {
    display: none !important;
}

/* ---------- Warna baris: 1.12+ memakai box-shadow pada sel, 1.10 background pada baris ---------- */
html table.dataTable.table-striped > tbody > tr.odd > *,
html table.dataTable.table-hover > tbody > tr:hover > *,
html table.dataTable > tbody > tr.selected > *,
html table.dataTable.table-striped > tbody > tr.odd.selected > *,
html table.dataTable.table-hover > tbody > tr.selected:hover > * {
    box-shadow: none;
}
/* 1.13 membuat baris ganjil .table-striped transparan; kembalikan striping Bootstrap 3
   (halaman Bootstrap 4 ditimpa nilai BS4 di vendor_compat.css) */
html table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1):not(.selected) {
    background-color: #f9f9f9;
}
/* Select 1.2: baris terpilih biru + teks putih. Tema Color Admin menimpanya (kuning, !important) */
html table.dataTable > tbody > tr.selected,
html table.dataTable.table-striped > tbody > tr.selected {
    background-color: #08C;
}
table.dataTable tbody tr.selected {
    color: white;
}
/* Tanpa awalan html: cukup untuk menimpa warna teks sel dari DataTables, tetap kalah dari tema */
table.dataTable > tbody > tr.selected > * {
    color: inherit;
}
