.whatsapp-fab {
  --whatsapp-brand: #25d366;
  --whatsapp-brand-dark: #0fb158;
  --whatsapp-border: rgba(37, 211, 102, 0.38);
  --whatsapp-right: clamp(1rem, 4vw, 1.25rem);
  --whatsapp-bottom: clamp(1rem, 4vw, 1.25rem);
  --whatsapp-offset: 0px;
  position: fixed;
  right: var(--whatsapp-right);
  bottom: calc(var(--whatsapp-bottom) + var(--whatsapp-offset));
  right: calc(var(--whatsapp-right) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--whatsapp-bottom) + var(--whatsapp-offset) + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.05rem;
  background: transparent;
  color: var(--whatsapp-brand);
  border: 1px solid var(--whatsapp-border);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.16);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  z-index: 1200;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  /* PS4 · 19.10.2026 (PageSpeed GZ-09): only the properties the compositor runs are animated (the lift and the fade).
     The colours, borders, shadow and visibility switch at once — their transitions repainted the bubble on every frame
     ("not composited": border-*-color, color, visibility). The look of every state is unchanged; dragging keeps
     transition: none (whatsapp-fab--dragging). */
  transition:
    transform 150ms ease,
    opacity 160ms ease;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus-visible,
.whatsapp-fab:active {
  background: linear-gradient(135deg, var(--whatsapp-brand), var(--whatsapp-brand-dark));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(18, 160, 82, 0.35);
}

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

.whatsapp-fab__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.whatsapp-fab__icon img {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  object-fit: contain;
  filter: saturate(1.05);
}

.whatsapp-fab:hover .whatsapp-fab__icon,
.whatsapp-fab:focus-visible .whatsapp-fab__icon,
.whatsapp-fab:active .whatsapp-fab__icon {
  background: rgba(255, 255, 255, 0.14);
}

.whatsapp-fab__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.whatsapp-fab__title {
  font-size: 0.95rem;
}

.whatsapp-fab__subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
}

.whatsapp-fab--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.whatsapp-fab--draggable {
  cursor: grab;
}

.whatsapp-fab--dragging {
  cursor: grabbing;
  transition: none !important;
  transform: none !important;
}

@media (max-width: 900px) {
  .whatsapp-fab {
    --whatsapp-right: clamp(0.9rem, 4vw, 1.1rem);
    --whatsapp-bottom: clamp(1.05rem, 4vw, 1.35rem);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  }
}

@media (max-width: 640px) {
  .whatsapp-fab {
    --whatsapp-right: clamp(0.85rem, 4vw, 1.05rem);
    padding: 0.7rem 0.9rem;
    gap: 0.5rem;
  }

  .whatsapp-fab__icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .whatsapp-fab__title {
    font-size: 0.9rem;
  }

  .whatsapp-fab__subtitle {
    display: none;
  }
}

@media (max-width: 520px) {
  .whatsapp-fab {
    --whatsapp-right: clamp(0.85rem, 5vw, 1rem);
    gap: 0;
    padding: 0.55rem;
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
  }

  .whatsapp-fab__text {
    display: none;
  }

  .whatsapp-fab__icon {
    width: 2.6rem;
    height: 2.6rem;
  }
}

/* RC7c 1.4.3, 2.4.7: own surface, dark words; the glyph is white */
.whatsapp-fab {
  background: #25d366;
  border-color: #1aa34e;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible,
.whatsapp-fab:active {
  background: #1ebe5b;
}
.whatsapp-fab:focus-visible {
  outline: 2px solid #052e16;
  outline-offset: 2px;
}
.whatsapp-fab .whatsapp-fab__title,
.whatsapp-fab .whatsapp-fab__subtitle {
  color: #052e16;
  opacity: 1;
}
.whatsapp-fab .whatsapp-fab__icon,
.whatsapp-fab:hover .whatsapp-fab__icon,
.whatsapp-fab:focus-visible .whatsapp-fab__icon,
.whatsapp-fab:active .whatsapp-fab__icon {
  background: #052e16;
}
