/* Zwevende WhatsApp-knop rechtsonder — gedeeld door alle pagina's. */

.wa-knop {
  position: fixed; z-index: 80;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 0;
  height: 60px; padding: 0; border-radius: 30px;
  background: #25D366; color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .18);
  transition: gap .22s ease, padding .22s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
  overflow: hidden;
}
.wa-knop:hover, .wa-knop:focus-visible {
  background: #1FBA59;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .2);
}

/* Het bolletje zelf: vaste maat, zodat de knop rond blijft zonder label. */
.wa-knop .wa-ico {
  width: 60px; height: 60px; flex: none;
  display: grid; place-items: center;
}
.wa-knop .wa-ico svg { width: 30px; height: 30px; display: block; fill: currentColor; }

/* Label schuift open bij hover of toetsenbordfocus. */
.wa-knop .wa-label {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  font-size: 17px; white-space: nowrap;
  max-width: 0; opacity: 0;
  transition: max-width .26s ease, opacity .18s ease, padding-right .26s ease;
  padding-right: 0;
}
.wa-knop:hover .wa-label, .wa-knop:focus-visible .wa-label {
  max-width: 240px; opacity: 1; padding-right: 24px;
}

/* Zachte pulserende ring, puur decoratief. */
.wa-knop::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .55);
  animation: wa-puls 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-puls {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  60%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.wa-knop:hover::after, .wa-knop:focus-visible::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .wa-knop, .wa-knop .wa-label { transition: none; }
  .wa-knop::after { animation: none; }
}

/* Zolang de cookiemelding openstaat, schuift de knop erboven zodat niets overlapt.
   De hoogte van die balk wordt door js/cookiemelding.js in --cookiebar-hoogte gezet. */
body.cookiemelding-open .wa-knop {
  bottom: calc(20px + var(--cookiebar-hoogte, 0px) + 16px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 480px) {
  .wa-knop { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); height: 56px; border-radius: 28px; }
  .wa-knop .wa-ico { width: 56px; height: 56px; }
  .wa-knop .wa-ico svg { width: 28px; height: 28px; }
  /* Geen uitschuivend label op aanraakschermen: hover bestaat daar niet. */
  .wa-knop .wa-label { display: none; }
}
