/* ==========================================================================
   Accessibility widget
   Loaded on every page with js/a11y-widget.js. The widget's own UI uses px
   units and is excluded from the page-level adjustments so it always stays
   usable, whatever settings are active.
   ========================================================================== */

/* ---------- Page-level adjustments (classes on <html>) ---------- */

/* Text size: the site is rem-based, so scaling the root font scales the page. */
html.a11y-text-1 { font-size: 112.5%; }
html.a11y-text-2 { font-size: 125%; }
html.a11y-text-3 { font-size: 150%; }

/* Readable font */
html.a11y-font body *:not(.a11y-w):not(.a11y-w *) {
  font-family: Verdana, Tahoma, 'Segoe UI', Arial, sans-serif !important;
  font-style: normal !important;
}

/* Text spacing (WCAG 1.4.12 values) */
html.a11y-spacing body *:not(.a11y-w):not(.a11y-w *) {
  line-height: 1.5 !important;
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
}
html.a11y-spacing body p:not(.a11y-w *) { margin-bottom: 2em !important; }

/* Highlight links */
html.a11y-links body a:not(.a11y-w *) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px solid #B8860B !important;
  outline-offset: 2px;
  background-color: #FFF3B0 !important;
  color: #0F3226 !important;
}
html.a11y-links body a:not(.a11y-w *) * { color: #0F3226 !important; }

/* High contrast: black backgrounds, white text, yellow links */
html.a11y-contrast,
html.a11y-contrast body *:not(.a11y-w):not(.a11y-w *):not(img):not(svg):not(svg *) {
  background-color: #000 !important;
  color: #FFF !important;
  border-color: #FFF !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.a11y-contrast body .bg:not(.a11y-w *),
html.a11y-contrast body [data-parallax]:not(.a11y-w *) { opacity: .35 !important; }
html.a11y-contrast body a:not(.a11y-w *),
html.a11y-contrast body a:not(.a11y-w *) * { color: #FFE14D !important; text-decoration: underline !important; }
html.a11y-contrast body button:not(.a11y-w *),
html.a11y-contrast body input:not(.a11y-w *),
html.a11y-contrast body textarea:not(.a11y-w *),
html.a11y-contrast body select:not(.a11y-w *) { border: 2px solid #FFF !important; }
html.a11y-contrast body :focus-visible { outline: 3px solid #FFE14D !important; }
html.a11y-contrast .logo img,
html.a11y-contrast .footer-brand > img { background-color: #FFF !important; padding: 4px; border-radius: 4px; }

/* Grayscale (on the root so fixed-position elements keep working) */
html.a11y-gray { filter: grayscale(100%); }

/* Pause animations and transitions */
html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

/* Large cursor */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3l30 24-13 2 8 15-6 3-8-15-11 9z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* Reading guide */
.a11y-guide {
  position: fixed; left: 0; right: 0; height: 12px; margin-top: -6px;
  background: rgba(255, 225, 77, .55);
  border-top: 2px solid #0F3226; border-bottom: 2px solid #0F3226;
  pointer-events: none; z-index: 99990; display: none;
}
html.a11y-guide-on .a11y-guide { display: block; }

/* ---------- Widget UI ---------- */
.a11y-w, .a11y-w * {
  box-sizing: border-box;
  font-family: Verdana, Tahoma, 'Segoe UI', Arial, sans-serif !important;
  letter-spacing: normal !important; word-spacing: normal !important;
  text-shadow: none !important; filter: none;
}

.a11y-w-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 99998;
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid #FFFFFF; background: #245250; color: #FFFFFF;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .15s ease, background-color .15s ease;
}
.a11y-w-toggle:hover { background: #0F3226; transform: scale(1.06); }
.a11y-w-toggle:focus-visible { outline: 3px solid #FFE14D !important; outline-offset: 3px; }
.a11y-w-toggle svg { width: 32px; height: 32px; }

.a11y-w-panel {
  position: fixed; left: 16px; bottom: 84px; z-index: 99999;
  width: 340px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto;
  background: #FFFFFF; color: #3B3632;
  border: 2px solid #245250; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  font-size: 15px; line-height: 1.4;
}
.a11y-w-panel[hidden] { display: none; }

.a11y-w-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; background: #245250; color: #FFFFFF;
  border-radius: 9px 9px 0 0; position: sticky; top: 0;
}
.a11y-w-head h2 { font-size: 17px; font-weight: 700; margin: 0; color: #FFFFFF; }
.a11y-w-close {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #FFFFFF;
  background: transparent; color: #FFFFFF; font-size: 20px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.a11y-w-close:hover { background: #0F3226; }

.a11y-w-body { padding: 14px 16px 16px; }

.a11y-w-size {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; margin-bottom: 12px;
  background: #EDF2F1; border-radius: 8px;
}
.a11y-w-size-label { font-weight: 700; font-size: 14px; }
.a11y-w-size-ctrl { display: flex; align-items: center; gap: 6px; }
.a11y-w-size-ctrl output { min-width: 46px; text-align: center; font-weight: 700; font-size: 14px; }
.a11y-w-step {
  width: 36px; height: 36px; border-radius: 8px;
  border: 2px solid #245250; background: #FFFFFF; color: #245250;
  font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
}
.a11y-w-step:hover:not(:disabled) { background: #245250; color: #FFFFFF; }
.a11y-w-step:disabled { opacity: .4; cursor: not-allowed; }

.a11y-w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-w-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 82px; padding: 10px 6px;
  border: 2px solid #D8DFE1; border-radius: 8px;
  background: #FFFFFF; color: #3B3632;
  font-size: 13px; font-weight: 600; text-align: center; cursor: pointer;
}
.a11y-w-opt svg { width: 26px; height: 26px; color: #245250; }
.a11y-w-opt:hover { border-color: #245250; }
.a11y-w-opt[aria-pressed="true"] { background: #245250; border-color: #245250; color: #FFFFFF; }
.a11y-w-opt[aria-pressed="true"] svg { color: #FFFFFF; }

.a11y-w :focus-visible { outline: 3px solid #E0A800 !important; outline-offset: 2px; }

.a11y-w-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; flex-wrap: wrap;
}
.a11y-w-reset {
  padding: 9px 14px; border-radius: 8px; border: 2px solid #245250;
  background: #FFFFFF; color: #245250; font-size: 14px; font-weight: 700; cursor: pointer;
}
.a11y-w-reset:hover { background: #245250; color: #FFFFFF; }
.a11y-w-foot a { color: #245250 !important; font-size: 13px; text-decoration: underline !important; }

.a11y-w-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 760px) {
  .a11y-w-toggle { width: 50px; height: 50px; left: 12px; bottom: 12px; }
  .a11y-w-toggle svg { width: 28px; height: 28px; }
  .a11y-w-panel { left: 12px; bottom: 72px; max-width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .a11y-w-toggle { transition: none; }
}

@media print {
  .a11y-w, .a11y-guide { display: none !important; }
}
