/**
 * 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;
  --a11y-font-dyslexia: "OpenDyslexic", "Open-Dyslexic", "Comic Sans MS", Arial, sans-serif;
}

/* OpenDyslexic webfont — gehost via fonts.cdnfonts.com */
@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("OpenDyslexic"),
       url("https://fonts.cdnfonts.com/s/19808/OpenDyslexic-Regular.woff") format("woff");
}
@font-face {
  font-family: "OpenDyslexic";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local("OpenDyslexic"),
       url("https://fonts.cdnfonts.com/s/19808/OpenDyslexic-Italic.woff") format("woff");
}
@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("OpenDyslexic"),
       url("https://fonts.cdnfonts.com/s/19808/OpenDyslexic-Bold.woff") format("woff");
}
@font-face {
  font-family: "OpenDyslexic";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: local("OpenDyslexic"),
       url("https://fonts.cdnfonts.com/s/19808/OpenDyslexic-BoldItalic.woff") format("woff");
}

/* ——— Document-level toegankelijkheid (html/body classes) ——— */

/* Tekstgrootte: schaalt met de root van de pagina. */
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%; }

/* Hoge saturatie — isolation vermindert WebKit-compositing-randen bij filter op root. */
html.a11y-high-saturation {
  filter: saturate(1.45);
  isolation: isolate;
}

/* Extra grote cursor (SVG data-URI; pijlcursor met witte rand). */
html.a11y-large-cursor,
html.a11y-large-cursor body,
html.a11y-large-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 fill='%23111111' stroke='%23ffffff' stroke-width='3.2' stroke-linejoin='round' d='M4 2v42l12-11 8 15 7-3-7-15h20L4 2z'/%3E%3C/svg%3E") 6 4, auto !important;
}
html.a11y-large-cursor :is(input[type='text'], input[type='email'], input[type='tel'], input[type='url'], input[type='search'], input[type='password'], input[type='number'], textarea) {
  cursor: text !important;
}

/* Dyslexie-lettertype. Laad zelf de Open-Dyslexic font-face als je 'm aan wilt bieden. */
html.a11y-dyslexia-font {
  font-family: var(--a11y-font-dyslexia);
}
html.a11y-dyslexia-font body {
  font-family: var(--a11y-font-dyslexia);
  letter-spacing: 0.015em;
  word-spacing: 0.04em;
}
html.a11y-dyslexia-font :is(button, input, select, textarea) {
  font-family: var(--a11y-font-dyslexia);
}

/* Sr-only utility (alleen actief binnen de FAB als de site die niet zelf heeft). */
.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;
}

/* ——— Widget root ——— */
.a11y-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  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;
}

/* ——— Paneel ——— */
.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-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.a11y-panel-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--a11y-ink);
}
.a11y-panel-head .a11y-panel-title {
  margin: 0;
}

.a11y-panel-reset {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--a11y-line);
  border-radius: 999px;
  background: var(--a11y-bg-soft);
  color: var(--a11y-ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.a11y-panel-reset:hover {
  background: var(--a11y-line);
  border-color: #d7d3ca;
}
.a11y-panel-reset:active {
  transform: scale(0.97);
}
.a11y-panel-reset svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.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-focus);
}

.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);
}

/* ——— FAB (zwevende knop) ——— */
.a11y-fab {
  width: 52px;
  height: 52px;
  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: 26px;
  height: 26px;
}

/* ——— Tekstgrootte-segmented control ——— */
.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;
}

/* ——— Voorleesmodus: paneel zelf ——— */
body.a11y-read-mode .a11y-widget {
  z-index: 10060;
}
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);
}

/* Leesblokken in het paneel — discreet, met speaker-icoon op hover (binnen het paneel). */
body.a11y-read-mode #a11yPanel .a11y-read-block {
  outline: none;
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
}
body.a11y-read-mode #a11yPanel .a11y-read-block::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(10, 10, 10, 0.15);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M18.5 6a9 9 0 0 1 0 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: opacity 0.15s ease;
}
body.a11y-read-mode #a11yPanel .a11y-read-block:hover,
body.a11y-read-mode #a11yPanel .a11y-read-block:focus-visible,
body.a11y-read-mode #a11yPanel label.a11y-read-block:focus-within {
  outline: 1px dotted var(--a11y-ink);
  outline-offset: 2px;
}
body.a11y-read-mode #a11yPanel .a11y-read-block:hover::after,
body.a11y-read-mode #a11yPanel .a11y-read-block:focus-visible::after,
body.a11y-read-mode #a11yPanel label.a11y-read-block:focus-within::after {
  opacity: 1;
}
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,
body.a11y-read-mode #a11yPanel h2.a11y-read-block:focus-visible,
body.a11y-read-mode #a11yPanel legend.a11y-read-block:focus-visible,
body.a11y-read-mode #a11yPanel p.a11y-read-block:focus-visible,
body.a11y-read-mode #a11yPanel .a11y-option > span.a11y-read-block:hover,
body.a11y-read-mode #a11yPanel .a11y-option > span.a11y-read-block:focus-visible {
  border-radius: var(--a11y-radius-sm);
  background: rgba(255, 247, 194, 0.85);
}
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;
}

/* ——— Voorleesmodus: main, footer, page-hero, aside én topnav (.nav / .nav__mobile).
   Geen <header> rond de hoofdnav — alleen .nav — dus die expliciet meenemen. ——— */
body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block {
  outline: none;
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
}
body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block::after {
  content: "";
  position: absolute;
  /* Binnen het element houden — accordeons en knoppen hebben vaak overflow:hidden */
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(10, 10, 10, 0.15);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M18.5 6a9 9 0 0 1 0 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: opacity 0.15s ease;
  z-index: 2;
}
/* Knoppen, siteknoppen, nav-pills, mobiele rijen, dropdown-links */
body.a11y-read-mode :is(main, header, #header, .page-hero, aside, .nav, .nav__mobile, .hero)
  :is(button, a.btn, a.card-photo-link, a.nav__link, a.nav__mobile-link).a11y-read-block::after,
body.a11y-read-mode .nav a.nav__dropdown-link.a11y-read-block::after,
body.a11y-read-mode .nav__mobile-submenu a.a11y-read-block::after,
body.a11y-read-mode #nav-toggle.a11y-read-block::after,
body.a11y-read-mode .nav__toggle.a11y-read-block::after {
  top: 50%;
  bottom: auto;
  right: 10px;
  transform: translateY(-50%);
}
/* Accordion-koppen + mobiele sectiekoppen: ruimte voor pijl/plus rechts */
body.a11y-read-mode :is(main, .page-hero, aside, .hero) .accordion__header.a11y-read-block::after,
body.a11y-read-mode .nav__mobile .nav__mobile-section-title.a11y-read-block::after {
  top: 50%;
  bottom: auto;
  right: 48px;
  transform: translateY(-50%);
}
/* Lijstregels (o.a. submenu) */
body.a11y-read-mode :is(main, footer, .page-hero, aside, .nav, .nav__mobile, .hero) li.a11y-read-block::after {
  top: 50%;
  bottom: auto;
  right: 8px;
  transform: translateY(-50%);
}
body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block:hover::after,
body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block:focus-visible::after {
  opacity: 1;
}

/* Gouden rand bij hover/focus: alle voorleesblokken in de pagina-inhoud.
   (Eerder alleen h1–p–div… waardoor o.a. <a> in breadcrumbs/hero wél een speaker
   hadden maar géén omlijning.) */
body.a11y-read-mode
  :is(main, header, #header, footer, .page-hero, aside, .nav, .nav__mobile, .hero)
  .a11y-read-block:hover,
body.a11y-read-mode
  :is(main, header, #header, footer, .page-hero, aside, .nav, .nav__mobile, .hero)
  .a11y-read-block:focus-visible,
body.a11y-read-mode a.skip-link.a11y-read-block:hover,
body.a11y-read-mode a.skip-link.a11y-read-block:focus-visible {
  outline: 2px solid #ffb400;
  outline-offset: 3px;
  border-radius: var(--a11y-radius-sm);
}

/* Knoppen/btn-links: geen achtergrondkleur, wel een opvallende gouden rand. */
body.a11y-read-mode :is(main, header, #header, .page-hero, aside, .nav, .nav__mobile, .hero) :is(button, a.btn, a.card-photo-link).a11y-read-block:hover,
body.a11y-read-mode :is(main, header, #header, .page-hero, aside, .nav, .nav__mobile, .hero) :is(button, a.btn, a.card-photo-link).a11y-read-block:focus-visible,
body.a11y-read-mode #nav-toggle.a11y-read-block:hover,
body.a11y-read-mode #nav-toggle.a11y-read-block:focus-visible,
body.a11y-read-mode .nav__toggle.a11y-read-block:hover,
body.a11y-read-mode .nav__toggle.a11y-read-block:focus-visible {
  outline: 2px solid #ffb400;
  outline-offset: 3px;
  box-shadow: none;
}

body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block.a11y-read-flash {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #0a58c2;
}
body.a11y-read-mode :is(main, #header, header, footer, .page-hero, aside, .nav, .nav__mobile, .hero) .a11y-read-block.a11y-read-selected {
  outline-style: solid;
  outline-width: 3px;
  outline-color: #084298;
}
body.a11y-read-mode :is(main, header, #header, .page-hero, aside, .nav, .nav__mobile, .hero) :is(button, a.btn, a.card-photo-link).a11y-read-block.a11y-read-flash,
body.a11y-read-mode #nav-toggle.a11y-read-block.a11y-read-flash,
body.a11y-read-mode .nav__toggle.a11y-read-block.a11y-read-flash {
  outline: 3px solid #0a58c2;
  outline-offset: 3px;
  box-shadow: none;
}
body.a11y-read-mode :is(main, header, #header, .page-hero, aside, .nav, .nav__mobile, .hero) :is(button, a.btn, a.card-photo-link).a11y-read-block.a11y-read-selected,
body.a11y-read-mode #nav-toggle.a11y-read-block.a11y-read-selected,
body.a11y-read-mode .nav__toggle.a11y-read-block.a11y-read-selected {
  outline: 3px solid #084298;
  outline-offset: 3px;
  box-shadow: none;
}

/* ——— Hoog contrast: alleen widget + paneel.
   De globale `html.high-contrast` opmaak voor de rest van jullie site (header,
   secties, knoppen) regel je in jullie eigen stylesheet. ——— */
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-panel-reset {
  border: 2px solid #000 !important;
  background: #f2f2f2 !important;
  color: #000 !important;
}
html.high-contrast .a11y-panel-reset:hover {
  background: #e0e0e0 !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;
}

/* ——— Mobiel ——— */
@media (max-width: 720px) {
  .a11y-widget {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a11y-fab,
  .a11y-panel-reset,
  .a11y-read-block,
  .a11y-read-block::after {
    transition: none;
  }
}
