@import "../mixins/mixins";
@import "../mixins/typo";
@import "../config/variables";

@include b(notification) {
  display: flex;
  width: calc(100% - 32px);
  max-width: 400px;
  padding: $--size-base * 4 - 2 $--size-base * 4 $--size-base * 4;
  border-radius: $--border-radius;
  box-sizing: border-box;
  border: none;
  position: fixed;
  background-color: $--color-text;
  box-shadow: 0 10px 20px 0 rgba(128, 144, 160, 0.1), 0 2px 6px 0 rgba(128, 144, 160, 0.2);
  transition: opacity .3s, transform .3s, left .3s, right .3s, top 0.4s, bottom .3s;
  overflow: hidden;
  right: 16px;

  @include e(group) {
    width: 100%;
    //margin-left: $--notification-group-margin;
  }

  @include e(title) {
    font-weight: bold;
    font-size: 14px;
    line-height: 20px;
    margin: 2px 0 17px;
    letter-spacing: 0.5px;
    color: $--color-light;
    width: calc(100% - 32px);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  @include e(content) {
    @include bodyS;
    color: $--color-white;
    text-align: left;
    & a {
      color: $--color-light;
    }

    p {
      margin: 0;
    }
  }

  @include e(close) {
    position: absolute;
    top: 14px;
    right: 16px;
    cursor: pointer;
    color: $--color-white;
    font-size: 0;

    & .el-button {
      color: $--color-white;
      font-size: 24px;
    }

    &:hover {
      &,
      .el-button {
        color: $--color-light;
      }
    }
    &:active {
      &,
      .el-button {
        color: $--color-focus;
      }
    }
  }

  @include m(success) {
    @include e(title) {
      color: $--color-success;
    }
  }
  @include m(warning) {
    @include e(title) {
      color: $--color-warning;
    }
  }
  @include m(error) {
    @include e(title) {
      color: $--color-error;
    }
  }
}

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

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