/* ============================================================
   Accessibility menu + WhatsApp widgets
   ============================================================ */

/* ---- content regions the accessibility transforms apply to
   (the widgets themselves are body > div / body > a, so excluded) ---- */
body > header,
body > main,
body > footer,
body > section {
  zoom: var(--a11y-zoom, 1);
  filter: var(--a11y-filter, none);
}

/* shorthand group for descendant text rules */
/* highlight links */
html.a11y-links :is(body>header,body>main,body>footer,body>section) a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
  outline: 2px solid #ffb300 !important;
  outline-offset: 1px;
  background: #fff6da !important;
  color: #0b3a78 !important;
}
/* text spacing */
html.a11y-spacing :is(body>header,body>main,body>footer,body>section)
  :is(p,li,a,span,dt,dd,h1,h2,h3,h4,figcaption,label,button,input,textarea,strong,em) {
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
}
/* line height */
html.a11y-lineheight :is(body>header,body>main,body>footer,body>section)
  :is(p,li,h1,h2,h3,h4,dt,dd,blockquote,figcaption) {
  line-height: 2.1 !important;
}
/* justify / readable alignment */
html.a11y-justify :is(body>header,body>main,body>footer,body>section)
  :is(p,li,dd,figcaption) {
  text-align: justify !important;
}
/* hide images */
html.a11y-noimg :is(body>header,body>main,body>footer,body>section) img {
  visibility: hidden !important;
}
html.a11y-noimg :is(body>header,body>main,body>footer,body>section) .demo-bg {
  display: none !important;
}
/* dyslexia-friendly font */
html.a11y-dyslexia :is(body>header,body>main,body>footer,body>section),
html.a11y-dyslexia :is(body>header,body>main,body>footer,body>section)
  :is(p,li,a,span,dt,dd,h1,h2,h3,h4,figcaption,label,button,input,textarea,strong,em) {
  font-family: "OpenDyslexic", "Assistant", system-ui, sans-serif !important;
  letter-spacing: .03em;
}
/* stop animations */
html.a11y-noanim *,
html.a11y-noanim *::before,
html.a11y-noanim *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* large cursor (applies everywhere incl. widget) */
html.a11y-bigcursor,
html.a11y-bigcursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M4 2 L4 20 L9.2 15 L12.4 22 L15.4 20.7 L12.2 13.9 L19 13.9 Z" fill="black" stroke="white" stroke-width="1.3" stroke-linejoin="round"/></svg>') 3 2, auto !important;
}

/* ============================================================
   Floating action buttons
   ============================================================ */
.a11y-fab,
.wa-fab {
  position: fixed;
  bottom: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  box-shadow: 0 10px 28px -8px rgba(8, 24, 46, .45);
  z-index: 2000;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.a11y-fab:hover,
.wa-fab:hover { transform: scale(1.06); box-shadow: 0 14px 34px -8px rgba(8, 24, 46, .55); }
.a11y-fab:focus-visible,
.wa-fab:focus-visible { outline: 3px solid #ffb300; outline-offset: 3px; }

.a11y-fab { inset-inline-end: 22px; background: #0b4da2; color: #fff; }
.a11y-fab svg { width: 30px; height: 30px; fill: currentColor; }
.a11y-fab[hidden] { display: none; }

.wa-fab { inset-inline-start: 22px; background: #25d366; color: #fff; }
.wa-fab svg { width: 32px; height: 32px; fill: currentColor; }

/* ============================================================
   Accessibility panel
   ============================================================ */
.a11y-panel {
  position: fixed;
  bottom: 90px;
  inset-inline-end: 22px;
  width: min(374px, calc(100vw - 28px));
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(8, 24, 46, .55);
  z-index: 2001;
  font-family: "Assistant", system-ui, sans-serif;
  color: #14202e;
  transform-origin: bottom var(--a11y-origin, right);
  animation: a11yIn .18s ease;
}
.a11y-panel[hidden] { display: none; }
@keyframes a11yIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.a11y-phead {
  background: #0b4da2;
  color: #fff;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.a11y-phead h2 { font-size: 21px; font-weight: 800; margin: 0; line-height: 1.2; }
.a11y-phead p { font-size: 13px; opacity: .85; margin: 4px 0 0; font-weight: 500; }
.a11y-close {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 0; color: #fff; cursor: pointer;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.a11y-close:hover { background: rgba(255, 255, 255, .32); }

.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
}
.a11y-tile {
  background: #f1f3f7;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: background .18s, border-color .18s, color .18s;
}
.a11y-tile:hover { background: #e7ebf2; }
.a11y-tile .ic {
  height: 30px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; color: #14202e;
}
.a11y-tile .ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.a11y-tile .lbl { font-size: 14px; font-weight: 600; color: #2a3744; line-height: 1.25; }
.a11y-tile[aria-pressed="true"] {
  background: #e9f1fb;
  border-color: #0b4da2;
}
.a11y-tile[aria-pressed="true"] .ic,
.a11y-tile[aria-pressed="true"] .lbl { color: #0b4da2; }

.a11y-reset {
  margin: 0 18px 16px;
  width: calc(100% - 36px);
  background: #0b4da2;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 15px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .2s;
}
.a11y-reset:hover { background: #083a7a; }
.a11y-reset svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.a11y-pos {
  border-top: 1px solid #e4eaf0;
  padding: 16px 18px;
}
.a11y-pos .pos-label { font-size: 12.5px; color: #93a0ac; margin-bottom: 10px; }
.a11y-pos .pos-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.a11y-pos button {
  border: 1px solid #d9e1ea;
  background: #fff;
  border-radius: 10px;
  padding: 11px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: #2a3744;
  cursor: pointer;
  transition: .18s;
}
.a11y-pos button:hover { border-color: #0b4da2; }
.a11y-pos button[aria-pressed="true"] { background: #0b4da2; border-color: #0b4da2; color: #fff; }

.a11y-pfoot {
  border-top: 1px solid #e4eaf0;
  padding: 16px 18px 20px;
  text-align: center;
}
.a11y-pfoot a { color: #0b4da2; font-weight: 600; font-size: 14px; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .a11y-panel { animation: none; }
}
