/* Mountain Foothills Rotary - accessibility fixes (WCAG 2.2 AA).
   Loads alongside mfr-fullpage.css / mfr-dark.css; ClubRunner's file order is unpredictable,
   so rules use html:root specificity and !important where the theme does.
   Built Nov 2026 from an axe-core audit of every public page (see mfr-site/a11y). */

/* ---------- 1. Skip link (the site footer script inserts it as the first thing on the page) ---------- */
html:root .mfr-skip{
  position:fixed !important; left:12px; top:-80px; z-index:100000;
  background:#F7A81B !important; color:#0A1F3A !important; font-weight:700; font-size:16px;
  padding:12px 18px; border-radius:10px; text-decoration:none !important; box-shadow:0 6px 18px rgba(0,0,0,.35);
}
html:root .mfr-skip:focus{ top:12px; outline:3px solid #fff !important; outline-offset:2px; }
html:root #mfr-main:focus{ outline:none; }

/* ---------- 2. Keyboard focus is always visible (gold ring + dark halo works on light and dark) ---------- */
html:root a:focus-visible, html:root button:focus-visible, html:root input:focus-visible,
html:root select:focus-visible, html:root textarea:focus-visible, html:root summary:focus-visible,
html:root [tabindex]:not([tabindex="-1"]):focus-visible, html:root [role="button"]:focus-visible, html:root iframe:focus{
  outline:3px solid #F7A81B !important; outline-offset:2px !important;
  box-shadow:0 0 0 6px rgba(10,31,58,.9) !important;
}

/* ---------- 3. Links in running text are underlined, so colour is not the only cue ---------- */
html:root main .WidgetWrapper p a:not([class*="btn"]):not([style*="inline-block"]),
html:root main .WidgetWrapper li a:not([class*="btn"]):not([style*="inline-block"]),
html:root main .WidgetWrapper td a:not([class*="btn"]),
html:root footer a, html:root .footer-band a, html:root #rights a{
  text-decoration:underline !important; text-underline-offset:2px;
}

/* ---------- 4. Touch targets at least 24x24 px (WCAG 2.5.8) ---------- */
html:root main a[href]:not([class*="btn"]):not([style*="inline-block"]){ padding-top:3px; padding-bottom:3px; }
/* links that sit alone on their own line (addresses, document lists): a full 24px row each, no overlap */
html:root main .WidgetWrapper div > a[href]:only-child:not([class*="btn"]):not([style*="inline-block"]),
html:root main .WidgetWrapper p > a[href]:only-child:not([class*="btn"]):not([style*="inline-block"]){
  display:inline-block; min-height:24px; line-height:24px; padding-top:0; padding-bottom:0; margin:2px 0;
}
html:root .swiper-pagination-bullet{
  width:12px !important; height:12px !important; padding:6px !important; box-sizing:content-box !important;
  background-clip:content-box !important; margin:0 4px !important;
}
html:root .toggle-pwd{ min-width:28px; min-height:28px; }

/* ---------- 5. Contrast: ClubRunner's own pages under the dark theme ---------- */
/* Stories list */
html:root .dataTables_length label, html:root .dataTables_filter label{ color:#E9EFF7 !important; }
html:root .list-text-meta, html:root .dataTables_info{ color:#B8C4D6 !important; }
html:root .dataTables_wrapper .dataTables_paginate .paginate_button,
html:root .dataTables_wrapper .dataTables_paginate a.paginate_button{ color:#E9EFF7 !important; }
html:root .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html:root .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled{ color:#8A97AB !important; }
html:root .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html:root .dataTables_wrapper .dataTables_paginate a.paginate_button.current{ color:#0A1F3A !important; background:#F7A81B !important; }
/* ClubRunner styles its own pagers by ID, so match that */
html:root #tblGrid_paginate.dataTables_paginate.paging_full_numbers .paginate_button,
html:root #recipientList_paginate.dataTables_paginate.paging_full_numbers .paginate_button{ color:#E9EFF7 !important; }
html:root #tblGrid_paginate.dataTables_paginate.paging_full_numbers .paginate_button.disabled,
html:root #recipientList_paginate.dataTables_paginate.paging_full_numbers .paginate_button.disabled{ color:#8A97AB !important; opacity:1 !important; }
html:root #tblGrid_paginate.dataTables_paginate.paging_full_numbers .paginate_button.current,
html:root #recipientList_paginate.dataTables_paginate.paging_full_numbers .paginate_button.current{ color:#0A1F3A !important; background:#F7A81B !important; }
/* Events calendar */
html:root .fc-today{ background:#3A2F10 !important; }
html:root .fc-today .fc-day-number{ color:#F7C46A !important; }
html:root .fc-other-month, html:root .fc-other-month .fc-day-number, html:root .fc-day-top.fc-other-month{ opacity:1 !important; }
html:root .fc-other-month .fc-day-number, html:root td.fc-other-month .fc-day-number{ color:#8A97AB !important; }
/* Contact form (Send an email) */
html:root .subscribeMessage, html:root .page-description{ color:#C3CEDD !important; }
html:root main form label{ color:#C3CEDD !important; }
/* ...except inside the white members' login box */
html:root .login_box label, html:root label[for="UserName"],
html:root label[for="Password"], html:root label[for="RememberMe"]{ color:#2B2B2B !important; }
html:root main form label a{ color:#9EC5FF !important; text-decoration:underline !important; }
html:root .text-accent{ color:#F7C46A !important; }
/* Members' login box */
html:root .forgotLink, html:root .newUserLink{ color:#006A94 !important; }
html:root .login-legend{ color:#5F5F5F !important; }
/* Event sponsorship levels table: light cells keep dark text */
html:root td.bg-lightpowder, html:root td.bg-lightpowder *, html:root td.bg-pink, html:root td.bg-pink *{ color:#1B2A3A !important; }
html:root td.font-red.bg-lightpowder, html:root td.font-red.bg-pink{ color:#B00020 !important; }
html:root td.azure:not([class*="bg-"]){ color:#9CCBFF !important; }

/* visually hidden but read by screen readers */
html:root .mfr-sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---------- 6. Text over photos: darker scrims so worst-case bright photo areas still pass 4.5:1 ---------- */
html:root .mfr-page::before{
  background:linear-gradient(90deg, rgba(8,16,30,.86) 0%, rgba(8,16,30,.68) 50%, rgba(8,16,30,.25) 100%),
             linear-gradient(180deg, rgba(8,16,30,.35) 0%, rgba(8,16,30,0) 35%, rgba(8,16,30,.55) 100%) !important;
}
html:root .mfr-page--right::before{
  background:linear-gradient(270deg, rgba(8,16,30,.86) 0%, rgba(8,16,30,.68) 50%, rgba(8,16,30,.25) 100%),
             linear-gradient(180deg, rgba(8,16,30,.35) 0%, rgba(8,16,30,0) 35%, rgba(8,16,30,.55) 100%) !important;
}
/* 4-Way Test band: small text sits over bright sky */
html:root section.band-4 section.PageWidget:has(.mfr-test) .boxContainer1::before{
  background:linear-gradient(180deg, rgba(8,16,30,.74) 0%, rgba(8,16,30,.62) 50%, rgba(8,16,30,.84) 100%) !important;
}
/* the video's frame shows the focus ring (focus goes inside the player) */
html:root .mfr-video:focus-within, html:root p:has(> iframe):focus-within, html:root div:has(> iframe):focus-within{
  outline:3px solid #F7A81B !important; outline-offset:3px;
}
@media (max-width:767px){
  html:root .mfr-page::before, html:root .mfr-page--right::before{
    background:linear-gradient(180deg, rgba(8,16,30,.74) 0%, rgba(8,16,30,.68) 50%, rgba(8,16,30,.86) 100%) !important;
  }
}

/* pause button for the homepage photo slideshow */
html:root .mfr-slider.is-paused img{ animation-play-state:paused !important; }
html:root .mfr-pause{
  position:absolute; right:18px; bottom:18px; z-index:5; cursor:pointer;
  background:rgba(10,20,36,.85); color:#fff; border:1px solid rgba(255,255,255,.5); border-radius:999px;
  padding:10px 16px; font-size:15px; font-weight:600; min-height:44px;
}
html:root .mfr-pause:hover{ background:#17273F; }

/* the accessibility note in the site footer: its own dark band so its links stay readable */
html:root .mfr-a11y-note{ background:#0E1A2C !important; color:#E9EFF7 !important; border-top:1px solid #26384F; }
html:root .mfr-a11y-note p, html:root .mfr-a11y-note strong{ color:#E9EFF7 !important; }
html:root .mfr-a11y-note a{ color:#F7C46A !important; text-decoration:underline !important; text-underline-offset:2px; }

/* ---------- 7. Motion: respect "reduce motion" everywhere ---------- */
@media (prefers-reduced-motion:reduce){
  html:root *, html:root *::before, html:root *::after{
    animation-duration:.01ms !important; animation-iteration-count:1 !important;
    transition-duration:.01ms !important; scroll-behavior:auto !important;
  }
  html:root .mfr-page, html:root section.band-3 section.PageWidget .boxContainer1,
  html:root section.band-4 section.PageWidget .boxContainer1{ background-attachment:scroll !important; }
}
