/* ==========================================================================
   Accessibility Overrides — WCAG 2.1 AA / ADA Section 508
   Lakeland Housing Authority — WebPresence
   ========================================================================== */

/* --bs-secondary-color fix
   Bootstrap computes this as rgba($body-color, .75) = hsla(249,9%,48%,.75),
   which composites to #9693a4 on white — only 2.99:1 contrast.
   Override to #72707d for a 4.85:1 ratio against #ffffff.
   Affects: caption, .form-text, .form-control::placeholder,
            .form-control:disabled, .text-body-secondary
   -------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
    --bs-secondary-color: #72707d;
    --bs-secondary-rgb: 114, 112, 125;
}

/* Direct override for elements where Bootstrap bakes in rgba($body-color,.75)
   at compile time rather than using the CSS variable.
   #9693a4 on #ffffff = 2.99:1. Override to #72707d = 4.85:1.
   -------------------------------------------------------------------------- */
.text-body-secondary,
.form-text,
caption,
.form-control::placeholder,
.form-control:disabled,
.form-select:disabled {
    color: #72707d !important;
}

/* Body-content link distinction (WCAG 1.4.1 — Use of Color)
   Links colored #065d8f have only 2.69:1 contrast against surrounding
   text #101010. Underline body-content links so they are distinguishable
   without relying solely on color. Excludes nav, buttons, badges, cards.
   -------------------------------------------------------------------------- */
main p a:not(.btn):not(.badge),
main li a:not(.btn):not(.badge),
main td a:not(.btn):not(.badge),
main dd a:not(.btn):not(.badge) {
    text-decoration: underline;
    text-decoration-color: rgba(6, 93, 143, 0.4);
    text-underline-offset: 2px;
}

/* Footer .text-reset link contrast fix
   Footer copyright bar has bg #f7f7ff. Previous #9da2ad only achieved 2.4:1.
   Use #6b6e76 for 4.79:1 ratio against #f7f7ff (WCAG AA compliant).
   -------------------------------------------------------------------------- */
footer .text-reset {
    color: #6b6e76 !important;
}

main p a:not(.btn):not(.badge):hover,
main li a:not(.btn):not(.badge):hover,
main td a:not(.btn):not(.badge):hover,
main dd a:not(.btn):not(.badge):hover {
    text-decoration-color: rgba(6, 93, 143, 1);
}
