/* ============================================================
   THE DEBORAH ACADEMY — ACCESSIBILITY WIDGET
   Shared across index.html, privacy-policy.html,
   terms-conditions.html, disclaimer.html
   ============================================================ */

/* ---- Floating toggle button ---- */
#a11y-toggle-btn{
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1E3A8A;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  transition: transform .2s ease, box-shadow .2s ease;
  padding: 0;
}
#a11y-toggle-btn:hover{
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
#a11y-toggle-btn:focus-visible{
  outline: 3px solid #C79A4A;
  outline-offset: 3px;
}
#a11y-toggle-btn svg{
  width: 30px;
  height: 30px;
  fill: #ffffff;
}

/* ---- Panel ---- */
#a11y-panel{
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9999;
  width: 280px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #1E3A8A;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  font-family: Arial, Helvetica, sans-serif;
  padding: 20px 18px;
}
#a11y-panel[hidden]{ display:none; }

#a11y-panel h2{
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 14px;
  padding: 0;
}

#a11y-panel ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#a11y-panel li{ margin:0; padding:0; }

#a11y-panel button{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 10px 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: #2b2b2b;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}
#a11y-panel button:hover{ background: #F0F2FA; }
#a11y-panel button:focus-visible{
  outline: 2px solid #1E3A8A;
  outline-offset: 2px;
}
#a11y-panel button[aria-pressed="true"]{
  background: #E8ECFB;
  color: #1E3A8A;
  font-weight: 700;
}
#a11y-panel button svg{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#a11y-panel .a11y-divider{
  height: 1px;
  background: #e2e2e2;
  margin: 8px 0;
}
#a11y-panel .a11y-reset-btn{
  color: #8a1f1f;
}
#a11y-panel .a11y-reset-btn:hover{ background: #FBEAEA; }

@media (max-width: 480px){
  #a11y-toggle-btn{ bottom:16px; right:16px; width:52px; height:52px; }
  #a11y-panel{ right:16px; bottom:80px; width: calc(100vw - 32px); }
}

/* ============================================================
   TOGGLE EFFECTS — applied to <html> based on saved preferences
   ============================================================ */

/* Grayscale */
html.a11y-grayscale{
  filter: grayscale(100%) !important;
}

/* High Contrast — boosts contrast/saturation across the whole page */
html.a11y-contrast-high{
  filter: contrast(1.45) saturate(1.15) !important;
}

/* Negative Contrast — inverts colors, then un-inverts media so photos read normally */
html.a11y-contrast-negative{
  filter: invert(100%) hue-rotate(180deg) !important;
  background: #000 !important;
}
html.a11y-contrast-negative img,
html.a11y-contrast-negative video,
html.a11y-contrast-negative svg image{
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Light Background — forces the site's dark sections into a plain light theme */
html.a11y-bg-light .dark-section,
html.a11y-bg-light .framework-bg,
html.a11y-bg-light .tiers-section,
html.a11y-bg-light .org-section,
html.a11y-bg-light .speaking,
html.a11y-bg-light .events-list,
html.a11y-bg-light .resource-section,
html.a11y-bg-light .contact,
html.a11y-bg-light .cp-connection,
html.a11y-bg-light footer,
html.a11y-bg-light .maximize{
  background: #ffffff !important;
}
html.a11y-bg-light .dark-section *,
html.a11y-bg-light .framework-bg *,
html.a11y-bg-light .tiers-section *,
html.a11y-bg-light .org-section *,
html.a11y-bg-light .speaking *,
html.a11y-bg-light .events-list *,
html.a11y-bg-light .resource-section *,
html.a11y-bg-light .contact *,
html.a11y-bg-light .cp-connection *,
html.a11y-bg-light footer *,
html.a11y-bg-light .maximize *{
  color: #111111 !important;
  border-color: #cccccc !important;
  background-color: transparent !important;
}
html.a11y-bg-light .dark-section img,
html.a11y-bg-light .framework-bg img,
html.a11y-bg-light .tiers-section img,
html.a11y-bg-light .org-section img,
html.a11y-bg-light .speaking img,
html.a11y-bg-light .resource-section img,
html.a11y-bg-light .contact img,
html.a11y-bg-light .cp-connection img,
html.a11y-bg-light footer img,
html.a11y-bg-light .maximize img{
  filter: none !important;
}

/* Links Underline */
html.a11y-underline-links a{
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* Readable Font — swaps all decorative/serif/script fonts for a plain, legible sans-serif */
html.a11y-readable-font,
html.a11y-readable-font *{
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
  letter-spacing: normal !important;
  line-height: 1.65 !important;
}
