/*
 * Accessibility overrides — WCAG 2.1 AA contrast fixes on top of Bootstrap 5.3.
 *
 * Bootstrap's *-subtle badges pair the base -500 token (e.g. #0d6efd) with
 * the *-bg-subtle (e.g. #cfe2ff light / #031633 dark). That combination lands
 * in the 1.47-4.0:1 range, which fails WCAG 2.1 AA (4.5:1 at 12px bold).
 *
 * The *-text-emphasis tokens auto-adapt per theme (darker in light mode,
 * lighter in dark mode) and land cleanly above 4.5:1 in both.
 */

.badge.bg-primary-subtle.text-primary       { color: var(--bs-primary-text-emphasis) !important; }
.badge.bg-success-subtle.text-success       { color: var(--bs-success-text-emphasis) !important; }
.badge.bg-secondary-subtle.text-secondary   { color: var(--bs-secondary-text-emphasis) !important; }
.badge.bg-info-subtle.text-info             { color: var(--bs-info-text-emphasis) !important; }
.badge.bg-warning-subtle.text-warning       { color: var(--bs-warning-text-emphasis) !important; }
.badge.bg-danger-subtle.text-danger         { color: var(--bs-danger-text-emphasis) !important; }
.badge.bg-dark-subtle.text-dark             { color: var(--bs-body-color) !important; }

/*
 * Outline buttons: Bootstrap's default outline-* text uses the base -500
 * token against the body background, which fails AA in both themes for
 * info (1.95:1 light), primary (3.16-4.24:1), and secondary (3.28:1).
 * Raise to the per-theme -text-emphasis token.
 */
.btn-outline-primary:not(:hover):not(:focus):not(:active)   { color: var(--bs-primary-text-emphasis); border-color: var(--bs-primary-text-emphasis); }
.btn-outline-success:not(:hover):not(:focus):not(:active)   { color: var(--bs-success-text-emphasis); border-color: var(--bs-success-text-emphasis); }
.btn-outline-info:not(:hover):not(:focus):not(:active)      { color: var(--bs-info-text-emphasis); border-color: var(--bs-info-text-emphasis); }
.btn-outline-danger:not(:hover):not(:focus):not(:active)    { color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-text-emphasis); }
.btn-outline-warning:not(:hover):not(:focus):not(:active)   { color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-text-emphasis); }
.btn-outline-secondary:not(:hover):not(:focus):not(:active) { color: var(--bs-secondary-text-emphasis); border-color: var(--bs-secondary-text-emphasis); }

/*
 * Strengthen focus ring visibility in both themes (WCAG 2.4.7 Focus Visible).
 */
:focus-visible {
  outline: 2px solid var(--bs-link-color);
  outline-offset: 2px;
}
