.whatsapp-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.whatsapp-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #28e468, #22c95d);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.whatsapp-link:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(145deg, #2eeb70, #25d363);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.whatsapp-link:active {
  transform: translateY(1px) scale(0.98);
}

.whatsapp-link:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.5),
    0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-link svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-link:hover svg {
  transform: scale(1.1);
}

.whatsapp-tooltip {
  background: rgba(var(--tooltip-bg-rgb), var(--tooltip-bg-opacity));
  color: var(--tooltip-color);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(var(--tooltip-border-rgb), 0.08);
  backdrop-filter: blur(8px);
  transform-origin: bottom center;
  animation: tooltipFloat 3s ease-in-out infinite;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: rgba(var(--tooltip-bg-rgb), var(--tooltip-bg-opacity));
  border-right: 1px solid rgba(var(--tooltip-border-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--tooltip-border-rgb), 0.08);
  rotate: 45deg;
  backdrop-filter: blur(8px);
}

:root {
  --tooltip-bg-rgb: 255, 255, 255;
  --tooltip-bg-opacity: 0.98;
  --tooltip-color: #1a1a1a;
  --tooltip-border-rgb: 0, 0, 0;
}

.dark-mode .whatsapp-tooltip {
  --tooltip-bg-rgb: 32, 33, 35;
  --tooltip-bg-opacity: 0.95;
  --tooltip-color: #ffffff;
  --tooltip-border-rgb: 255, 255, 255;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.2);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.2);
  }
}

@keyframes tooltipFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.whatsapp-link {
  animation: pulse 2s infinite;
}

@media (max-width: 768px) {
  .whatsapp-widget {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }

  .whatsapp-link {
    width: 50px;
    height: 50px;
  }

  .whatsapp-link svg {
    width: 28px;
    height: 28px;
  }

  .whatsapp-tooltip {
    font-size: 13px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .whatsapp-widget {
    right: 8px;
    bottom: 8px;
    width: auto;
    min-width: 0;
    max-width: 100vw;
  }
  .whatsapp-link {
    width: 44px;
    height: 44px;
  }
  .whatsapp-tooltip {
    font-size: 12px;
    padding: 6px 14px;
    font-weight: 500;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-link,
  .whatsapp-tooltip,
  .whatsapp-link svg {
    animation: none;
    transition: none;
    transform: none;
  }

  .whatsapp-link:hover {
    transform: none;
  }
}
