/*
 * Badgers Claw Pit - Table Header Normalizer v1
 * Purpose: remove donor-style heavy/double divider bars under table headers
 * while keeping table colors theme-aware and consistent panel-wide.
 */
:root{
  --bc-table-head-bg: var(--card-bg, var(--bs-card-bg, rgba(22,28,38,.82)));
  --bc-table-head-text: var(--text-main, var(--bs-body-color, #e8edf5));
  --bc-table-head-muted: var(--text-muted, #9aa8ba);
  --bc-table-line: var(--border-color, rgba(255,255,255,.10));
  --bc-table-row-bg: rgba(255,255,255,.035);
  --bc-table-row-hover: rgba(255,255,255,.055);
}

/* Shared table reset: remove black strip/double line below table header text. */
table thead,
.table thead,
.dataTable thead,
.dataTables_wrapper table.dataTable thead,
.spro-table thead{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

table thead tr,
.table thead tr,
.dataTable thead tr,
.dataTables_wrapper table.dataTable thead tr,
.spro-table tr:first-child{
  background: var(--bc-table-head-bg) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bc-table-line) !important;
  box-shadow: none !important;
  outline: 0 !important;
}

table thead th,
.table thead th,
.dataTable thead th,
.dataTables_wrapper table.dataTable thead th,
.spro-table th{
  background: transparent !important;
  color: var(--bc-table-head-text) !important;
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--bc-table-line) !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding-top: .52rem !important;
  padding-bottom: .52rem !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* Remove leftover donor pseudo dividers without hiding DataTables sort icons/backgrounds. */
table thead::before,
table thead::after,
.table thead::before,
.table thead::after,
.dataTable thead::before,
.dataTable thead::after,
.spro-table tr:first-child::before,
.spro-table tr:first-child::after{
  content: none !important;
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Make the first body row meet the header with one clean divider, not a dark gutter. */
table tbody tr:first-child td,
.table tbody tr:first-child td,
.dataTable tbody tr:first-child td,
.dataTables_wrapper table.dataTable tbody tr:first-child td,
.spro-table tr:nth-child(2) td{
  border-top: 0 !important;
  box-shadow: none !important;
}

/* Smarters Pro generated tables use tr/th without an explicit thead. Normalize those too. */
.spro-table{
  border-collapse: separate !important;
  border-spacing: 0 4px !important;
}
.spro-table th{
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.spro-table td{
  box-shadow: none !important;
}
.spro-table tr:first-child th:first-child{border-radius: 10px 0 0 0;}
.spro-table tr:first-child th:last-child{border-radius: 0 10px 0 0;}

/* DataTables sorting states often add their own borders; keep the header clean. */
table.dataTable.no-footer,
.dataTables_wrapper table.dataTable.no-footer{
  border-bottom: 1px solid var(--bc-table-line) !important;
}
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{
  box-shadow: none !important;
}

/* Theme compatibility hooks. */
body.nxt-theme-badger_neon_pit,
body[data-panel-theme="badger_neon_pit"]{
  --bc-table-line: rgba(124,255,18,.22);
  --bc-table-head-bg: linear-gradient(180deg,rgba(124,255,18,.065),rgba(124,255,18,.018));
  --bc-table-head-text: #f7fff4;
}
