@import "mixins/mixins";
@import "common/var";

@include b(notification) {
  display: flex;
  width: 395px; /* --notification-width */
  padding: $--notification-padding;
  border-radius: $--notification-radius;
  box-sizing: border-box;
  border: none;
  position: fixed;
  background-color: $--color-white;
  // box-shadow: $--notification-shadow;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  transition: opacity .3s, transform .3s, left .3s, right .3s, top 0.4s, bottom .3s;
  overflow: hidden;

  &.right {
    right: 16px;
  }

  &.left {
    left: 16px;
  }

  @include e(group) {
    margin-left: 34px;
    margin-right: $--notification-group-margin-right;
  }

  @include e(title) {
    font-weight: 700;
    font-size: $--size-base;
    color: #666;
    margin: 0;
  }

  @include e(content) {
    font-size: $--notification-content-font-size;
    line-height: 21px;
    margin: 6px 0 0 0;
    // color: $--notification-content-color;
    color: #999;
    text-align: justify;

    p {
      margin: 0;
    }

    @include e(notice) {
      .el-icon-info{
        color: #00BBF2
      }
    }
  }

  @include e(icon) {
    height: 22px;
    width: 22px;
    font-size: 22px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  @include e(closeBtn) {
    position: absolute;
    top: 30px;
    right: 15px;
    cursor: pointer;
    color: $--notification-close-color;
    font-size: $--notification-close-font-size;

    &:hover {
      color: $--notification-close-hover-color;
    }
  }

  .el-icon-success {
    color: $--notification-success-icon-color;
  }

  .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-icon-notice {
    color: #00BBF2;
  }
}

.el-notification-fade-enter {
  &.right {
    right: 0;
    transform: translateX(100%);
  }

  &.left {
    left: 0;
    transform: translateX(-100%);
  }
}

.el-notification-fade-leave-active {
  opacity: 0;
}
