/* ===================================================================
   Widget WhatsApp Exa Jurídico — Lead capture rápido para Meta Ads
   =================================================================== */

.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #25D366;
  color: #fff !important;
  padding: 14px 20px 14px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 4px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  border: none;
}

.wa-fab:hover,
.wa-fab:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45), 0 6px 12px rgba(0, 0, 0, 0.18);
  color: #fff !important;
  outline: none;
}

.wa-fab__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: #fff;
}

.wa-fab__label {
  white-space: nowrap;
}

.wa-fab__pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #25D366;
  animation: wa-pulse 2.4s infinite;
  pointer-events: none;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.85; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Tooltip que aparece tras 3s la primera vez */
.wa-fab__tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #1C3B5A;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.wa-fab__tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #1C3B5A;
}
.wa-fab.is-tooltip-visible .wa-fab__tooltip {
  opacity: 1;
}

/* Responsive: en móvil, ocultamos el label y dejamos solo el icono */
@media (max-width: 520px) {
  .wa-fab {
    padding: 14px;
    right: 16px;
    bottom: 16px;
  }
  .wa-fab__label {
    display: none;
  }
  .wa-fab__tooltip {
    display: none;
  }
}

/* Botón inline (CTA dentro de hero / secciones) */
.btn--whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border-color: #25D366 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}
.btn--whatsapp:hover,
.btn--whatsapp:focus-visible {
  background: #1ebe57 !important;
  border-color: #1ebe57 !important;
  color: #fff !important;
}
.btn--whatsapp svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Banner sticky superior (solo en /contacto/) */
.wa-bar {
  background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
}
.wa-bar a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 6px;
}
