/* WhatsApp floating button & chat popup */
.whats {
  float: left;
  position: fixed !important;
  bottom: 25px;
  z-index: 99999;
  left: 30px;
  animation: whats-slide-in 2.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

@keyframes whats-slide-in {
  0% { transform: translateZ(0) translateY(0) translateX(-600px); }
  100% { transform: translateZ(0) translateY(0) translateX(0); }
}

.timeHover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  cursor: pointer;
  animation: heartbeat 2s ease-in-out 3s infinite both;
}

.timeHover img {
  width: 60px;
  height: 60px;
  display: block;
}

@keyframes heartbeat {
  from { transform: scale(1); transform-origin: center center; animation-timing-function: ease-out; }
  10% { transform: scale(0.91); animation-timing-function: ease-in; }
  17% { transform: scale(0.98); animation-timing-function: ease-out; }
  33% { transform: scale(0.87); animation-timing-function: ease-in; }
  45% { transform: scale(1.2); animation-timing-function: ease-out; }
}

.whats-container {
  position: absolute;
  top: -400px;
  width: 330px;
  border-radius: 20px;
}

.whats-close {
  animation: scale-out-center 0.2s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

.whats-open {
  animation: scale-in-center 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes scale-in-center {
  0% { transform: translateZ(0) translateY(0) translateX(-350px); opacity: 0; }
  100% { transform: translateZ(0) translateY(0) translateX(-10px); opacity: 1; }
}

@keyframes scale-out-center {
  0% { opacity: 0.3; }
  100% { opacity: 0; transform: translateZ(0) translateY(0) translateX(-350px); }
}

.whats .status-bar {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.22);
  height: 32px;
  background: #029b9b;
  color: #fff;
  font-size: 14px;
  padding: 0 8px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: flex-end;
}

.whats #sair {
  background: #027a7a;
  margin: 4px;
  border: none;
  font-size: 16px;
  border-radius: 100%;
  color: #fff;
  position: relative;
  top: -10px;
  left: 19px;
  min-width: 30px;
  min-height: 30px;
  outline: none;
  cursor: pointer;
  line-height: 1;
}

.whats .user-bar {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.22);
  height: 55px;
  background: #027a7a;
  color: #fff;
  padding: 0 8px;
  font-size: 24px;
  position: relative;
  z-index: 1;
}

.whats .user-bar:after {
  content: "";
  display: table;
  clear: both;
}

.whats .user-bar div {
  float: left;
  transform: translateY(-50%);
  position: relative;
  top: 50%;
}

.whats .user-bar .avatar {
  margin: 0 0 0 5px;
  width: 36px;
  height: 36px;
}

.whats .user-bar .avatar img {
  border-radius: 50%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
  display: block;
  width: 100%;
  height: 36px;
  object-fit: cover;
}

.whats .user-bar .name {
  font-size: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
  margin: 0 0 0 8px;
  overflow: hidden;
  white-space: nowrap;
  width: 210px;
}

.whats .conversation {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.15);
  background: #efe7dd;
  z-index: 0;
  border-radius: 0 0 10px 10px;
  position: relative;
  padding-bottom: 10px;
}

.whats .conversation .conversation-container {
  height: calc(100% - 68px);
  box-shadow: inset 0 10px 10px -10px #000;
  overflow-x: hidden;
  padding: 10px 20px 5px;
  margin-bottom: 5px;
}

.whats .message {
  color: #000;
  clear: both;
  line-height: 18px;
  font-size: 15px;
  padding: 8px;
  position: relative;
  margin: 8px 0;
  max-width: 85%;
  word-wrap: break-word;
}

.whats .metadata {
  display: inline-block;
  float: right;
  padding: 0 0 0 7px;
  position: relative;
  bottom: -4px;
}

.whats .metadata .time {
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
  display: inline-block;
}

.whats .message.received {
  background: #fff;
  border-radius: 0 5px 5px 5px;
  float: left;
}

.whats .message.received .metadata {
  padding: 0 0 0 16px;
}

.whats .message.received:after {
  position: absolute;
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent #fff transparent transparent;
  top: 0;
  left: -10px;
}

.whats .input-msg {
  border: 0;
  padding: 10px;
  border-radius: 5px;
  font-size: 16px;
  outline: none;
  width: 73%;
  margin: 0 10px 10px;
  position: relative;
  z-index: 2;
  background: #fff;
  color: #000;
  pointer-events: auto;
}

.whats .send-msPopup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border: none;
  position: relative;
  z-index: 2;
  vertical-align: middle;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .whats {
    left: 15px;
    bottom: 15px;
  }

  .whats-container {
    width: calc(100vw - 30px);
    max-width: 330px;
  }
}
