﻿:root {
    --default-a-link-color: #024070;
    --tableHeaderRow-color: #d1470c;
}

.table {
    color: var(--default-a-link-color) !important;
    padding-bottom: 0px;
    margin-bottom: 0px;
    margin-left: auto !important;
    margin-right: auto !important;
}

    .table a {
        color: var(--default-a-link-color) !important; /* adapts to light/dark */
        text-decoration: none;
    }

        .table a:hover,
        .table a:focus,
        .table a:active {
            color: var(--default-a-link-color) !important; /* adapts to light/dark */
            text-decoration: underline;
        }

    /* Alternate row case */
    .table .alternateRow a {
        color: #fff !important; /* text colour defined for table rows */
        text-decoration: none;
    }

        .table .alternateRow a:hover,
        .table .alternateRow a:focus,
        .table .alternateRow a:active {
            color: var(--bs-warning, #ffc107) !important; /* yellow hover for contrast */
            text-decoration: underline !important;
        }

    /* Buttons inside table should remain button style */
    .table a.btn {
        color: #fff !important;
        text-decoration: none !important;
    }
/* Light mode: keep buttons white inside tables */
[data-bs-theme="light"] .table a.btn,
[data-bs-theme="light"] .table a.btn:hover,
[data-bs-theme="light"] .table a.btn:focus,
[data-bs-theme="light"] .table a.btn:active {
    color: #fff !important;
    text-decoration: none !important;
}

/* Dark mode: keep buttons white inside tables */
[data-bs-theme="dark"] .table a.btn,
[data-bs-theme="dark"] .table a.btn:hover,
[data-bs-theme="dark"] .table a.btn:focus,
[data-bs-theme="dark"] .table a.btn:active {
    color: #fff !important;
    text-decoration: none !important;
}

[data-bs-theme="dark"] .table a {
    color: #fff !important;
    text-decoration: none;
}

    [data-bs-theme="dark"] .table a:hover,
    [data-bs-theme="dark"] .table a:focus {
        color: #fcff00 !important;
        text-decoration: underline;
    }

[data-bs-theme="light"] tr.alternateRow a {
    color: var(--default-a-link-color) !important; /* matches the .alternateRow text colour */
    text-decoration: none;
}

    [data-bs-theme="light"] tr.alternateRow a:hover,
    [data-bs-theme="light"] tr.alternateRow a:focus {
        color: var(--default-a-link-color) !important;
        text-decoration: underline !important;
    }


tr.alternateRow > td {
    background-color: #646464 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] tr.alternateRow > td {
    background-color: #646464 !important;
    color: #fff !important;
}

/* Light mode alternateRow links */
[data-bs-theme="light"] tr.alternateRow > td a {
    color: #fff !important;
    text-decoration: none !important;
}

    [data-bs-theme="light"] tr.alternateRow > td a:hover,
    [data-bs-theme="light"] tr.alternateRow > td a:focus,
    [data-bs-theme="light"] tr.alternateRow > td a:active {
        color: #fcff00 !important; /* yellow hover */
        text-decoration: underline !important;
    }

/* Dark mode alternateRow links */
[data-bs-theme="dark"] tr.alternateRow > td a {
    color: #fff !important;
    text-decoration: none !important;
}

    [data-bs-theme="dark"] tr.alternateRow > td a:hover,
    [data-bs-theme="dark"] tr.alternateRow > td a:focus,
    [data-bs-theme="dark"] tr.alternateRow > td a:active {
        color: #fcff00 !important; /* yellow hover */
        text-decoration: underline !important;
    }

th, .tableHeaderRow {
    background-color: var(--tableHeaderRow-color) !important;
    color: #FFF !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.table thead th {
    background-color: var(--tableHeaderRow-color) !important;
    color: #fff !important;
    text-align: center !important;
    vertical-align: middle !important;
    /* Kill Bootstrap's overlay */
    box-shadow: none !important;
    background-clip: padding-box !important;
}

td.text-center {
    text-align: center;
    vertical-align: middle;
}

    td.text-center .form-control {
        display: inline-block;
        text-align: center;
    }

/*td attribute set to data-ishidden=1*/
tr[data-ishidden="1"] td, td[data-ishidden="1"] {
    background-color: var(--bs-info) !important; /* or your bg-info style */
    color: #fff;
}

