/**
 * WCAG 2.1 AA Accessibility Fixes
 * This file MUST be loaded AFTER all other CSS (including Bootstrap CDN)
 * Minimal color changes to meet 4.5:1 contrast ratio requirement
 */

/* Navigation links: #808080 → #767676 (4.54:1 contrast on white) */
.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-item .nav-link,
.navbar-light .navbar-nav .dropdown .nav-link,
.navbar-light .navbar-nav .nav-link.dropdown-toggle,
nav.navbar-light .navbar-nav .nav-link,
.navbar .nav-link.dropdown-toggle,
.navbar-nav .dropdown-toggle {
    color: #767676 !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-item .nav-link:hover,
.navbar-light .navbar-nav .nav-item .nav-link:focus,
.navbar .nav-link.dropdown-toggle:hover,
.navbar .nav-link.dropdown-toggle:focus {
    color: #595959 !important;
}

/* Primary link color: #008cba → #006d8f (4.52:1 on #f2f2f2, 5.1:1 on white) */
a {
    color: #006d8f;
}

a:hover,
a:focus {
    color: #004d66;
}

/* Table links with striped background */
.table a,
.table-striped tbody tr a {
    color: #006d8f;
}

/* Badge fixes for WCAG AA contrast */
.badge-success {
    background-color: #2e7d32 !important;
    color: #ffffff !important;
}

.badge-primary {
    background-color: #006d8f !important;
    color: #ffffff !important;
}

.badge-warning {
    background-color: #e99002 !important;
    color: #000000 !important;
}

/* Dropdown menu items */
.dropdown-item {
    color: #212529;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #16181b;
    background-color: #f8f9fa;
}

/* Bootstrap .text-primary utility class: #008cba → #006d8f */
/* Using high specificity selectors to override inline styles */
.text-primary,
div.text-primary,
span.text-primary,
p.text-primary,
.card .text-primary,
.card-header .text-primary,
body .text-primary {
    color: #006d8f !important;
}

/* Card header links (including stretched-link) */
.card-header a,
.card-header .stretched-link,
a.stretched-link {
    color: #006d8f !important;
}

.card-header a:hover,
.card-header a:focus,
.card-header .stretched-link:hover,
.card-header .stretched-link:focus,
a.stretched-link:hover,
a.stretched-link:focus {
    color: #004d66 !important;
}

/* Bootstrap .table-info contextual class: white text on #5bc0de has 2.09:1 contrast */
/* Fix: Use dark text (#1a1a1a) on light blue background for 7.2:1 contrast */
.table-info,
th.table-info,
td.table-info,
.table .table-info,
.table-striped .table-info,
.table-hover .table-info {
    color: #1a1a1a !important;
}

/* Also fix other Bootstrap contextual table classes that may have contrast issues */
.table-success,
th.table-success,
td.table-success {
    color: #1a1a1a !important;
}

.table-warning,
th.table-warning,
td.table-warning {
    color: #1a1a1a !important;
}
