/* ==========================================================
   whatsapp.css — Botón flotante de WhatsApp
   JCG InfraTech
   ========================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

/* ── Tooltip ── */
.whatsapp-tooltip {
  background: var(--color-dark);
  border: 1px solid var(--color-border);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ── Button circle ── */
.whatsapp-btn {
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.whatsapp-float:hover .whatsapp-btn {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

/* ── Pulse ring animation ── */
.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: waPulse 2.4s ease-out infinite;
}

.whatsapp-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.2);
  animation: waPulse 2.4s ease-out infinite 0.6s;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0;   }
}

/* ── WhatsApp SVG icon ── */
.whatsapp-icon {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1;
  fill: #fff;
}

/* ── Unread badge ── */
.whatsapp-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  animation: badgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2s both;
}

@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Responsive — más abajo en mobile para no tapar el teclado ── */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .whatsapp-tooltip {
    display: none;
  }

  .whatsapp-btn {
    width: 54px;
    height: 54px;
  }
}
