/* ===========================
   WHATSAPP FLOATING BUTTON
   LABRIEGO
   =========================== */

@keyframes wa-fab-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;

  display: inline-flex;
  align-items: center;

  /* Estado compacto: solo icono */
  padding: 13px;
  border-radius: 14px;
  text-decoration: none;

  /* Verde WhatsApp */
  background: #25D366;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 4px 20px rgba(37, 211, 102, 0.22),
    0 1px 4px rgba(0, 0, 0, 0.16);

  color: #ffffff;

  transition:
    padding 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.30s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.22s ease,
    box-shadow 0.22s ease;

  will-change: transform;

  /* Entrada suave tras carga de página */
  animation: wa-fab-enter 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s both;
}

.wa-fab:hover {
  padding: 13px 18px 13px 14px;
  transform: translateY(-2px);
  background: #22c55e;
  box-shadow:
    0 6px 24px rgba(37, 211, 102, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.14);
}

/* Icono SVG */
.wa-fab__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #ffffff;
}

/* Contenedor expandible — sep + label */
.wa-fab__expand {
  display: flex;
  align-items: center;
  overflow: hidden;

  /* Colapsado por defecto */
  max-width: 0;
  opacity: 0;

  transition:
    max-width 0.40s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.28s ease 0.08s;
}

.wa-fab:hover .wa-fab__expand {
  max-width: 140px;
  opacity: 1;
}

/* Separador vertical entre icono y label */
.wa-fab__sep {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.30);
  flex-shrink: 0;
  margin: 0 11px;
}

/* Label de texto */
.wa-fab__label {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.90);
  white-space: nowrap;
}

/* ── Mobile: solo icono (hover no funciona en touch) ── */
@media (max-width: 768px) {
  .wa-fab {
    bottom: 20px;
    right: 20px;
    padding: 12px;
    border-radius: 12px;
  }

  .wa-fab__icon {
    width: 19px;
    height: 19px;
  }

  .wa-fab__expand {
    display: none;
  }
}

/* Sin animaciones para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
  .wa-fab {
    animation: none;
    transition: none;
  }

  .wa-fab__expand {
    transition: none;
  }
}
