/* ============================================================
   Accessibility Fixes — Sage Dental (mysagedental.com)
   ============================================================ */

/* 1) SKIP TO MAIN CONTENT LINK
   Fixes Violation 3 (2.4.1 Bypass Blocks)
   Verify your skip link markup matches this, or edit selector.
   The link should be hidden until focused, then jump to #main-content.
   ------------------------------------------------------------ */
.skip-to-main,
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #000000;
}

.skip-to-main:focus,
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* Make sure the target has focus support (add tabindex="-1" in HTML too) */
#main-content:focus,
main:focus {
  outline: none;
}


/* 2) VISIBLE KEYBOARD FOCUS INDICATORS
   Supports 2.1.1 Keyboard fixes — many themes strip default focus
   outlines with outline: none and never replace them. This restores
   a visible focus ring site-wide for keyboard users only.
   ------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #2563eb !important;
  outline-offset: 2px !important;
}


/* 3) EXPANDABLE NAV SUBMENU VISIBILITY
   Fixes Violation 4 — your submenu is shown/hidden by CSS :hover only,
   which keyboard users can never trigger. This class is added by
   accessibility-fixes.js on Enter/Space and forces the same submenu
   visible, using !important to beat the hover-only rule.
   If your submenu still doesn't show, open DevTools, inspect the
   <ul class="sub-menu">, and check the Styles panel for the exact
   CSS rule currently controlling display/opacity/visibility on
   hover — send it to me and I'll match the override precisely.
   ------------------------------------------------------------ */
.menu-item-has-children.a11y-kb-open > ul.sub-menu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}


/* 4) VISUALLY HIDDEN UTILITY (used by JS live region, but handy
   generally for adding screen-reader-only text elsewhere)
   ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



/* Accessibility Menu Fixes */
.menu-item-has-children.a11y-kb-open > ul.sub-menu,
.menu-item-has-children.a11y-kb-open > ul {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
  position: static !important;
}

/* Ensure submenus are properly positioned when open */
.menu-item-has-children.a11y-kb-open {
  position: relative;
}

/* Fix for any hover conflicts */
.menu-item-has-children.a11y-kb-open > a {
  pointer-events: auto;
}

/* Make sure submenu items are clickable */
.menu-item-has-children.a11y-kb-open .sub-menu a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Visual indicator for keyboard users */
.menu-item-has-children.a11y-kb-open > a::after {
  content: " ▼";
  font-size: 0.7em;
}

.menu-item-has-children > a[aria-expanded="false"]::after {
  content: " ▶";
  font-size: 0.7em;
}

.book-an-appointmen-new .field-error-message {
    color: #D32F2F !important;
    font-size: 14px!important;
}

.book-an-appointmen-new #form-error-message strong {
    color: #D32F2F !important;
    font-size: 14px!important;
}