/* One shared cycle keeps the floating pulse and every reflection in phase. */
:root { --cta-motion-cycle: 6s; --cta-motion-delay: .8s; }
.button::after {
  animation: cta-reflection var(--cta-motion-cycle) ease-in-out infinite;
  animation-delay: var(--cta-motion-delay);
  transition: none;
}
@keyframes cta-reflection {
  0% { transform: translateX(-75%); opacity: 0; }
  3% { opacity: .85; }
  21% { transform: translateX(75%); opacity: .85; }
  24%, 100% { transform: translateX(75%); opacity: 0; }
}
.whatsapp-float {
  position: fixed;
  z-index: 100;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #c8a65f;
  border-radius: 50%;
  background: radial-gradient(ellipse at 30% 10%, #49402e, #191711 52%, #090909);
  box-shadow: inset 0 1px 0 rgb(255 238 193 / 25%), 0 5px 20px rgb(0 0 0 / 38%), 0 0 16px rgb(206 166 81 / 12%);
  color: #dfbd70;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: whatsapp-soft-pulse var(--cta-motion-cycle) ease-in-out infinite;
  animation-delay: var(--cta-motion-delay);
}
@keyframes whatsapp-soft-pulse {
  0%, 24%, 100% { scale: 1; }
  11% { scale: 1.035; }
}
.whatsapp-float svg { display: block; width: 31px; height: 31px; fill: url(#whatsapp-gold); }
.whatsapp-float::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -40% -80%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgb(255 240 202 / 12%) 46%, rgb(255 248 226 / 48%) 50%, rgb(255 240 202 / 12%) 54%, transparent 60%);
  animation: cta-reflection var(--cta-motion-cycle) ease-in-out infinite;
  animation-delay: var(--cta-motion-delay);
  transform: translateX(-75%);
  opacity: 0;
}
.whatsapp-float:focus-visible { outline: 2px solid #edce87; outline-offset: 5px; }
.whatsapp-float:active { transform: scale(.95); }
body:has(dialog[open]) .whatsapp-float { visibility: hidden; }
@media (hover: hover) {
  .whatsapp-float:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgb(255 238 193 / 32%), 0 8px 24px rgb(0 0 0 / 40%), 0 0 18px rgb(206 166 81 / 25%); }
}
@media (prefers-reduced-motion: reduce) {
  .button::after, .whatsapp-float::after { animation: none; opacity: 0; }
  .whatsapp-float { transition: none; animation: none; scale: 1; }
}
