.pv-whatsapp {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 1100;
  width: 60px;
  height: 60px;
}

.pv-whatsapp-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid #1b3349;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.pv-whatsapp-link:focus-visible {
  outline: 3px solid #1b3349;
  outline-offset: 4px;
}

.pv-whatsapp-link img {
  position: relative;
  z-index: 1;
  display: block;
  width: 30px;
  height: 30px;
}

.pv-whatsapp-bubble {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: max-content;
  max-width: min(220px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid #1b3349;
  background: #fff;
  color: #1b3349;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  font: 400 14px/1.4 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
}

.pv-whatsapp-bubble::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #1b3349;
  border-bottom: 1px solid #1b3349;
  background: #fff;
  transform: rotate(45deg);
}

.pv-whatsapp-link:focus-visible .pv-whatsapp-bubble { opacity: 1; animation: none; }
@media (hover: hover) {
  .pv-whatsapp-link:hover .pv-whatsapp-bubble { opacity: 1; animation: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .pv-whatsapp-link::before, .pv-whatsapp-link::after {
    content: '';
    position: absolute;
    inset: -1px;
    border: 2px solid #25d366;
    border-radius: 50%;
    pointer-events: none;
    animation: pv-whatsapp-pulse 2.4s ease-out infinite;
  }
  .pv-whatsapp-link::after { animation-delay: 1.2s; }
  .pv-whatsapp-bubble { animation: pv-whatsapp-greeting 12s ease-out both; }
  @keyframes pv-whatsapp-pulse {
    from { transform: scale(1); opacity: .7; }
    to { transform: scale(1.45); opacity: 0; }
  }
  @keyframes pv-whatsapp-greeting {
    0%, 15%, 100% { opacity: 0; }
    22%, 80% { opacity: 1; }
  }
}
