/* ==========================================================================
   COMPONENTE: BOTÓN FLOTANTE DE WHATSAPP
   Construcciones JGP2410 C.A.
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  bottom: clamp(16px, 3vw, 24px);
  right: clamp(16px, 3vw, 24px);
  z-index: var(--z-floating);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  padding: 12px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: var(--color-whatsapp-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:focus-visible {
  outline: 3px solid var(--color-deep-blue);
  outline-offset: 3px;
}

.whatsapp-float:active {
  transform: translateY(0);
}

.whatsapp-float__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: currentColor;
}

.whatsapp-float__label {
  display: none;
}

/* En pantallas de tablet y desktop se muestra la pastilla con texto */
@media (min-width: 640px) {
  .whatsapp-float__label {
    display: inline;
  }
}

/* En móviles pequeños se compacta a botón circular táctil (52x52 px) para no tapar contenido */
@media (max-width: 639px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .whatsapp-float__icon {
    width: 28px;
    height: 28px;
  }
}

