.modern-whatsapp-float {
  position: fixed;
  right: clamp(0.25rem, 1vw, 0.5rem);
  bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: 3.75rem;
  height: 3.75rem;
  min-height: 0;
  padding: 0;
  border: 2px solid var(--color-white);
  border-radius: var(--radius-pill);
  color: var(--color-white);
  background: #25d366;
  box-shadow: 0 0.5rem 1.25rem rgba(18, 140, 126, 0.28);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  justify-content: center;
  overflow: hidden;
  transition: width var(--motion-standard) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.modern-whatsapp-float__label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width var(--motion-standard) ease, opacity var(--motion-fast) ease;
}

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

.modern-whatsapp-float__icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  place-items: center;
  border-radius: 50%;
  background: transparent;
}

.modern-whatsapp-float__icon svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: currentColor;
}

@media (hover: hover) and (min-width: 601px) {
  .modern-whatsapp-float:hover,
  .modern-whatsapp-float:focus-visible {
    width: min(15.5rem, calc(100vw - 2rem));
    padding: 0.55rem 1rem 0.55rem 0.55rem;
    justify-content: flex-start;
    color: var(--color-white);
    background: #128c7e;
    transform: translateY(-2px);
  }

  .modern-whatsapp-float:hover .modern-whatsapp-float__label,
  .modern-whatsapp-float:focus-visible .modern-whatsapp-float__label {
    max-width: 13.5rem;
    opacity: 1;
  }

  .modern-whatsapp-float:hover .modern-whatsapp-float__icon,
  .modern-whatsapp-float:focus-visible .modern-whatsapp-float__icon {
    background: rgba(255, 255, 255, 0.16);
  }
}

@media (max-width: 600px) {
  .modern-whatsapp-float {
    flex: 0 0 3.75rem;
  }

  .modern-whatsapp-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modern-whatsapp-float {
    transition: none;
  }

  .modern-whatsapp-float__label {
    transition: none;
  }
}
