/* ============================================
   Accessible Color Contrast Fixes
   WCAG 2.1 Level AA Compliance (4.5:1 ratio)

   CRITICAL: This file MUST be loaded LAST in index.html
   to override theme.min.css and MudBlazor hardcoded colors.
   ============================================ */

/* ============================================
   CSS Variables for Accessible Colors
   ============================================ */

:root {
    /* Primary colors - accessible versions */
    --primary-accessible: #1a5fb4 !important;
    --primary-on-dark: #6ea8fe !important;
    --primary-light-accessible: #0071e3 !important;
    /* Status badge colors - accessible foreground/background pairs */
    --success-text: var(--falcon-badge-soft-success-color) !important;
    --success-bg: var(--falcon-badge-soft-success-background-color) !important;
    --warning-text: var(--falcon-badge-soft-warning-color) !important;
    --warning-bg: var(--falcon-badge-soft-warning-background-color) !important;
    --danger-text: #842029 !important;
    --danger-bg: #f8d7da !important;
    --secondary-text: #2d3748 !important;
    --secondary-bg: #e3e6ea !important;
    --info-text: #055160 !important;
    --info-bg: #cff4fc !important;
    /* Compliance badge colors */
    --compliance-tracking-text: #2d3748 !important;
    --compliance-tracking-bg: #aed39e !important;
    --compliance-outcome-text: #2d3748 !important;
    --compliance-outcome-bg: #b7d4fa !important;
    /* Background colors */
    --bg-white: #ffffff !important;
    --bg-light-gray: #edf2f9 !important;
    --bg-card: #f9fafd !important;
    /* MudBlazor background overrides -- force white for WCAG contrast */
    --mud-palette-surface: #ffffff !important;
    --mud-palette-background-gray: #ffffff !important;
    --mud-palette-table-hover: rgba(0, 0, 0, 0.04) !important;
    --mud-palette-table-striped: rgba(0, 0, 0, 0.02) !important;
    --mud-palette-error: #842029 !important;

    /* Falcon theme variable overrides */
    --falcon-primary: #1a5fb4 !important;
    --falcon-primary-rgb: 26, 95, 180 !important;
    --falcon-link-color: #1a5fb4 !important;
    --falcon-link-hover-color: #155a99 !important;
    --falcon-badge-soft-success-color: #007B47 !important;
    --falcon-form-check-input-checked-bg-color: #1a5fb4 !important;
    --falcon-form-check-input-checked-border-color: #1a5fb4 !important;
    --falcon-form-check-input-indeterminate-bg-color: #1a5fb4 !important;
    --falcon-form-check-input-indeterminate-border-color: #1a5fb4 !important;
    --falcon-navbar-light-brand-color: #1a5fb4 !important;
    --falcon-navbar-dark-brand-color: #1a5fb4 !important;
    --falcon-navbar-vertical-link-active-color: #1a5fb4 !important;
    --falcon-search-focus-border-color: #1a5fb4 !important;
}

/* ============================================
   GLOBAL-005: Primary Blue Text on Light Backgrounds
   Fix: #2c7be5 (3.68-4.14:1) -> #1a5fb4 (5.2-5.7:1)
   ============================================ */

.text-primary,
a.text-primary {
    color: var(--primary-accessible) !important;
}

.mud-breadcrumb-item a,
.mud-breadcrumbs a {
    color: var(--primary-accessible) !important;
}

.mud-button-text-primary,
.mud-link.mud-primary-text {
    color: var(--primary-accessible) !important;
}

.text-uppercase.fs-0,
.card-header .text-uppercase {
    color: var(--primary-accessible) !important;
}

.status-text-primary,
.label-primary {
    color: var(--primary-accessible) !important;
}

/* ============================================
   GLOBAL-006: Success Badge Colors
   Fix: #00864e (3.95:1) -> #006838 (5.1:1)
   ============================================ */

.badge-soft-success,
.badge.badge-success,
.mud-chip-success .mud-chip-content {
    color: var(--success-text) !important;
    background-color: var(--success-bg) !important;
}

.status-success {
    color: var(--success-text) !important;
}

/* ============================================
   GLOBAL-007: Secondary Badge Colors
   Fix: #7d899b (2.83:1) -> #2d3748 (10.4:1)
   ============================================ */

.badge-soft-secondary,
.badge.badge-secondary,
.mud-chip-secondary .mud-chip-content {
    color: var(--secondary-text) !important;
    background-color: var(--secondary-bg) !important;
}

.status-secondary,
.text-secondary {
    color: var(--secondary-text) !important;
}

/* ============================================
   CC-006: Dark Theme Link Colors
   Fix: #2c7be5 (4.34:1) -> #6ea8fe (7.8:1)
   ============================================ */

body.dark .text-primary,
body.dark a.text-primary,
body.dark .mud-link,
[data-theme="dark"] .text-primary,
[data-theme="dark"] a.text-primary,
[data-theme="dark"] .mud-link {
    color: var(--primary-on-dark) !important;
}

body.dark .mud-breadcrumb-item a,
[data-theme="dark"] .mud-breadcrumb-item a {
    color: var(--primary-on-dark) !important;
}

.dark a:not(.btn),
.dark .text-primary,
[data-theme="dark"] a:not(.btn),
[data-theme="dark"] .text-primary {
    color: #6ea8fe !important;
}

.dark a:not(.btn):hover,
[data-theme="dark"] a:not(.btn):hover {
    color: #88b8ff !important;
}

/* ============================================
   Warning Badge Colors (Info/Caution)
   ============================================ */

.badge-soft-warning,
.badge.badge-warning,
.mud-chip-warning .mud-chip-content {
    color: var(--warning-text) !important;
    background-color: var(--warning-bg) !important;
}

.status-warning,
.text-warning {
    color: var(--warning-text) !important;
}

/* ============================================
   Danger/Error Badge Colors
   ============================================ */

.badge-soft-danger,
.badge.badge-danger,
.mud-chip-error .mud-chip-content {
    color: var(--danger-text) !important;
    background-color: var(--danger-bg) !important;
}

.status-danger,
.status-error,
.text-error,
.validation-message-small {
    color: var(--danger-text) !important;
}

/* ============================================
   Info Badge Colors
   ============================================ */

.badge-soft-info,
.badge.badge-info,
.mud-chip-info .mud-chip-content {
    color: var(--info-text) !important;
    background-color: var(--info-bg) !important;
}

.status-info,
.text-info {
    color: var(--info-text) !important;
}

/* ============================================
   CC-007/CC-008: Compliance Badge Colors
   ============================================ */

.badge-compliance-tracking,
.compliance-tracking-status {
    color: var(--compliance-tracking-text) !important;
    background-color: var(--compliance-tracking-bg) !important;
}

.badge-compliance-outcome,
.compliance-outcome-status {
    color: var(--compliance-outcome-text) !important;
    background-color: var(--compliance-outcome-bg) !important;
}

/* ============================================
   MudBlazor Component Color Overrides
   ============================================ */

.mud-chip.mud-chip-color-primary .mud-chip-content {
    color: var(--bg-white) !important;
    background-color: var(--primary-accessible) !important;
}

.mud-button-text.mud-primary-text {
    color: var(--primary-accessible) !important;
}

.mud-alert-filled-success {
    color: var(--bg-white) !important;
    background-color: var(--success-text) !important;
}

.mud-alert-filled-error {
    color: var(--bg-white) !important;
    background-color: var(--danger-text) !important;
}

.mud-alert-filled-warning {
    color: var(--bg-white) !important;
    background-color: var(--warning-text) !important;
}

.mud-alert-filled-info {
    color: var(--bg-white) !important;
    background-color: var(--info-text) !important;
}

.mud-alert-outlined-success {
    color: var(--success-text) !important;
    border-color: var(--success-text) !important;
}

.mud-alert-outlined-error {
    color: var(--danger-text) !important;
    border-color: var(--danger-text) !important;
}

.mud-alert-outlined-warning {
    color: var(--warning-text) !important;
    border-color: var(--warning-text) !important;
}

.mud-alert-outlined-info {
    color: var(--info-text) !important;
    border-color: var(--info-text) !important;
}

.mud-alert.mud-alert-text-error {
    background-color: var(--danger-bg) !important;
}

.mud-alert-text-error .mud-alert-message,
.mud-alert-text-error .mud-alert-icon {
    color: var(--danger-text) !important;
}

/* ============================================
   Axe-Reported Selectors
   Fixes from color-contrast-output.md
   ============================================ */
header .mud-button-label {
    color: var(--primary-accessible) !important;
}

button:not(.mud-disabled):not([disabled]) > .mud-button-outlined-primary > .mud-button-label {
    color: var(--primary-light-accessible) !important;
}

button.mud-button-text:not(:disabled) > .mud-button-label {
    color: var(--primary-accessible) !important;
}

.text-600 {
    color: var(--secondary-text) !important;
}

button:not(.mud-disabled):not([disabled]) > .mud-button-label > .d-sm-inline-block {
    color: var(--secondary-text) !important;
}

.mud-badge.mud-theme-warning,
.mud-badge.mud-elevation-0.mud-theme-warning {
    background-color: #b45309 !important;
    color: var(--bg-white) !important;
}

/* ============================================
   MudTable Background Overrides
   Force white backgrounds so #2d3748 text achieves
   ~12:1 contrast. MudBlazor built-in CSS applies
   non-white backgrounds via custom properties that
   axe-core detects as reducing contrast.
   ============================================ */

/*.mud-table,
.mud-table-root,
.mud-table-container {
    background-color: #ffffff !important;
}

.mud-table-head,
.mud-table-head th,
.mud-table-head .mud-table-cell {
    background-color: #ffffff !important;
}

.mud-table-body,
.mud-table-body .mud-table-row,
.mud-table-body tr {
    background-color: #ffffff !important;
}

.mud-table-foot,
.mud-table-foot tr {
    background-color: #ffffff !important;
}*/

/* Pin appbar and its inner toolbar back to the theme palette background.
   --mud-palette-surface is #fff (above), which would otherwise bleed through. */
.mud-appbar,
.mud-toolbar-appbar {
    background-color: var(--mud-palette-appbar-background, #EDF2F9) !important;
    color: var(--mud-palette-appbar-text, #2d3748) !important;
}

.mud-drawer {
    background-color: var(--mud-palette-drawer-background, #EDF2F9) !important;
}

/* Alert backgrounds for non-filled variants */
.mud-alert.mud-alert-outline {
    background-color: #ffffff !important;
}

/* ============================================
   MudTable Text Contrast
   #2d3748 on #ffffff = 10.4:1 (WCAG AAA)
   background-color set on cells directly so axe-core
   resolves contrast without walking the DOM tree
   through MudBlazor's CSS-custom-property layers.
   ============================================ */

.mud-table-cell,
.mud-table .mud-table-cell,
td.mud-table-cell {
    color: #2d3748 !important;
    background-color: #ffffff !important;
}

.mud-table-head .mud-table-cell,
.mud-table-head th {
    color: #2d3748 !important;
    background-color: rgb(249, 250, 253) !important;
}

.mud-table-sort-label,
.mud-table-sort-label.mud-clickable {
    color: #2d3748 !important;
    background-color: rgb(249, 250, 253) !important;
}

.mud-table-sort-label.mud-clickable:hover {
    color: #2d3748 !important;
    background-color: rgb(249, 250, 253) !important;
    opacity: 0.70 !important;
}

.font-weight-600.fst-italic,
span.font-weight-600.fst-italic,
span.font-weight-600.fst-italic.text-truncate {
    color: #2d3748 !important;
}

.multiline-truncate-5 {
    color: #2d3748 !important;
}

/* MudTable pager text elements */
.mud-table-pagination,
.mud-table-pagination p,
.mud-table-pagination-display,
.mud-table-pagination-select p,
.mud-table-pagination-toolbar {
    color: #2d3748 !important;
}

/* ============================================
   Filled-Primary Button Contrast
   #ffffff on #1a5fb4 gives ~5.57:1 (passes 4.5:1)
   ============================================ */

.mud-button-filled.mud-button-filled-primary:enabled:not(.mud-disabled) {
    background-color: var(--primary-light-accessible) !important;
    color: #ffffff !important;
}

.mud-button-filled-primary {
    background-color: #1a5fb4 !important;
}

.mud-button-filled-primary > .mud-button-label,
.mud-button-filled-primary .mud-button-label {
    color: #ffffff !important;
}

/* ============================================
   MudNavLink Active Colors
   ============================================ */

.mud-nav-link.active,
.mud-nav-link-active {
    color: #1a5fb4 !important;
}

/* ============================================
   DevExpress Toast Contrast
   8 violations on report viewer pages
   ============================================ */

.dx-toast-error {
    background-color: #b02a37 !important;
}

.dx-toast-error .dx-toast-message,
.dx-toast-error .dx-toast-content,
.dx-toast-info .dx-toast-message,
.dx-toast-info .dx-toast-content,
.dx-toast-warning .dx-toast-message,
.dx-toast-warning .dx-toast-content,
.dx-toast-success .dx-toast-message,
.dx-toast-success .dx-toast-content {
    color: #ffffff !important;
}

/* ============================================
   Miscellaneous Contrast Fixes
   ============================================ */

/* Institution Dashboard sidebar nav text (2 violations)
   #2d3748 on #EDF2F9 gives ~9.2:1 */
.nav-link-text {
    color: #2d3748 !important;
}

/* Institution Demographics "View Census" button span */
button .d-sm-block,
button .d-none.d-sm-block {
    color: inherit !important;
}

/* MudAlert message text for non-filled variants */
/*.mud-alert-message {
    color: #2d3748 !important;
}*/

.mud-alert-filled-success .mud-alert-message,
.mud-alert-filled-error .mud-alert-message,
.mud-alert-filled-warning .mud-alert-message,
.mud-alert-filled-info .mud-alert-message {
    color: #ffffff !important;
}

/* Default MudButton labels inherit theme TextPrimary */

.d-sm-inline-block,
.d-none.d-sm-inline-block {
    color: inherit !important;
}

h5.fs-0.mb-0 {
    color: #2d3748 !important;
}

/* ============================================
   Page-Specific Color Contrast Fixes
   ============================================ */

/* Institution Notes (IN-001: 59 violations) */
.notes-content,
.notes-content p,
.notes-content span {
    color: var(--secondary-text) !important;
}

/* DCH Facility Claim Dashboard (DCHFCD-001: 100 violations) */
.claim-dashboard .mud-table-cell,
.claim-dashboard td {
    color: var(--secondary-text) !important;
}

/* Compliance Profile (CP-001 to CP-003: 22 violations) */
.compliance-profile .status-badge,
.compliance-tracking-badge,
.compliance-outcome-badge,
.compliance-review-badge {
}

/* ============================================
   Falcon Theme Color Overrides
   ============================================ */

.text-primary,
.text-uppercase.fs-0,
.text-600 a,
.text-700 a {
    color: var(--primary-accessible) !important;
}

.card .text-primary,
.card-body .text-primary {
    color: var(--primary-accessible) !important;
}

/* ============================================
   Focus Indicators (color-related)
   ============================================ */

body.dark a:focus,
body.dark button:focus,
[data-theme="dark"] a:focus,
[data-theme="dark"] button:focus {
    outline: 2px solid var(--primary-on-dark) !important;
    outline-offset: 2px !important;
}

/* ============================================
   Icon Colors (ensure sufficient contrast)
   ============================================ */

.text-primary > i,
.text-primary > svg,
.text-primary .fa,
.text-primary .fas,
.text-primary .material-icons {
    color: inherit !important;
}

.status-success .fa,
.status-success .material-icons {
    color: var(--success-text) !important;
}

.status-danger .fa,
.status-danger .material-icons,
.status-error .fa,
.status-error .material-icons {
    color: var(--danger-text) !important;
}

.status-warning .fa,
.status-warning .material-icons {
    color: var(--warning-text) !important;
}

/* ============================================
   Table and Grid Enhancements
   ============================================ */

.mud-table td,
.mud-table th,
.table td,
.table th {
    color: var(--secondary-text) !important;
}

.mud-table a,
.table a {
    color: var(--primary-accessible) !important;
}

body.dark .mud-table td,
body.dark .mud-table th,
[data-theme="dark"] .mud-table td,
[data-theme="dark"] .mud-table th {
}

/* ============================================
   Form Controls
   ============================================ */

.mud-input:not(.mud-disabled) .mud-input-label {
    color: var(--secondary-text) !important;
}

.mud-select:not(.mud-disabled) .mud-select-label {
    color: var(--secondary-text) !important;
}

label:not(.mud-disabled):not([disabled]):not([aria-disabled="true"]) {
    color: var(--secondary-text) !important;
}

.mud-input-label.mud-input-label-asterisk::after,
label.required::after {
    color: var(--danger-text) !important;
}

.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol.mud-input-error,
.mud-input-helper-text.mud-input-error {
    color: var(--danger-text) !important;
}

.mud-input-error .mud-input-outlined-border {
    border-color: var(--danger-text) !important;
}

.mud-button-text:not(:disabled) > .mud-icon-button-label {
    color: var(--primary-accessible) !important;
}

/* ============================================
   Validation and Error Messages
   ============================================ */

.mud-input-error,
.validation-message,
.field-validation-error,
.validation-message-small {
    color: var(--danger-text) !important;
}

.mud-input-success,
.validation-success {
    color: var(--success-text) !important;
}

/* ============================================
   Utility Classes for Developers
   ============================================ */

.text-accessible-primary {
    color: var(--primary-accessible) !important;
}

.bg-accessible-primary {
    background-color: var(--primary-accessible) !important;
    color: var(--bg-white) !important;
}

.text-accessible-success {
    color: var(--success-text) !important;
}

.bg-accessible-success {
    background-color: var(--success-bg) !important;
    color: var(--success-text) !important;
}

.text-accessible-danger {
    color: var(--danger-text) !important;
}

.bg-accessible-danger {
    background-color: var(--danger-bg) !important;
    color: var(--danger-text) !important;
}

.text-accessible-warning {
    color: var(--warning-text) !important;
}

.bg-accessible-warning {
    background-color: var(--warning-bg) !important;
    color: var(--warning-text) !important;
}

.text-accessible-info {
    color: var(--info-text) !important;
}

.bg-accessible-info {
    background-color: var(--info-bg) !important;
    color: var(--info-text) !important;
}

.text-accessible-secondary {
    color: var(--secondary-text) !important;
}

.bg-accessible-secondary {
    background-color: var(--secondary-bg) !important;
    color: var(--secondary-text) !important;
}

/* ============================================
   Color Contrast Ratios Achieved:
   - Primary blue: 5.7:1 on white (was 4.14:1)
   - Success green: 5.1:1 (was 3.95:1)
   - Secondary gray: 10.4:1 (was 2.83:1)
   - Dark theme links: 7.8:1 (was 4.34:1)
   - Compliance tracking: 6.2:1 (was 3.13:1)
   - Compliance outcome: 7.1:1 (was 3.42:1)
   WCAG 2.1 Level AA requires 4.5:1 for normal text.
   ============================================ */

/* ============================================
   Inline Style Overrides for Razor Components
   ============================================ */

.tracking-status {
    background-color: var(--compliance-tracking-bg) !important;
    color: var(--compliance-tracking-text) !important;
}

.outcome-status {
    background-color: var(--compliance-outcome-bg) !important;
    color: var(--compliance-outcome-text) !important;
}

.review-status {
    background-color: var(--warning-bg) !important;
    color: var(--warning-text) !important;
}

.legend .legendone,
.legendone {
    background-color: var(--primary-accessible) !important;
}

.legend .legendsecond,
.legendsecond {
    background-color: var(--info-text) !important;
}

.legend .legendthird,
.legendthird {
    background-color: var(--warning-text) !important;
}

[style*="#2c7be5"],
[style*="rgb(44, 123, 229)"] {
    color: var(--primary-accessible) !important;
}

[style*="background-color: #2c7be5"],
[style*="background-color: rgb(44, 123, 229)"],
[style*="background:#2c7be5"] {
    background-color: var(--primary-accessible) !important;
}

[style*="#AED39E"],
[style*="background-color: #AED39E"],
[style*="background:#AED39E"] {
    background-color: var(--compliance-tracking-bg) !important;
    color: var(--compliance-tracking-text) !important;
}

[style*="#B7D4FA"],
[style*="background-color: #B7D4FA"],
[style*="background:#B7D4FA"] {
    background-color: var(--compliance-outcome-bg) !important;
    color: var(--compliance-outcome-text) !important;
}

[style*="#00864e"],
[style*="rgb(0, 134, 78)"] {
    color: var(--success-text) !important;
}

[style*="#7d899b"],
[style*="rgb(125, 137, 155)"] {
    color: var(--secondary-text) !important;
}

/* ============================================
   Falcon Theme CSS Variable Overrides
   ============================================ */

.form-check-input:checked {
    background-color: var(--primary-accessible) !important;
    border-color: var(--primary-accessible) !important;
}

.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--primary-accessible) !important;
    border-color: var(--primary-accessible) !important;
}

.form-range::-webkit-slider-thumb {
    background-color: var(--primary-accessible) !important;
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-accessible) !important;
}

.btn-primary {
    --falcon-btn-bg: #1a5fb4 !important;
    --falcon-btn-border-color: #1a5fb4 !important;
    --falcon-btn-hover-bg: #155a99 !important;
    --falcon-btn-disabled-bg: #1a5fb4 !important;
    --falcon-btn-disabled-border-color: #1a5fb4 !important;
}

.btn-outline-primary {
    --falcon-btn-color: #1a5fb4 !important;
    --falcon-btn-border-color: #1a5fb4 !important;
    --falcon-btn-hover-bg: #1a5fb4 !important;
    --falcon-btn-hover-border-color: #1a5fb4 !important;
    --falcon-btn-active-bg: #1a5fb4 !important;
    --falcon-btn-active-border-color: #1a5fb4 !important;
    --falcon-btn-disabled-color: #1a5fb4 !important;
    --falcon-btn-disabled-border-color: #1a5fb4 !important;
}

.list-group-item.active {
    --falcon-list-group-active-bg: #1a5fb4 !important;
    --falcon-list-group-active-border-color: #1a5fb4 !important;
}

.timeline-primary.timeline-past::after,
.timeline-primary.timeline-current::after {
    background-color: var(--primary-accessible) !important;
    border-color: var(--primary-accessible) !important;
}

.dark .dark__bg-primary {
    background-color: var(--primary-accessible) !important;
}

.dark .dark__text-primary {
    color: var(--primary-accessible) !important;
}

.form-check-input-primary {
    border-color: var(--primary-accessible) !important;
}

    .form-check-input-primary:checked {
        background-color: var(--primary-accessible) !important;
    }

.fc-timegrid .event-bg-soft-primary .fc-event-main:after {
    background-color: var(--primary-accessible) !important;
}

/* ============================================
   CRITICAL OVERRIDES - Must be at end of file
   These override hardcoded theme.min.css values
   ============================================ */

.breadcrumb-item.active,
.breadcrumb-item a,
.mud-breadcrumb-item,
.mud-breadcrumb-item a {
    color: #1a5fb4 !important;
}

/* Breadcrumb "/" separator: #748194 (3.96:1) -> #5e6e82 (5.22:1 on white) */
.breadcrumb {
    --falcon-breadcrumb-divider-color: #5e6e82 !important;
}

.mud-breadcrumb-separator,
.mud-breadcrumbs li.mud-breadcrumb-separator,
.mud-breadcrumb-separator > span {
    color: #5e6e82 !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-outline-primary,
.btn-outline-primary:hover,
.form-check-input:checked,
.form-range::-webkit-slider-thumb,
.form-range::-moz-range-thumb,
input[type="radio"]:checked,
input[type="checkbox"]:checked {
    background-color: #1a5fb4 !important;
    border-color: #1a5fb4 !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: #1a5fb4 !important;
    border-color: #1a5fb4 !important;
}

.btn-outline-primary {
    color: #1a5fb4 !important;
    border-color: #1a5fb4 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary:focus {
    background-color: #1a5fb4 !important;
    border-color: #1a5fb4 !important;
    color: #ffffff !important;
}

a:hover:not(.btn),
.nav-link:hover,
.navbar-brand:hover,
.mud-link:hover,
.dropdown-item:hover {
    color: #155a99 !important;
}

.badge-primary,
.badge.bg-primary,
.mud-chip-primary .mud-chip-content {
    background-color: #1a5fb4 !important;
    color: #ffffff !important;
}

.text-primary > i,
.text-primary > svg,
.text-primary .fa,
.text-primary .fas,
.text-primary .material-icons,
.mud-icon-root.mud-primary-text {
    color: #1a5fb4 !important;
}

.page-link:hover,
.page-item.active .page-link,
.mud-pagination-item.mud-pagination-item-active {
    background-color: #1a5fb4 !important;
    border-color: #1a5fb4 !important;
    color: #ffffff !important;
}

.progress-bar,
.mud-progress-linear.mud-primary .mud-progress-linear-bar {
    background-color: #1a5fb4 !important;
}

.alert-primary,
.mud-alert.mud-alert-filled-info {
    background-color: #1a5fb4 !important;
    color: #ffffff !important;
}

.dropdown-item.active,
.dropdown-item:active,
.mud-menu-item.mud-menu-item-selected {
    background-color: #1a5fb4 !important;
    color: #ffffff !important;
}

.accordion-button:not(.collapsed),
.mud-expand-panel.mud-expanded .mud-expand-panel-header {
    background-color: rgba(26, 95, 180, 0.1) !important;
    color: #1a5fb4 !important;
}

.mud-primary-text,
.mud-primary-hover:hover,
.mud-theme-primary {
    color: #1a5fb4 !important;
}

.mud-primary,
.mud-primary-bg {
    background-color: #1a5fb4 !important;
}

.border-primary,
.mud-border-primary {
    border-color: #1a5fb4 !important;
}

svg.text-primary,
.text-primary svg {
    fill: #1a5fb4 !important;
}

.mud-tabs-tabbar-primary {
    background-color: var(--primary-light-accessible) !important;
}

/* ============================================
   Button Styling Overrides
   ============================================ */

/* Outlined buttons */

button.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not([disabled]) {
    color: var(--primary-light-accessible) !important;
    border-color: var(--primary-light-accessible) !important;
}

    button.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-outlined.mud-button-outlined-primary:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        color: var(--primary-light-accessible) !important;
        border-color: var(--primary-light-accessible) !important;
        fill: currentColor !important;
    }

button.mud-button-outlined.mud-button-outlined-warning.mud-disabled,
button.mud-button-outlined.mud-button-outlined-warning[disabled],
button.mud-button-outlined.mud-button-outlined-warning:disabled {
    box-shadow: none;
    background-color: var(--mud-palette-action-disabled-background) !important;
    border: none !important;
    padding: 4px 10px;
    font-size: .8125rem;
}

button.mud-button-outlined.mud-button-outlined-warning:not(.mud-disabled):not([disabled]) {
    color: var(--warning-text) !important;
    border-color: var(--warning-bg) !important;
    background-color: var(--warning-bg) !important;
    --mud-ripple-opacity: var(--mud-ripple-opacity-secondary) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) !important;
}

    button.mud-button-outlined.mud-button-outlined-warning:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-outlined.mud-button-outlined-warning:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        color: var(--warning-text) !important;
        fill: currentColor !important;
    }

button.mud-button-outlined.mud-button-outlined-success.mud-disabled,
button.mud-button-outlined.mud-button-outlined-success[disabled],
button.mud-button-outlined.mud-button-outlined-success:disabled {
    box-shadow: none;
    background-color: var(--mud-palette-action-disabled-background) !important;
    border: none !important;
    padding: 4px 10px;
    font-size: .8125rem;
}

button.mud-button-outlined.mud-button-outlined-success:not(.mud-disabled):not([disabled]) {
    color: var(--success-text) !important;
    border-color: var(--success-bg) !important;
    background-color: var(--success-bg) !important;
    --mud-ripple-opacity: var(--mud-ripple-opacity-secondary) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) !important;
}

    button.mud-button-outlined.mud-button-outlined-success:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-outlined.mud-button-outlined-success:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        color: var(--success-text) !important;
        fill: currentColor !important;
    }

button.mud-button-outlined.mud-button-outlined-error.mud-disabled,
button.mud-button-outlined.mud-button-outlined-error[disabled],
button.mud-button-outlined.mud-button-outlined-error:disabled {
    box-shadow: none;
    background-color: var(--mud-palette-action-disabled-background) !important;
    border: none !important;
    padding: 4px 10px;
    font-size: .8125rem;
}

button.mud-button-outlined.mud-button-outlined-error:not(.mud-disabled):not([disabled]) {
    color: var(--danger-text) !important;
    border-color: var(--danger-bg) !important;
    background-color: var(--danger-bg) !important;
    --mud-ripple-opacity: var(--mud-ripple-opacity-secondary) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);
}

    button.mud-button-outlined.mud-button-outlined-error:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-outlined.mud-button-outlined-error:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        color: var(--danger-text) !important;
        fill: currentColor !important;
    }

/* Outlined secondary buttons -- MudBlazor Secondary #4a5568 passes WCAG AA
   but we use #2d3748 in CSS for maximum contrast safety */

button.mud-button-outlined.mud-button-outlined-secondary.mud-disabled,
button.mud-button-outlined.mud-button-outlined-secondary[disabled],
button.mud-button-outlined.mud-button-outlined-secondary:disabled {
    box-shadow: none;
    background-color: var(--mud-palette-action-disabled-background) !important;
    border: none !important;
    padding: 4px 10px;
    font-size: .8125rem;
}

button.mud-button-outlined.mud-button-outlined-secondary:not(.mud-disabled):not([disabled]) {
    color: #2d3748 !important;
    border-color: var(--secondary-bg) !important;
    background-color: var(--secondary-bg) !important;
    --mud-ripple-opacity: var(--mud-ripple-opacity-secondary) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) !important;
}

    button.mud-button-outlined.mud-button-outlined-secondary:not(.mud-disabled):not([disabled]) .mud-button-label,
    button.mud-button-outlined.mud-button-outlined-secondary:not(.mud-disabled):not([disabled]) .d-sm-inline-block {
        color: #2d3748 !important;
    }

    button.mud-button-outlined.mud-button-outlined-secondary:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-outlined.mud-button-outlined-secondary:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        color: #2d3748 !important;
        fill: currentColor !important;
    }

/* Filled buttons */

button.mud-button-filled.mud-button-filled-success:not(.mud-disabled):not([disabled]) {
    background-color: var(--success-bg) !important;
    color: var(--success-text) !important;
}

    button.mud-button-filled.mud-button-filled-success:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-filled.mud-button-filled-success:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        background-color: var(--success-bg) !important;
        color: var(--success-text) !important;
        fill: currentColor !important;
    }

button.mud-button-filled.mud-button-filled-warning:not(.mud-disabled):not([disabled]) {
    background-color: var(--warning-bg) !important;
    color: var(--warning-text) !important;
}

    button.mud-button-filled.mud-button-filled-warning:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-filled.mud-button-filled-warning:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        background-color: var(--warning-bg) !important;
        color: var(--warning-text) !important;
        fill: currentColor !important;
    }

button.mud-button-filled.mud-button-filled-error:not(.mud-disabled):not([disabled]) {
    background-color: var(--danger-bg) !important;
    color: var(--danger-text) !important;
}

    button.mud-button-filled.mud-button-filled-error:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-filled.mud-button-filled-error:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        background-color: var(--danger-bg) !important;
        color: var(--danger-text) !important;
        fill: currentColor !important;
    }

button.mud-button-filled.mud-button-filled-secondary:not(.mud-disabled):not([disabled]) {
    background-color: var(--secondary-bg) !important;
    color: var(--secondary-text) !important;
}

    button.mud-button-filled.mud-button-filled-secondary:not(.mud-disabled):not([disabled]) .mud-icon-root,
    button.mud-button-filled.mud-button-filled-secondary:not(.mud-disabled):not([disabled]) .mud-svg-icon {
        background-color: var(--secondary-bg) !important;
        color: var(--secondary-text) !important;
        fill: currentColor !important;
    }

label.mud-icon-button.mud-primary-text:not(.mud-disabled):not([disabled]) > .mud-icon-button-label {
    color: #1a5fb4 !important;
}

/*Grid height */
.compliance-dashboard-grid-dynamic-height {
    height: 255px;
    overflow-y: auto;
}

.compliance-dashboard-review-grid-dynamic-height {
    height: 200px;
    overflow-y: auto;
}

.compliance-schedule-facility-grid-dynamic-height {
    height: 450px;
    overflow-y: auto;
}
/* ============================================
   End of Accessible Colors CSS
   ============================================ */
