.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.fade-up-enter-active,
.fade-up-leave-active {
  transition: all 0.3s;
}

.fade-up-enter,
.fade-up-leave-to {
  transform: translateY(-40px);
  opacity: 0;
}

.btn-float {
  position: fixed;
  right: 10px;
  bottom: 10px * 2;
  display: flex;
  flex-direction: column;
  z-index: 15;
  button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 56px;
    width: 56px;
    margin-top: 0.5rem;
    border-radius: 50%;
    color: var(--white);
    border: 0;
    font-size: 25px;
    @include boxshadow-md($primary-dark);
    cursor: pointer;
    &.whatsapp {
      background: var(--whatsapp);
    }
    &.primary {
      background: var(--primary);
    }
  }
}

.v-whatsapp {
  position: fixed;
  right: 0;
  bottom: 85px;
  display: flex;
  flex-direction: column;
  z-index: 15;
  @include gradient-gen($footer-color-primary);
  border-radius: 4px;
  // display: none;
  &.active {
    display: block;
  }
  &__overlay {
    position: fixed;
    background-color: rgba(black, 0.8);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 13;
    // display: none;
    &.active {
      display: block;
    }
  }
  &::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid darken($footer-color-primary, 10);
    bottom: -8px;
    right: 28px;
    // z-index: 0;
  }
  &__head {
    @include gradient-gen(darken($footer-color-primary, 5));
    padding: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-radius: 4px 4px 0 0;
    button {
      background-color: transparent;
      color: white;
      font-size: 1.5rem;
      border: 0;
      cursor: pointer;
      border-radius: 50%;
      transition: box-shadow 0.3s ease;
      &:hover {
        box-shadow: 0 0 0 5px rgba(white, 0.2);
      }
    }
  }
  &__content {
    align-self: flex-end;
    padding: 0.6rem 0.8rem;
    margin: 1rem;
    @include gradient-gen(lighten($footer-color-primary, 10));
    color: white;
    // background-color: #dcf8c6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    i {
      font-size: 1.2rem;
      margin-left: 0.5rem;
    }
  }

  &__footer {
    display: flex;
    margin: 0 1rem;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: flex-end;
    button {
      border: 0;
      width: 48px;
      min-width: 48px;
      height: 48px;
      min-height: 48px;
      cursor: pointer;
      font-size: 1.2rem;
      margin-left: 1rem;
      color: white;
      border-radius: 50%;
      background-color: $whatsapp;
      transition: all 0.3s ease;
      &:hover {
        background-color: lighten($footer-color-primary, 4);
      }
    }
    textarea {
      font-family: $font-primary;
      font-size: 1rem;
      padding: 0.8rem 1rem;
      border-radius: 8px;
      border: thin solid transparent;
      resize: none;
      flex-grow: 1;
    }
    textarea::-webkit-scrollbar {
      width: 6px;
      background-color: #f5f5f5;
    }
    textarea::-webkit-scrollbar-thumb {
      border-radius: 8px;
      background-color: #ddd;
    }
    // padding: 1rem;
  }
}

@media (max-width: 760px) {
  .btn-float {
    button {
      bottom: 5%;
    }
  }
  .v-whatsapp {
    // left: 0;
    // max-width: 320px;
    &__content {
      margin: 1rem 1rem 1rem 3rem;
      font-size: 14px;
    }
    &__footer {
      textarea {
        font-size: 14px;
      }
    }
  }
}

@media (max-width: 480px) {
  .v-whatsapp {
    left: 0;
  }
}
