/*
 * Accessibility remediation styles (WCAG 2.1 AA / ADA Title II web rule).
 * Loaded after main.css so these override the compiled theme styles.
 * Contrast ratios verified against WCAG 1.4.3 (4.5:1 normal text, 3:1 large text).
 */

/* ---------------------------------------------------------------------------
 * 1.4.3 Contrast: brand gold #ba8a4c on white was 3.08:1.
 * #835e22 keeps the golden hue at 5.85:1.
 * ------------------------------------------------------------------------- */
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
  color: #835e22;
}

/* Dropdown item hover/focus was #fff on #ba8a4c (3.08:1). Darker gold keeps
 * the effect at 6.26:1. Same fix for button hover/focus states. */
.dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover,
.navbar .dropdown-menu .active a {
  background-color: #7d5a20;
  color: #fff;
}

.btn-default:focus, .btn-default:hover,
.btn-default2:focus, .btn-default2:hover,
.cta-btn:focus, .cta-btn:hover,
.search-form .search-submit:focus, .search-form .search-submit:hover,
body .gform_wrapper .gform_footer input.button:focus,
body .gform_wrapper .gform_footer input.button:hover,
body .gform_wrapper .gform_footer input[type=submit]:focus,
body .gform_wrapper .gform_footer input[type=submit]:hover {
  background-color: #7d5a20;
  color: #fff;
}

/* ---------------------------------------------------------------------------
 * 1.4.3 Contrast: home health-dashboard tiles.
 * Percentage text was #5ab38d (2.09:1 on the red tint, 2.27:1 on the green
 * tint). #14563a passes 4.5:1 on both tints. Date stamp was #9a9a9a on
 * #ebebeb (2.36:1) -> #595959 (5.88:1).
 * ------------------------------------------------------------------------- */
.health-deshboard .health-box .health-bx-bt .right span {
  color: #14563a;
}

.health-deshboard .up-date {
  color: #595959;
}

/* ---------------------------------------------------------------------------
 * 1.4.3 Contrast: Modern Events Calendar prev/next month links were #a9a9a9
 * on white (2.35:1).
 * ------------------------------------------------------------------------- */
.mec-calendar .mec-event-footer .mec-load-month-link,
.mec-calendar .mec-load-month-link,
.mec-previous-month .mec-load-month-link,
.mec-next-month .mec-load-month-link {
  color: #595959 !important;
}

/* ---------------------------------------------------------------------------
 * 1.4.3 Contrast: StellarNav mobile menu. The plugin's own CSS uses #777 on
 * white for the toggle and links (4.47:1), and the theme paints mobile menu
 * items white on #ba8a4c (3.08:1). Darkened to pass 4.5:1.
 * ------------------------------------------------------------------------- */
.stellarnav li a,
.stellarnav .menu-toggle,
.stellarnav .call-btn-mobile,
.stellarnav .location-btn-mobile {
  color: #595959;
}

.stellarnav.mobile li a {
  background-color: #7d5a20 !important;
  color: #fff;
}

.stellarnav.mobile .menu-toggle {
  color: #595959;
}

/* ---------------------------------------------------------------------------
 * 2.4.7 Focus visible: the theme removed outlines on buttons/CTAs.
 * Restore a clearly visible indicator everywhere.
 * ------------------------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[role="button"]:focus,
[tabindex]:focus {
  outline: 2px solid #0a3a78 !important;
  outline-offset: 2px;
}

/* Keep the default UA focus ring off only when :focus-visible is supported
 * and the interaction was pointer-based. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline-width: 1px !important;
}

/* On dark/gold backgrounds a dark-blue ring can vanish - use white there. */
.btn-default:focus, .btn-default2:focus, .cta-btn:focus,
.search-form .search-submit:focus,
body .gform_wrapper .gform_footer input[type=submit]:focus,
.dropdown-menu > li > a:focus,
.stellarnav.mobile li a:focus {
  outline: 2px solid #fff !important;
  outline-offset: -4px;
}

/* ---------------------------------------------------------------------------
 * 2.4.1 Bypass blocks: skip link (injected in base.php).
 * Visually hidden until keyboard focus.
 * ------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -1000px;
  left: 8px;
  z-index: 10000;
  padding: 12px 20px;
  background: #032656;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

#main-content:focus {
  outline: none !important;
}

/* ---------------------------------------------------------------------------
 * Gravity Forms honeypot field: must never be perceivable or focusable.
 * ------------------------------------------------------------------------- */
.gfield--type-honeypot,
.gform_validation_container {
  display: none !important;
}

/* ---------------------------------------------------------------------------
 * 2.5.5 / usability: make the tiny 12px nav text slightly more readable is a
 * design call; not changed. Underline links inside body copy so color is not
 * the only distinction (1.4.1) - theme content links were color-only.
 * ------------------------------------------------------------------------- */
.main .page-content a:not(.btn-default):not(.btn-default2):not(.cta-btn),
.main article a:not(.btn-default):not(.btn-default2):not(.cta-btn) {
  text-decoration: underline;
}
