@property --whatsapp-neon-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: true;
}

.block-whatsapp-primary {
  --whatsapp-neon-angle: 0deg;
  isolation: isolate;
  overflow: visible;
  border-color: transparent !important;
  background: #141414;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .3), 0 0 0 1px rgba(95, 244, 193, .25);
  animation: whatsapp-neon-orbit 6s linear infinite;
}

/* Mask both light layers to the outline so the text stays on solid black. */
.block-whatsapp-primary::before,
.block-whatsapp-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  left: -2px;
  width: auto;
  height: auto;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--whatsapp-neon-angle),
    #4be8aa 0deg, #a0ffe2 45deg, #53d8ef 100deg,
    #21655c 158deg, #20332d 205deg, #f3cf72 265deg,
    #79f3ce 315deg, #4be8aa 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  transition: none;
}

.block-whatsapp-primary::before {
  z-index: 0;
}

.block-whatsapp-primary::after {
  z-index: -1;
  filter: blur(7px);
  opacity: .6;
  animation: whatsapp-neon-breathe 3.6s ease-in-out infinite;
}

.block-whatsapp-primary:hover::before {
  left: -2px;
}

.block-whatsapp-primary > * {
  position: relative;
  z-index: 1;
}

.block-whatsapp-primary:focus-visible {
  outline: 3px solid #b4ffe6;
  outline-offset: 6px;
}

@keyframes whatsapp-neon-orbit {
  to { --whatsapp-neon-angle: 360deg; }
}

@keyframes whatsapp-neon-breathe {
  0%, 100% { opacity: .35; }
  50% { opacity: .85; }
}

@media (prefers-reduced-motion: reduce) {
  .block-whatsapp-primary,
  .block-whatsapp-primary::before,
  .block-whatsapp-primary::after {
    animation: none !important;
  }
  .block-whatsapp-primary::after { opacity: .45; }
}

@media (forced-colors: active) {
  .block-whatsapp-primary { border-color: ButtonText !important; }
  .block-whatsapp-primary::before,
  .block-whatsapp-primary::after { display: none; }
}
