/**
 * EPC Multisite — Shared Accessibility CSS Fixes
 * Loaded on all subsites via mu-plugin.
 *
 * These rules override WPBakery Visual Composer defaults that fail
 * WCAG 2.1 Level AA Success Criterion 1.4.3 (Contrast Minimum).
 */

/* --- WPBakery grey message boxes (.vc_color-grey) ---
   Plugin default: color #858585 on #ebebeb/#f7f7f7 bg = 3.5:1 / 3.44:1 (FAIL)
   Fix: brand Dark Blue #002d5d
   #002d5d on #ffffff = 16.1:1 ✓, on #f7f7f7 = 14.03:1 ✓, on #ebebeb ≈ 13:1 ✓ */
body .vc_message_box.vc_color-grey,
body .vc_message_box.vc_color-grey p,
body .vc_message_box.vc_color-grey strong {
    color: #002d5d !important;
}

/* --- WPBakery info message boxes (.vc_color-info, standard variant) ---
   Plugin default: color #5e7f96 on #dff2fe bg = 3.69:1 (FAIL)
   Fix: brand Dark Blue #002d5d
   #002d5d on #dff2fe = 11.91:1 ✓ */
body .vc_message_box.vc_color-info,
body .vc_message_box.vc_color-info p,
body .vc_message_box.vc_color-info strong {
    color: #002d5d !important;
}

/* --- Fix 3: Link color on baby-blue background (page-id 4574) ---
   Problem: The7 default link #287abd on editor-applied #BFD7ED bg = 3.07:1 (FAIL)
   Fix: Darken links to #002d5d, scoped to page 4574 + specific VC section
   #002d5d on #BFD7ED = 9.23:1 ✓ */
body.page-id-4574 .vc_custom_1778532672039 a,
body.page-id-4574 .vc_custom_1778532672039 a:visited {
    color: #002d5d !important;
}
body.page-id-4574 .vc_custom_1778532672039 a:hover,
body.page-id-4574 .vc_custom_1778532672039 a:focus {
    color: #001a38 !important;
}


/* --- Mobile menu submenu toggle: keyboard focus indicator (WCAG 2.1.1 / 2.4.7) ---
   accessibility-mobile-menu-keyboard.js makes The7's decorative
   <i class="next-level-button"> keyboard-operable (role="button", tabindex="0")
   and forwards Enter/Space to the theme's own click handler. The element keeps
   its original markup, class and layout — the theme's .next-level-button rules
   (position + 45deg rotate on .open-sub) still apply. The theme provides no
   focus style for it, so we add a visible one for keyboard users. */
.dt-mobile-header .next-level-button:focus-visible,
.sub-downwards .next-level-button:focus-visible {
    outline: 2px solid #002d5d;   /* brand Dark Blue (on-palette); ~16:1 on the light menu */
    outline-offset: 2px;
    border-radius: 3px;
}

/* Fallback for browsers without :focus-visible support. */
.dt-mobile-header .next-level-button:focus,
.sub-downwards .next-level-button:focus {
    outline: 2px solid #002d5d;
    outline-offset: 2px;
}
