/* ZorgGerr — site-wide features: WhatsApp, crisis-bar, a11y-toolbar, mobile-CTA */

/* ============ A11Y: hoog contrast ============ */
html.zg-a11y-contrast {
  filter: contrast(1.15) saturate(0);
}
html.zg-a11y-contrast body {
  background: #ffffff !important;
  color: #000000 !important;
}
html.zg-a11y-contrast a {
  color: #003a8c !important;
  text-decoration: underline !important;
}
html.zg-a11y-contrast .btn-primary,
html.zg-a11y-contrast button.btn-primary {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #000 !important;
}
html.zg-a11y-contrast img:not(.no-contrast-fix) {
  filter: contrast(1.1);
}

/* ============ A11Y: tekstgrootte (toegepast op root html-font-size) ============ */
html[data-zg-textsize="0"] { font-size: 14px; }
html[data-zg-textsize="1"] { font-size: 16px; }   /* default */
html[data-zg-textsize="2"] { font-size: 18px; }
html[data-zg-textsize="3"] { font-size: 20px; }

/* ============ A11Y: zwevende knop + paneel ============ */
#zg-a11y-btn {
  position: fixed;
  bottom: 88px;            /* boven WhatsApp-knop */
  right: 20px;
  z-index: 9000;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: #1F2C1A;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
#zg-a11y-btn:hover { transform: translateY(-2px); }
#zg-a11y-btn:focus-visible { outline: 3px solid #A8D45F; outline-offset: 3px; }

#zg-a11y-panel {
  position: fixed;
  bottom: 148px;
  right: 20px;
  width: 260px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  padding: 18px;
  z-index: 9001;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1F2C1A;
}
#zg-a11y-panel.open { display: block; }
#zg-a11y-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1F2C1A;
}
.zg-a11y-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.zg-a11y-row span { font-size: 13px; color: #4B5446; }
.zg-a11y-toggle {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d9d5c8;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.zg-a11y-toggle.on {
  background: #4A9B2E;
  color: #fff;
  border-color: #4A9B2E;
}
.zg-a11y-sizes { display: flex; gap: 4px; }
.zg-a11y-sizes button {
  width: 36px; height: 30px;
  border: 1px solid #d9d5c8;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #1F2C1A;
}
.zg-a11y-sizes button.on {
  background: #1F2C1A;
  color: #fff;
  border-color: #1F2C1A;
}
.zg-a11y-reset {
  margin-top: 6px;
  width: 100%;
  padding: 6px;
  border: 1px dashed #d9d5c8;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #6c7488;
}

/* ============ WhatsApp floating ============ */
#zg-wa {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9000;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#zg-wa:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}
#zg-wa:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ============ Crisis-knop (bolletje met "!") + modal ============ */
#zg-crisis-btn {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 8px;
  background: #ffffff;
  color: #3a2a14;
  border: 1px solid rgba(165, 125, 60, 0.28);
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(31, 44, 26, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#zg-crisis-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 44, 26, 0.12);
  background: #FBF8F1;
}
#zg-crisis-btn:focus-visible {
  outline: 3px solid #C58B2A;
  outline-offset: 2px;
}
.zg-crisis-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: #C58B2A;
  color: white;
  border-radius: 50%;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 700;
  flex-shrink: 0;
}

#zg-crisis-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#zg-crisis-modal.open { display: flex; }
.zg-crisis-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 44, 26, 0.45);
  backdrop-filter: blur(2px);
}
.zg-crisis-dialog {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: #FBF8F1;
  border-radius: 18px;
  padding: 32px 30px 26px;
  box-shadow: 0 24px 60px rgba(31, 44, 26, 0.28);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1F2C1A;
  animation: zgCrisisIn 0.22s ease-out;
}
@keyframes zgCrisisIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.zg-crisis-dialog .zg-crisis-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6c7488;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.zg-crisis-dialog .zg-crisis-close:hover {
  background: rgba(31, 44, 26, 0.06);
  color: #1F2C1A;
}
.zg-crisis-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.zg-crisis-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: #C58B2A;
  color: white;
  border-radius: 50%;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 700;
  flex-shrink: 0;
}
.zg-crisis-dialog h2 {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.zg-crisis-lead {
  color: #4B5446;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.zg-crisis-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zg-crisis-list a,
.zg-crisis-static {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(31, 44, 26, 0.08);
  text-decoration: none;
  color: #1F2C1A;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.zg-crisis-list a:hover {
  border-color: #C58B2A;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(197, 139, 42, 0.18);
}
.zg-crisis-num {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #C58B2A;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  line-height: 1.1;
}
.zg-crisis-num.small {
  font-size: 17px;
  font-weight: 500;
  color: #1F2C1A;
}
.zg-crisis-desc {
  font-size: 13.5px;
  color: #4B5446;
  line-height: 1.45;
}
.zg-crisis-foot {
  font-size: 13px;
  color: #6c7488;
  border-top: 1px solid rgba(31, 44, 26, 0.06);
  padding-top: 14px;
  margin: 0;
}
.zg-crisis-foot a {
  color: #4A9B2E;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #4A9B2E;
}
.zg-crisis-foot a:hover { color: #2E6F18; }

@media (max-width: 760px) {
  #zg-crisis-btn {
    bottom: 78px;                 /* boven mobile-cta */
    left: 14px;
    padding: 8px 14px 8px 6px;
    font-size: 12.5px;
  }
  .zg-crisis-btn-icon { width: 22px; height: 22px; font-size: 14px; }
  .zg-crisis-dialog { padding: 24px 20px 20px; }
  .zg-crisis-dialog h2 { font-size: 19px; }
}

/* ============ Mobile sticky CTA ============ */
#zg-mobile-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 8999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #A8D45F, #4A9B2E);
  color: white;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 -6px 24px rgba(31,44,26,0.16);
  transition: transform 0.3s ease;
}
#zg-mobile-cta.hide {
  transform: translateY(100%);
}
@media (max-width: 760px) {
  #zg-mobile-cta { display: flex; }
  /* Body bottom-padding zodat content niet onder de CTA verdwijnt */
  body { padding-bottom: 60px; }
  /* WhatsApp en a11y verschuiven omhoog op mobiel om botsing te voorkomen */
  #zg-wa { bottom: 78px; }
  #zg-a11y-btn { bottom: 142px; }
  #zg-a11y-panel { bottom: 200px; right: 12px; }
}

/* ============ Print (item 32 nice-to-have) ============ */
@media print {
  #zg-wa, #zg-a11y-btn, #zg-a11y-panel, #zg-mobile-cta, #zg-crisis,
  .cookie-banner { display: none !important; }
}
