/**
 * page-a11y-widget — styles
 * Overschrijf :root-variabelen in je eigen stylesheet ná het importeren van dit bestand.
 * @license MIT
 */

:root {
  --a11y-ink: #131313;
  --a11y-ink-2: #2a2a2a;
  --a11y-muted: #5d5d5d;
  --a11y-line: #e8e6e0;
  --a11y-bg: #ffffff;
  --a11y-bg-soft: #f7f6f3;
  --a11y-focus: #0a58c2;
  --a11y-brand: #cd1727;
  --a11y-radius: 16px;
  --a11y-radius-sm: 10px;
  --a11y-shadow-md: 0 4px 12px rgba(15, 15, 15, 0.06), 0 12px 32px rgba(15, 15, 15, 0.06);
  --a11y-shadow-lg: 0 24px 60px rgba(15, 15, 15, 0.1);
  --a11y-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html.a11y-text-size-sm {
  font-size: 87.5%;
}
html.a11y-text-size-md {
  font-size: 100%;
}
html.a11y-text-size-lg {
  font-size: 125%;
}

html.a11y-high-saturation {
  filter: saturate(1.45);
}

.page-a11y-widget-sr-only,
.a11y-fab .sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.a11y-widget {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 10100;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--a11y-font);
  pointer-events: none;
}
.a11y-widget > * {
  pointer-events: auto;
}
.a11y-panel {
  width: min(320px, calc(100vw - 32px));
  padding: 16px 18px 14px;
  background: var(--a11y-bg);
  border: 1.5px solid var(--a11y-line);
  border-radius: var(--a11y-radius);
  box-shadow: var(--a11y-shadow-lg);
}
.a11y-panel[hidden] {
  display: none !important;
}
.a11y-panel-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--a11y-ink);
}
.a11y-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--a11y-ink);
  cursor: pointer;
  line-height: 1.35;
}
.a11y-option input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--a11y-brand);
}
.a11y-panel-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--a11y-muted);
  line-height: 1.45;
}
.a11y-panel-close {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--a11y-line);
  background: var(--a11y-bg-soft);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--a11y-ink);
}
.a11y-panel-close:hover {
  background: var(--a11y-line);
}
.a11y-fab {
  width: var(--stack-fab-size, 3.35rem);
  height: var(--stack-fab-size, 3.35rem);
  border-radius: 50%;
  border: 1.5px solid #06357a;
  background: var(--a11y-focus);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--a11y-shadow-md);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.a11y-fab:hover {
  transform: translateY(-2px);
  box-shadow: var(--a11y-shadow-lg);
  background: #0b5ed7;
  border-color: #084298;
}
.a11y-fab[aria-expanded="true"] {
  background: #084298;
  border-color: #062d66;
}
.a11y-fab svg {
  width: var(--stack-fab-icon, 1.55rem);
  height: var(--stack-fab-icon, 1.55rem);
}

.a11y-fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  min-width: 0;
}
.a11y-fieldset-textsize {
  margin-bottom: 18px;
}
.a11y-fieldset-legend {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--a11y-ink);
  margin-bottom: 10px;
  padding: 0;
}
.a11y-size-segmented {
  display: flex;
  width: 100%;
  border: 1.5px solid var(--a11y-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--a11y-bg-soft);
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.05);
}
.a11y-size-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  margin: 0;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--a11y-ink);
  cursor: pointer;
  background: transparent;
  border: none;
  border-right: 1px solid var(--a11y-line);
  transition: background 0.18s ease, color 0.18s ease;
}
.a11y-size-btn:last-child {
  border-right: 0;
}
.a11y-size-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.a11y-size-btn-text {
  position: relative;
  z-index: 1;
  pointer-events: none;
  line-height: 1.2;
  text-align: center;
}
.a11y-size-btn:hover {
  background: rgba(255, 255, 255, 0.65);
}
.a11y-size-btn:has(.a11y-size-input:checked) {
  background: var(--a11y-ink);
  color: #fff;
}
.a11y-size-btn:has(.a11y-size-input:checked):hover {
  background: var(--a11y-ink-2);
  color: #fff;
}
.a11y-size-btn:has(.a11y-size-input:focus-visible) {
  z-index: 3;
  outline: 3px solid var(--a11y-focus);
  outline-offset: -3px;
}

body.a11y-read-mode .a11y-widget {
  z-index: 10110;
}
body.a11y-read-mode .a11y-panel {
  color: var(--a11y-ink);
  background: #fff;
  border-color: var(--a11y-line);
}
body.a11y-read-mode .a11y-fieldset-legend,
body.a11y-read-mode .a11y-option,
body.a11y-read-mode .a11y-size-btn {
  color: var(--a11y-ink);
}
body.a11y-read-mode .a11y-panel-hint {
  color: var(--a11y-muted);
}

body.a11y-read-mode #a11yPanel .a11y-read-block {
  outline: 2px dashed #0a58c2;
  outline-offset: 2px;
  border-radius: var(--a11y-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, outline 0.15s ease;
}
body.a11y-read-mode #a11yPanel .a11y-read-block:hover {
  outline-style: solid;
  outline-color: var(--a11y-ink);
  outline-width: 3px;
}
body.a11y-read-mode #a11yPanel h2.a11y-read-block:hover,
body.a11y-read-mode #a11yPanel legend.a11y-read-block:hover,
body.a11y-read-mode #a11yPanel p.a11y-read-block:hover {
  background: rgba(10, 88, 194, 0.09);
}
body.a11y-read-mode #a11yPanel .a11y-read-block:focus-visible,
body.a11y-read-mode #a11yPanel label.a11y-read-block:focus-within {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #084298;
}
body.a11y-read-mode #a11yPanel .a11y-read-block.a11y-read-flash {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #0a58c2;
}
body.a11y-read-mode #a11yPanel .a11y-read-block.a11y-read-selected {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #084298;
}

body.a11y-read-mode main .a11y-read-block,
body.a11y-read-mode header .a11y-read-block,
body.a11y-read-mode footer .a11y-read-block {
  outline: 2px dashed #0a58c2;
  outline-offset: 3px;
  border-radius: var(--a11y-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
body.a11y-read-mode main .a11y-read-block:hover,
body.a11y-read-mode header .a11y-read-block:hover,
body.a11y-read-mode footer .a11y-read-block:hover {
  outline-style: solid;
  outline-color: var(--a11y-ink);
  outline-width: 3px;
}
body.a11y-read-mode main h1.a11y-read-block:hover,
body.a11y-read-mode main h2.a11y-read-block:hover,
body.a11y-read-mode main h3.a11y-read-block:hover,
body.a11y-read-mode main h4.a11y-read-block:hover,
body.a11y-read-mode main p.a11y-read-block:hover,
body.a11y-read-mode main figcaption.a11y-read-block:hover,
body.a11y-read-mode main address.a11y-read-block:hover,
body.a11y-read-mode header .header__links a.a11y-read-block:not(.btn):hover,
body.a11y-read-mode header .header__nav a.a11y-read-block:not(.btn):hover,
body.a11y-read-mode footer p.a11y-read-block:hover,
body.a11y-read-mode footer h3.a11y-read-block:hover,
body.a11y-read-mode footer address.a11y-read-block:hover,
body.a11y-read-mode footer li.a11y-read-block:hover,
body.a11y-read-mode footer small.a11y-read-block:hover {
  background: rgba(10, 88, 194, 0.09);
}
body.a11y-read-mode main .a11y-read-block:focus-visible,
body.a11y-read-mode header .a11y-read-block:focus-visible,
body.a11y-read-mode footer .a11y-read-block:focus-visible {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #084298;
}
body.a11y-read-mode main .a11y-read-block.a11y-read-flash,
body.a11y-read-mode header .a11y-read-block.a11y-read-flash,
body.a11y-read-mode footer .a11y-read-block.a11y-read-flash {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #0a58c2;
}
body.a11y-read-mode main .a11y-read-block.a11y-read-selected,
body.a11y-read-mode header .a11y-read-block.a11y-read-selected,
body.a11y-read-mode footer .a11y-read-block.a11y-read-selected {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #084298;
}

/* Hoog contrast: globaal zetten jullie zelf; hier alleen widget + voorlees-paneel. */
html.high-contrast .a11y-panel {
  border: 2px solid #000 !important;
  background: #fff !important;
  color: #000 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}
html.high-contrast .a11y-fab {
  background: #084298;
  border: 2px solid #000;
  color: #fff;
}
html.high-contrast .a11y-fab[aria-expanded="true"] {
  background: #062d66 !important;
  border-color: #000 !important;
  color: #fff !important;
}
html.high-contrast .a11y-panel-title,
html.high-contrast .a11y-fieldset-legend,
html.high-contrast .a11y-option {
  color: #000 !important;
}
html.high-contrast .a11y-size-segmented {
  border: 2px solid #000 !important;
  background: #f2f2f2 !important;
  box-shadow: none !important;
}
html.high-contrast .a11y-size-btn {
  border-color: #000 !important;
  border-right: 1px solid #000 !important;
  background: transparent !important;
}
html.high-contrast .a11y-size-btn:hover {
  background: #e8e8e8 !important;
}
html.high-contrast .a11y-size-btn:has(.a11y-size-input:checked) {
  background: #000 !important;
  color: #fff !important;
}
html.high-contrast .a11y-size-btn:has(.a11y-size-input:checked):hover {
  background: #141414 !important;
  color: #fff !important;
}
html.high-contrast .a11y-size-btn:has(.a11y-size-input:focus-visible) {
  outline: 3px solid #00c !important;
  outline-offset: -3px;
}
html.high-contrast .a11y-panel-hint {
  color: #2a2a2a !important;
}
html.high-contrast .a11y-panel-close {
  border: 2px solid #000 !important;
  background: #f2f2f2 !important;
  color: #000 !important;
}
html.high-contrast .a11y-panel-close:hover {
  background: #e0e0e0 !important;
}
html.high-contrast .a11y-option input {
  accent-color: #00c;
}
html.high-contrast body.a11y-read-mode .a11y-panel {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
}

@media (max-width: 720px) {
  .a11y-widget {
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
}

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

/* InnoDIGI — FAB/paneel in merkkleuren */
:root {
  --a11y-focus: #2167b1;
  --a11y-brand: #f47d4f;
}
