@import "mixins/mixins";
// @import "common/var";

@include b(notification) {
  display: flex;
  width: $--notification-width;
  padding: $--notification-padding $--size-3 $--notification-padding $--notification-padding;
  // border-radius: $--notification-radius;
  border-radius: $--border-radius-medium;
  box-sizing: border-box;
  border: $--border-1 solid $--color-border-3;
  position: fixed;
  background-color: $--color-white;
  // box-shadow: $--notification-shadow;
  box-shadow: $--shadow2-center;
  // transition: opacity .3s, transform .3s, left .3s, right .3s, top 0.4s, bottom .3s; // UI要求去掉动画
  transition: opacity .3s; // 不保留的话关闭通知，dom依然会存在，因为监听了动画
  overflow: hidden;

  &.right {
    right: 24px;
  }

  &.left {
    left: 24px;
  }

  @include e(group) {
    width: 100%;
  }

  @include e(title) {
    font-weight: $--font-weight-500;
    font-size: $--font-size-title-1;
    color: $--notification-title-color;
    margin: 0;
    line-height: 24px;
  }

  @include e(content) {
    font-size: $--notification-content-font-size;
    font-weight: $--font-weight-400;
    line-height: 21px;
    margin: 4px 0 0 0;
    color: $--notification-content-color;
    text-align: justify;
    padding-right: 4px;
    p {
      margin: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      -webkit-line-clamp: 5;
      display: -webkit-box;
      -webkit-box-orient: vertical;
    }
  }

  @include e(icon) {
    height: $--notification-icon-size;
    width: $--notification-icon-size;
    font-size: $--font-size-title-1;
    margin-right: $--notification-icon-margin-right;
    line-height: $--notification-icon-size;
    margin-top: 4px;
  }

  @include e(closeBtn) {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    color: $--notification-close-color;
    padding: 2px;
    font-size: $--font-size-title-1;
    font-weight: $--font-weight-400;

    &:hover {
      color: $--notification-close-color;
      background: $--color-secondary;
      // border-radius: 50%;
      border-radius: $--border-radius-circle;
    }
  }
  @include e(footer) {
    margin-top: $--notification-footer-top;
    width: 100%;
    display: flex;
    justify-content: flex-end;

    .el-button + .el-button {
      margin-left: 12px;
    }
  }

  .el-icon-success {
    color: $--notification-success-icon-color;
    // font-size:
  }

  .el-icon-error {
    color: $--notification-danger-icon-color;
  }

  .el-icon-info {
    color: $--notification-info-icon-color;
  }

  .el-icon-warning {
    color: $--notification-warning-icon-color;
  }
}
.el-notification {
  transition: all .3s ease;
}

.el-notification-fade-enter, .el-notification-fade-leave-active {
  opacity: 0;
  &.right {
    right: 0;
    transform: translateX(100%);
  }
  &.left {
    left: 0;
    transform: translateX(-100%);
  }
}
.el-notification-fade-enter-active, .el-notification-fade-leave-active {
  transition: all .3s ease;
}

