@import "../../../styles/assets/motion.scss";
@import "../../../styles/assets/constant.scss";
$success: #5bc42a;
$error: #ef3232;
$warning: #ffa903;

@mixin mes-style($color) {
  border-left: 3px solid $color;

  .notice-icon {
    fill: $color;
  }
}

.notice-group {
  position: absolute;
  right: 20px;
  top: 40px;
  z-index: 999;
}

.message-group {
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  z-index: 999;
  text-align: center;

  .loading-circle {
    vertical-align: top;
  }
}

.notice {
  width: 300px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  pointer-events: none;
  padding: 10px 15px;
  line-height: 20px;
  word-break: break-all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  color: $font-color-normal;
  font-size: 14px;
  min-height: 60px;

  &.success {
    @include mes-style($success);
  }

  &.error {
    @include mes-style($error);
  }

  &.warning {
    @include mes-style($warning);
  }

  .loading-wrapper {
    width: auto;
    margin: 0;
  }

  .loading-circle {
    margin-right: 10px;
    font-size: 20px;
  }
}

.notice-icon {
  flex: 0 0 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: top;
}

.item-enter {
  opacity: 0;
  max-height: 0;
  height: 0;
  transform: translateX(150px);
}
.item-enter-active {
  opacity: 1;
  max-height: 1000px;
  height: auto;
  transform: translateX(0px);
  transition: all 0.3s linear;
}
.item-exit {
  opacity: 1;
  transform: translateX(0px);
}
.item-exit-active {
  opacity: 0;
  transform: translateX(150px);
  transition: all 0.5s linear;
}
