/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * Screen-only table colors for explicit site and component dark themes.
 */
@media screen {
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) {
        --dt-surface: #18291f;
        --dt-header: #304738;
        --dt-stripe: #1e3227;
        --dt-hover: #2b4535;
        --dt-ink: #f3eee3;
        --dt-muted: #c3c7bc;
        --dt-link: #dfc58b;
        --dt-line: #526b59;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table {
        --hd-ink: var(--dt-ink);
        --hd-muted: var(--dt-muted);
        --hd-text-muted: var(--dt-muted);
        --hd-border: var(--dt-line);
        --sra-muted: var(--dt-muted);
        color-scheme: dark;
        color: var(--dt-ink) !important;
        background-color: var(--dt-surface) !important;
        border-color: var(--dt-line) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(thead, tbody, tfoot, tr) {
        color: var(--dt-ink) !important;
        background-color: transparent !important;
        border-color: var(--dt-line) !important;
    }
    /* Encoded heatmap fills and explicitly colored data cells retain their palette. */
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(th, td):where(:not([style*="background"]):not(.src-heatmap-cell):not(.exa-chr-heatmap-cell)) {
        color: var(--dt-ink) !important;
        background-color: var(--dt-surface) !important;
        border-color: var(--dt-line) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table thead th {
        color: var(--dt-ink) !important;
        background-color: var(--dt-header) !important;
    }
    /* Mobile card rows have gaps between cells, so their surfaces match the cells. */
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr {
        background-color: var(--dt-surface) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:nth-child(even) {
        background-color: var(--dt-stripe) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:hover {
        background-color: var(--dt-hover) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:nth-child(even) > :is(th, td):where(:not([style*="background"]):not(.src-heatmap-cell):not(.exa-chr-heatmap-cell)) {
        background-color: var(--dt-stripe) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:hover > :is(th, td):where(:not([style*="background"]):not(.src-heatmap-cell):not(.exa-chr-heatmap-cell)) {
        background-color: var(--dt-hover) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:is(.selected, .is-selected, [aria-selected="true"], :has(input[type="checkbox"]:checked)),
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table tbody tr:is(.selected, .is-selected, [aria-selected="true"], :has(input[type="checkbox"]:checked)) > :is(th, td):where(:not([style*="background"]):not(.src-heatmap-cell):not(.exa-chr-heatmap-cell)) {
        background-color: #3d513c !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(caption, small, time, .text-muted),
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table td::before {
        color: var(--dt-muted) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table a:not(.btn):not(.hd-btn) {
        color: var(--dt-link) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table code {
        color: #e7d4a9 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(.text-dark, .wgu-order-number, .wal-file-cell) {
        color: var(--dt-ink) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(button, .btn, .hd-btn) {
        color: var(--dt-ink) !important;
        background-color: var(--dt-header) !important;
        border-color: #819980 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(button, .btn, .hd-btn):is(.btn-danger, .wal-delete-button, .profiles-btn--danger) {
        color: #ffd1c8 !important;
        background-color: #59352e !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(a, button, input, select, summary):focus-visible {
        outline: 3px solid var(--dt-link) !important;
        outline-offset: 3px;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(.badge, [class*="-badge"], [class*="-pill"], .profiles-pack, .wgu-status, .wal-state, .profiles-queue-status-stack > span) {
        color: #e9eee6 !important;
        background-color: #344b3c !important;
        border-color: var(--dt-line) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(.badge-success, [class*="--success"], [class*="--ready"], .wgu-status--complete) {
        color: #c9f2d0 !important;
        background-color: #244b35 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(.badge-warning, .badge--warning, [class*="--pending"], .wgu-status--working, .wgu-status--attention) {
        color: #ffe2a3 !important;
        background-color: #514125 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table :is(.badge-danger, .badge--danger, [class*="--error"]) {
        color: #ffd1c8 !important;
        background-color: #59352e !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table .badge-info {
        color: #ccecf6 !important;
        background-color: #234550 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table .text-warning { color: #ffe2a3 !important; }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table .text-success { color: #c9f2d0 !important; }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) table .text-danger { color: #ffd1c8 !important; }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) :is(div, section):has(> table),
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) .dataTables_wrapper {
        color: var(--dt-ink);
        background-color: var(--dt-surface) !important;
        border-color: var(--dt-line) !important;
        scrollbar-color: #819980 var(--dt-surface);
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) .dataTables_wrapper :is(label, .dataTables_info) {
        color: var(--dt-muted) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) .dataTables_wrapper :is(input, select, .page-link) {
        color: var(--dt-ink) !important;
        background-color: var(--dt-surface) !important;
        border-color: var(--dt-line) !important;
        color-scheme: dark;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) .dataTables_wrapper .page-item.active .page-link {
        color: #18291f !important;
        background-color: var(--dt-link) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) :is(div, section):has(> table):focus-visible,
    :is([data-theme="dark"], .theme-dark, .dark-theme, .psm-theme-dark) .dataTables_wrapper :is(input, select, .page-link):focus-visible {
        outline: 3px solid var(--dt-link) !important;
        outline-offset: 3px;
    }
}
