/***************************************
* WHATSAPP BUTTON
***************************************/

.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;

  z-index: 1;

  &:hover .whatsapp-button__text-wrapper {
    opacity: 1;
    transform: scaleX(1);
  }
}

.whatsapp-button__link {
  position: relative;
  display: block;

  border-radius: 50%;

  z-index: 1;

  &::before {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background: green;
    border-radius: 50%;
    z-index: -1;
    -webkit-animation: whatsapp-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
    animation: whatsapp-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  }
}

.whatsapp-button__icon {
  display: block;
  width: 50px;
  height: 50px;
  background: var(--color-primary-800);
  border-radius: 50%;
  padding: 5px;
}

.whatsapp-button__text-wrapper {
  position: absolute;
  top: 5px;
  right: 0.5rem;

  width: max-content;
  padding: 0.5rem 3.125rem 0.5rem 1rem;

  color: #fff;
  font-size: inherit;
  font-style: italic;
  font-weight: 600;

  background: #0a6e3e;
  border-radius: 30rem;
  border: 1px solid #ffffff;

  pointer-events: none;

  z-index: 0;

  transition: 350ms;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
}

@keyframes whatsapp-ping {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  80% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}
