/* Botón flotante de WhatsApp — visible en todas las páginas */

.gx-wa-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--gx-font-heading, 'Montserrat', sans-serif);
  transition: bottom .2s ease;
  /* El contenedor reserva espacio para la burbuja (aunque esté oculta/invisible),
     y sin esto ese espacio "fantasma" robaba toques/clics a elementos de otras
     tarjetas flotantes (ej. pop-up de ofertas) que caen debajo. Los hijos
     interactivos reactivan pointer-events por su cuenta. */
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .gx-wa-flotante { transition: none; }
}

.gx-wa-boton {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--gx-shadow-md, 0 6px 12px rgba(0,0,0,0.08));
  text-decoration: none;
  flex-shrink: 0;
  animation: gx-wa-pulso 2.8s ease-out infinite;
  transition: background-color .2s ease, transform .2s ease;
  pointer-events: auto;
}
.gx-wa-boton:hover,
.gx-wa-boton:focus-visible {
  background: #1ebc59;
  transform: scale(1.05);
}
.gx-wa-boton:focus-visible {
  outline: 3px solid var(--gx-primary, #003966);
  outline-offset: 3px;
}
.gx-wa-burbuja__cerrar:focus-visible {
  outline: 2px solid var(--gx-primary, #003966);
  outline-offset: 1px;
}

@keyframes gx-wa-pulso {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.55), var(--gx-shadow-md, 0 6px 12px rgba(0,0,0,0.08)); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0), var(--gx-shadow-md, 0 6px 12px rgba(0,0,0,0.08)); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), var(--gx-shadow-md, 0 6px 12px rgba(0,0,0,0.08)); }
}

.gx-wa-burbuja {
  max-width: 230px;
  background: #fff;
  color: var(--gx-primary, #003966);
  padding: 10px 30px 10px 14px;
  border-radius: var(--gx-radius-md, 12px);
  box-shadow: var(--gx-shadow-md, 0 6px 12px rgba(0,0,0,0.08));
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  position: relative;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.gx-wa-burbuja.gx-wa-burbuja--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gx-wa-burbuja__cerrar {
  position: absolute;
  top: 2px;
  right: 6px;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: var(--gx-muted, #6b7280);
  cursor: pointer;
  padding: 4px;
}
.gx-wa-burbuja__cerrar:hover { color: var(--gx-text, #1f1f1f); }

@media (max-width: 480px) {
  .gx-wa-flotante { right: 14px; bottom: 14px; }
  .gx-wa-boton { width: 52px; height: 52px; }
  .gx-wa-boton svg { width: 26px; height: 26px; }
  .gx-wa-burbuja { max-width: 190px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .gx-wa-boton { animation: none; }
  .gx-wa-burbuja { transition: none; }
}
