/* ══════════════════════════════════════
   ACCESSIBILITY WIDGET — MAGNIN OVERRIDE
   ══════════════════════════════════════ */

/* ── HIGH CONTRAST ── */
html.a11y-high-contrast body,
html.a11y-high-contrast .body-innerwrapper,
html.a11y-high-contrast #sp-main-body,
html.a11y-high-contrast #sp-header,
html.a11y-high-contrast #sp-footer,
html.a11y-high-contrast .sp-header,
html.a11y-high-contrast header,
html.a11y-high-contrast footer,
html.a11y-high-contrast section,
html.a11y-high-contrast article {
  background-color: #000000 !important;
  background-image: none !important;
}
html.a11y-high-contrast div:not(.jsvisitcounter):not(.table):not(.counter):not(.boxed):not(.table_row):not(.sppb-addon-wrapper):not(.sppb-addon-divider-wrap):not(.sppb-divider) {
  background-color: #000000 !important;
  background-image: none !important;
}
/* ALL text becomes yellow */
html.a11y-high-contrast body *,
html.a11y-high-contrast h1, html.a11y-high-contrast h2,
html.a11y-high-contrast h3, html.a11y-high-contrast h4,
html.a11y-high-contrast h5, html.a11y-high-contrast h6,
html.a11y-high-contrast p, html.a11y-high-contrast span,
html.a11y-high-contrast li, html.a11y-high-contrast td,
html.a11y-high-contrast th, html.a11y-high-contrast label {
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
/* Links and nav tabs also yellow */
html.a11y-high-contrast a,
html.a11y-high-contrast a *,
html.a11y-high-contrast nav a,
html.a11y-high-contrast .nav a,
html.a11y-high-contrast .menu a {
  color: #ffff00 !important;
}

/* ── DARK CONTRAST ── */
html.a11y-dark #sp-main-body,
html.a11y-dark .body-innerwrapper {
  background-color: #1e2736 !important;
}
html.a11y-dark #sp-main-body *,
html.a11y-dark #sp-main-body p,
html.a11y-dark #sp-main-body h1,
html.a11y-dark #sp-main-body h2,
html.a11y-dark #sp-main-body h3,
html.a11y-dark #sp-main-body h4,
html.a11y-dark #sp-main-body h5,
html.a11y-dark #sp-main-body h6,
html.a11y-dark #sp-main-body span,
html.a11y-dark #sp-main-body li,
html.a11y-dark #sp-main-body td {
  color: #d0cfe8 !important;
}
html.a11y-dark #sp-main-body a,
html.a11y-dark #sp-main-body a * {
  color: #a89dff !important;
}
html.a11y-dark #sp-main-body div,
html.a11y-dark #sp-main-body section,
html.a11y-dark #sp-main-body article,
html.a11y-dark #sp-main-body .sp-module {
  background-color: #1e2736 !important;
  background-image: none !important;
}

/* ══════════════════════════════════════
   WIDGET UI STYLES
   ══════════════════════════════════════ */
#a11y-trigger {
  position: fixed !important; bottom: 30% !important; right: 28px !important;
  z-index: 999999 !important; width: 54px !important; height: 54px !important;
  border-radius: 50% !important; background: #2a5caa !important;
  color: #fff !important; border: none !important; cursor: pointer !important;
  display: flex !important; align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(42,92,170,0.45) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  top: auto !important; left: auto !important;
}
#a11y-trigger:hover { transform: translateY(8%) scale(1.1) !important; }
#a11y-trigger svg { width: 26px !important; height: 26px !important; pointer-events: none !important; }

#a11y-panel {
  position: fixed !important; bottom: calc(30% + 34px) !important; right: 28px !important;
  z-index: 999998 !important; width: 256px !important;
  background: #fff !important; border-radius: 16px !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18) !important;
  padding: 20px !important; font-family: system-ui, sans-serif !important;
  color: #222 !important; opacity: 0 !important;
  transform: translateY(12px) scale(0.97) !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease, transform 0.22s ease !important;
  top: auto !important; left: auto !important;
}
#a11y-panel.open {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: all !important;
}
#a11y-panel * { color: #222 !important; background-color: transparent !important; font-size: inherit !important; }
.a11y-panel-header { display: flex !important; align-items: center !important; justify-content: space-between !important; margin-bottom: 18px !important; }
.a11y-panel-title { font-size: 0.78rem !important; font-weight: 600 !important; letter-spacing: 0.1em !important; text-transform: uppercase !important; color: #555 !important; }
.a11y-reset-btn { font-size: 0.7rem !important; color: #2a5caa !important; background: none !important; border: none !important; cursor: pointer !important; text-decoration: underline !important; }
.a11y-section-label { font-size: 0.7rem !important; font-weight: 600 !important; text-transform: uppercase !important; color: #999 !important; margin-bottom: 8px !important; display: block !important; }
.a11y-font-row { display: flex !important; align-items: center !important; gap: 8px !important; margin-bottom: 20px !important; }
.a11y-font-btn { flex: 1 !important; height: 38px !important; border: 1.5px solid #ddd !important; background: #f8f8f8 !important; border-radius: 8px !important; cursor: pointer !important; font-weight: 600 !important; color: #333 !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 1rem !important; }
.a11y-font-btn:hover { background: #edf2fb !important; border-color: #2a5caa !important; }
.a11y-font-display { flex: 1.2 !important; text-align: center !important; font-size: 0.82rem !important; font-weight: 600 !important; color: #444 !important; background: #f3f3f3 !important; border-radius: 8px !important; height: 38px !important; display: flex !important; align-items: center !important; justify-content: center !important; }
.a11y-contrast-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
.a11y-contrast-btn { height: 52px !important; border-radius: 10px !important; border: 2px solid transparent !important; cursor: pointer !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 4px !important; font-size: 0.68rem !important; font-weight: 600 !important; text-transform: uppercase !important; transition: border-color 0.15s, transform 0.1s !important; }
.a11y-contrast-btn:hover { transform: scale(1.03) !important; }
.a11y-contrast-btn.active { border-color: #2a5caa !important; box-shadow: 0 0 0 3px rgba(42,92,170,0.2) !important; }
.a11y-contrast-btn .icon { font-size: 1.15rem !important; line-height: 1 !important; }
.contrast-normal { background: #f5f2ed !important; color: #333 !important; }
.contrast-high   { background: #000 !important; color: #ffff00 !important; }
.contrast-dark   { background: #1e2736 !important; color: #d0cfe8 !important; }
.a11y-divider { border: none !important; border-top: 1px solid #eee !important; margin: 16px 0 !important; }

/* ── SP Page Builder divider specific fix ── */
html.a11y-high-contrast #sppb-addon-1768876955499,
html.a11y-high-contrast #sppb-addon-wrapper-1768876955499,
html.a11y-high-contrast [id^="sppb-addon"] {
  background-color: transparent !important;
  background-image: none !important;
}