/* =========================================================
   GM ZERBINI — WHATSAPP FLOATING BUTTON
   ========================================================= */


/* ---------------------------------------------------------
   PULSANTE
   --------------------------------------------------------- */

.whatsapp-float {
  position: fixed;

  right: 24px;
  bottom: 24px;

  width: 54px;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  background: #25d366;

  border: none;
  border-radius: 50%;

  text-decoration: none;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.08);

  z-index: 9999;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}


/* ---------------------------------------------------------
   HOVER
   --------------------------------------------------------- */

.whatsapp-float:hover {
  background: #20bd5a;

  transform: translateY(-2px);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 3px 8px rgba(0, 0, 0, 0.10);
}


/* ---------------------------------------------------------
   CLICK
   --------------------------------------------------------- */

.whatsapp-float:active {
  transform: scale(0.96);
}


/* ---------------------------------------------------------
   ICONA WHATSAPP
   --------------------------------------------------------- */

.whatsapp-float__icon {
  width: 27px;
  height: 27px;

  display: block;

  flex-shrink: 0;
}


/* Se utilizzi SVG direttamente nell'HTML */

.whatsapp-float__icon svg,
.whatsapp-float svg {
  width: 27px;
  height: 27px;

  display: block;

  fill: #ffffff;
}


/* ---------------------------------------------------------
   NASCONDI EVENTUALI TESTI DELLA VECCHIA VERSIONE
   --------------------------------------------------------- */

.whatsapp-float__text,
.whatsapp-float__label,
.whatsapp-float span:not(.whatsapp-float__icon) {
  display: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .whatsapp-float {
    right: 20px;
    bottom: 20px;

    width: 52px;
    height: 52px;
  }

  .whatsapp-float__icon,
  .whatsapp-float__icon svg,
  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .whatsapp-float {
    right: 16px;
    bottom: 16px;

    width: 52px;
    height: 52px;

    border-radius: 50%;

    box-shadow:
      0 7px 20px rgba(0, 0, 0, 0.15),
      0 2px 5px rgba(0, 0, 0, 0.07);
  }

  .whatsapp-float__icon,
  .whatsapp-float__icon svg,
  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

}


/* =========================================================
   MOBILE PICCOLO
   ========================================================= */

@media (max-width: 420px) {

  .whatsapp-float {
    right: 14px;
    bottom: 14px;

    width: 50px;
    height: 50px;
  }

  .whatsapp-float__icon,
  .whatsapp-float__icon svg,
  .whatsapp-float svg {
    width: 25px;
    height: 25px;
  }

}


/* =========================================================
   ACCESSIBILITÀ
   ========================================================= */

.whatsapp-float:focus-visible {
  outline: 3px solid rgba(7, 73, 132, 0.35);
  outline-offset: 4px;
}


/* =========================================================
   RIDUZIONE ANIMAZIONI
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .whatsapp-float {
    transition: none;
  }

}