@import url(../var.less);

@notification-prefix: ~"@{prefix}notification";

.@{notification-prefix}{
  display: flex;
  width: @notification-width;
  padding: @notification-padding;
  border-radius: @notification-radius;
  box-sizing: border-box;
  border: 1px solid @notification-border-color;
  position: fixed;
  background-color: @color-white;
  box-shadow: @notification-shadow;
  transition: opacity .3s, transform .3s, left .3s, right .3s, top 0.4s, bottom .3s;
  overflow: hidden;

  &.right {
    right: 16px;
  }

  &.left {
    left: 16px;
  }

  &__group {
    margin-left: @notification-group-margin-left;
    margin-right: @notification-group-margin-right;
  }

  &__title {
    font-weight: @notification-title-font-weight;
    font-size: @notification-title-font-size;
    color: @notification-title-color;
    margin: 0;
  }

  &__content {
    font-size: @notification-content-font-size;
    line-height: 20px;
    margin: 10px 0 0 0;
    color: @notification-content-color;
    text-align: justify;

    p {
      margin: 0;
    }
  }

  &__icon {
    height: @notification-icon-size;
    width: @notification-icon-size;
    font-size: @notification-icon-size;
  }

  &__closeBtn {
    position: absolute;
    top: 18px;
    right: 15px;
    cursor: pointer;
    color: @notification-close-color;
    font-size: @notification-close-font-size;

    &:hover {
      color: @notification-close-hover-color;
    }
  }

  &__custom {
    margin-top: 10px;
  }

  .w-icon-normal {
    color: @notification-normal-icon-color;
  }

  .w-icon-success {
    color: @notification-success-icon-color;
  }

  .w-icon-error {
    color: @notification-danger-icon-color;
  }

  .w-icon-info {
    color: @notification-info-icon-color;
  }

  .w-icon-warning {
    color: @notification-warning-icon-color;
  }
}

.w-notification-fade-enter {
  &.right {
    right: 0;
    transform: translateX(100%);
  }

  &.left {
    left: 0;
    transform: translateX(-100%);
  }
}

.w-notification-fade-leave-active {
  opacity: 0;
}