/* CRITICAL TABLE STYLES FOR DARK THEME ONLY */

/* 
 * This file contains ONLY the most specific dark theme overrides
 * that aren't already handled by important.css or component styles.
 * 
 * DO NOT add generic table styles or light theme styles here.
 */

/* Ultra-specific dark theme selectors for edge cases */

/* 1. Complex nested structure overrides */
body.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row,
.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row {
  background-color: var(--table-row-bg) !important;
}

body.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:nth-child(even),
.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:nth-child(even) {
  background-color: var(--table-stripe-bg) !important;
}

body.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:hover,
.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:hover {
  background-color: var(--table-row-hover-bg) !important;
  box-shadow: inset 0 0 0 1px rgba(83, 109, 254, 0.25) !important;
}

body.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row td.mat-mdc-cell,
.dark-theme app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row td.mat-mdc-cell {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

/* 2. Material Design Component structure overrides */
body.dark-theme .mat-mdc-table .mdc-data-table__content tr,
body.dark-theme .mdc-data-table__content tr,
body.dark-theme .mdc-data-table__row,
.dark-theme .mat-mdc-table .mdc-data-table__content tr,
.dark-theme .mdc-data-table__content tr,
.dark-theme .mdc-data-table__row {
  background-color: var(--table-row-bg) !important;
}

body.dark-theme .mat-mdc-table .mdc-data-table__content tr:nth-child(even),
body.dark-theme .mdc-data-table__content tr:nth-child(even),
body.dark-theme .mdc-data-table__row:nth-child(even),
.dark-theme .mat-mdc-table .mdc-data-table__content tr:nth-child(even),
.dark-theme .mdc-data-table__content tr:nth-child(even),
.dark-theme .mdc-data-table__row:nth-child(even) {
  background-color: var(--table-stripe-bg) !important;
}

body.dark-theme .mat-mdc-table .mdc-data-table__cell,
body.dark-theme .mdc-data-table__cell,
.dark-theme .mat-mdc-table .mdc-data-table__cell,
.dark-theme .mdc-data-table__cell {
  color: var(--text-primary) !important;
}

/* 3. Container and wrapper overrides */
body.dark-theme .data-table-container,
body.dark-theme .table-wrapper,
body.dark-theme .table-scroll-container,
.dark-theme .data-table-container,
.dark-theme .table-wrapper,
.dark-theme .table-scroll-container {
  background-color: var(--card-bg) !important;
}

/* 4. Inline style overrides (highest priority) */
body.dark-theme tr[style*="background"],
body.dark-theme td[style*="background"],
body.dark-theme tr[style*="color"],
body.dark-theme td[style*="color"],
.dark-theme tr[style*="background"],
.dark-theme td[style*="background"],
.dark-theme tr[style*="color"],
.dark-theme td[style*="color"] {
  background-color: var(--table-row-bg) !important;
  color: var(--text-primary) !important;
}

/* LIGHT THEME BANDED ROW SPECIFIC OVERRIDES */
app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:not(.dark-theme):not(body.dark-theme),
html:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row,
body:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row {
  background-color: var(--table-row-bg) !important;
}

app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:nth-child(even):not(.dark-theme),
html:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:nth-child(even),
body:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:nth-child(even) {
  background-color: var(--table-stripe-bg) !important;
}

app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:hover:not(.dark-theme),
html:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:hover,
body:not(.dark-theme) app-data-table table.mat-mdc-table tbody.mdc-data-table__content tr.mat-mdc-row:hover {
  background-color: var(--table-row-hover-bg) !important;
  box-shadow: inset 0 0 0 1px rgba(63, 81, 181, 0.12) !important;
} 