@keyframes floatingWhats {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

.floating-whatsapp {
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 9999;
}

.floating-whatsapp button {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 70px;
  height: 70px;
  background-color: #25d366;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  outline: none;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1);
}

.floating-whatsapp button:hover,
.floating-whatsapp button:focus {
  background-color: #25d366;
  outline: none;
}

.floating-whatsapp button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: #25d366;
  border-radius: 50%;
  animation: .9s ease floatingWhats infinite;
}

.floating-whatsapp button img {
  width: 50%;
  filter: invert(1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.floating-whatsapp button img.send {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-180deg) scale(0);
}

.floating-whatsapp button,
.floating-whatsapp button img,
.floating-whatsapp-form-container {
  transition: 0.7s ease;
}

.floating-whatsapp-form-container {
  position: relative;
  background-image: url(./img/background_wp.png);
  background-color: antiquewhite;
  border-radius: 5px;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 2px solid #e8d7bf;

  width: 0;
  height: 0;
  opacity: 0;
}

.floating-whatsapp-form-container form {
  height: 300px;
  width: 250px;
}

.floating-whatsapp-form-container form input {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 195px;
  height: 40px;
  border: 0;
  border-radius: 40px;
  padding: 0 10px;
  outline: none;
}

.initial-message {
  position: relative;
}

.initial-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  width: 0;
  height: 0;
  border-bottom: 15px solid transparent;
  border-right: 15px solid #ffffff;
}

.initial-message span {
  display: block;
  font-size: 14px;
  line-height: 18px;
  color: #323232;
  margin: 15px;
  padding: 10px;
  width: 80%;
  background-color: #FFF;
  border-radius: 5px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* on hover */

.floating-whatsapp:hover .floating-whatsapp-form-container {
  height: 300px;
  width: 250px;
  opacity: 1;
}

.floating-whatsapp:hover button {
  width: 40px;
  height: 40px;
  bottom: 5px;
  right: 5px;
}

.floating-whatsapp:hover button::before {
  animation: none;
}

.floating-whatsapp:hover button img.whats {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg) scale(0);
}

.floating-whatsapp:hover button img.send {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1);
}


@media screen and (max-width: 768px) {
  .floating-whatsapp {
    right: 3%;
  }
}