/* Viabletics — Accessibility Convenience Widget (styles)
   Self-contained: does not rely on any host-page CSS variable, so it looks and
   behaves the same on every surface (homepage, /app, /demo, static pages, tools). */

.viab-a11y-fab {
  position: fixed;
  bottom: 20px;
  z-index: 2147483000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #0d1b2a;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .15s, background .15s;
}
html[dir="rtl"] .viab-a11y-fab { left: 20px; }
html[dir="ltr"] .viab-a11y-fab { right: 20px; }
.viab-a11y-fab:hover { background: #14283e; transform: scale(1.05); }
.viab-a11y-fab:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 3px;
}

.viab-a11y-panel {
  position: fixed;
  bottom: 84px;
  z-index: 2147483000;
  width: min(300px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 110px));
  overflow-y: auto;
  background: #fff;
  color: #101828;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
  padding: 16px;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}
html[dir="rtl"] .viab-a11y-panel { left: 20px; }
html[dir="ltr"] .viab-a11y-panel { right: 20px; }
.viab-a11y-panel[hidden] { display: none; }

@media (max-width: 420px) {
  .viab-a11y-panel {
    left: 12px !important;
    right: 12px !important;
    width: auto;
    bottom: 84px;
  }
}

.viab-a11y-panel * { box-sizing: border-box; }

.viab-a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.viab-a11y-title {
  font-weight: 800;
  font-size: 15px;
  color: #0d1b2a;
  margin: 0;
}
.viab-a11y-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #5b6478;
  padding: 4px 8px;
  border-radius: 8px;
}
.viab-a11y-close:hover { background: #f1f4f9; color: #101828; }
.viab-a11y-close:focus-visible { outline: 3px solid #0e827e; outline-offset: 2px; }

.viab-a11y-note {
  font-size: 12px;
  color: #5b6478;
  margin: 0 0 12px;
}

.viab-a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.viab-a11y-grid.viab-a11y-full { grid-template-columns: 1fr; }

.viab-a11y-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f4f9;
  border: 1.5px solid #e2e8f4;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #101828;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.viab-a11y-btn:hover { background: #e6ecf6; }
.viab-a11y-btn:focus-visible { outline: 3px solid #0e827e; outline-offset: 2px; }
.viab-a11y-btn[aria-pressed="true"] {
  background: #0e827e;
  border-color: #0e827e;
  color: #fff;
}

.viab-a11y-reset {
  width: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1.5px dashed #b8c2d4;
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #5b6478;
  cursor: pointer;
  font-family: inherit;
}
.viab-a11y-reset:hover { background: #f6f8fc; color: #101828; }
.viab-a11y-reset:focus-visible { outline: 3px solid #0e827e; outline-offset: 2px; }

.viab-a11y-statement {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f4;
  color: #0e827e;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
}
.viab-a11y-statement:focus-visible { outline: 3px solid #0e827e; outline-offset: 2px; }

/* Safety net: the widget's own zoom/effects must never let the page grow wider
   than the viewport (decorative absolutely-positioned background elements on
   some pages can otherwise bleed further right/left once zoomed). This does
   not affect intentionally horizontally-scrollable regions elsewhere on the
   page (e.g. wide tables) — those manage their own internal overflow-x. */
html.viab-a11y-loaded { overflow-x: hidden; overflow-x: clip; }

/* ===== Effects applied to the host page ===== */

html.viab-a11y-highlight-links a {
  outline: 2px solid #ffd166 !important;
  outline-offset: 1px !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}

html.viab-a11y-contrast {
  filter: contrast(1.28) brightness(1.02);
}

html.viab-a11y-readable-font,
html.viab-a11y-readable-font body,
html.viab-a11y-readable-font p,
html.viab-a11y-readable-font li,
html.viab-a11y-readable-font span,
html.viab-a11y-readable-font div,
html.viab-a11y-readable-font a,
html.viab-a11y-readable-font button,
html.viab-a11y-readable-font label,
html.viab-a11y-readable-font input,
html.viab-a11y-readable-font textarea,
html.viab-a11y-readable-font h1,
html.viab-a11y-readable-font h2,
html.viab-a11y-readable-font h3 {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: .01em !important;
  line-height: 1.65 !important;
}

html.viab-a11y-reduced-motion *,
html.viab-a11y-reduced-motion *::before,
html.viab-a11y-reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
