/* WCAG AA fixes for ARC web applications.
   Load AFTER Bootstrap and site.css so these overrides take precedence. */


/* Bootstrap CSS variable overrides — bump default danger red to meet
   4.5:1 contrast against white. Default #dc3545 fails AA. */
:root {
    --bs-red: #b02a37;
    --bs-danger: #b02a37;
    --bs-danger-rgb: 176, 42, 55;
}


/* Badge color overrides for AA contrast against white text. */
.badge-info {
    background-color: #1a6b8a;
}


/* Bootstrap 3's label-success (#5cb85c) is only ~2.5:1 against white text,
   failing AA. Bootstrap 5's success (#198754) achieves ~4.5:1. */
.label.label-success {
    background-color: #198754;
}


/* Bootstrap 3's btn-warning is white text on #f0ad4e (~1.9:1, fails AA), and its
   hover/active states keep white text on orange (still failing). Use dark text on
   Bootstrap 5's warning yellow (#ffc107), which is ~8:1 — well past AA. */
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
    color: #212529;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active {
    background-color: #ffca2c;
    border-color: #ffc720;
}


/* Bootstrap 3's btn-success is white text on #5cb85c (~2.5:1, fails AA); its
   hover/active #449d44 is ~3.4:1 (still fails). Use Bootstrap 5's success green
   (#198754, ~4.5:1 with white text; hover darkens for more contrast). */
.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
    background-color: #157347;
    border-color: #146c43;
}


/* #6c757d is ~4.24:1 contrast, below the 4.5:1 minimum.
   #6b7280 achieves ~4.83:1 against white while maintaining the muted blue-gray tone. */
.text-muted {
    color: #6b7280 !important;
}


/* Bootstrap's default .btn-link color (#0d6efd) is ~3.68:1 on white,
   which fails WCAG AA (4.5:1 for normal text). #0a58ca achieves ~5.07:1
   and matches Bootstrap's link-hover token, keeping the blue family intact.
   Hover/focus/active darken further (~7.16:1) for clear interaction feedback. */
.btn-link {
    color: #0a58ca;
}

.btn-link:hover,
.btn-link:focus,
.btn-link:active {
    color: #084298;
}


/* ── Button disabled state ────────────────────────────── */

.disabled {
    pointer-events: none;
    text-decoration: none;
    opacity: 65%;
}

.button:disabled,
.button-lg:disabled,
.button-sm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
