@import "mixins/mixins";
@import "common/var";

@include b(notify) {
  display: flex;
  width: $notify-width;
  padding: $notify-padding;
  border-radius: $notify-radius;
  box-sizing: border-box;
  border: 1px solid $notify-border-color;
  position: fixed;
  background-color: $notify-bg;
  box-shadow: $notify-shadow;
  transition: opacity .2s, transform .2s, left .2s, right .2s, top .2s, bottom .2s;
  overflow-wrap: anywhere;
  overflow: hidden;
  z-index: 9999;

  &.right {
    right: 16px;
  }
  &.left {
    left: 16px;
  }

  @include e(group) {
    margin-left: $notify-group-margin-left;
    margin-right: $notify-group-margin-right;
  }

  @include e(title) {
    font-weight: bold;
    font-size: $notify-title-font-size;
    line-height: $notify-icon-size;
    color: $notify-title-color;
    margin: 0;
  }
  @include e(content) {
    line-height: $notify-icon-size;
    margin: 6px 0 0 0;
    color: $notify-content-color;
    text-align: justify;
    p {
      line-height: $notify-icon-size;
      font-size: $notify-content-font-size;
      margin: 0;
    }
  }

  @include e(icon) {
    height: $notify-icon-size;
    width: $notify-icon-size;
    font-size: $notify-icon-size;
  }

  @include e(closeBtn) {
    position: absolute;
    top: 18px;
    right: 15px;
    cursor: pointer;
    color: $notify-close-color;
    font-size: $notify-close-font-size;
    &:hover {
      color: $notify-close-hover-color;
    }
  }

  .#{$namespace}-icon-success {
    color: $notify-success-icon-color;
  }

  .#{$namespace}-icon-error {
    color: $notify-danger-icon-color;
  }

  .#{$namespace}-icon-prompt {
    color: $notify-info-icon-color;
  }

  .#{$namespace}-icon-warning {
    color: $notify-warning-icon-color;
  }
}


.#{$namespace}-notify-fade-enter-from {
  &.right {
    right: 0;
    transform: translateX(100%);
  }

  &.left {
    left: 0;
    transform: translateX(-100%);
  }
}

.#{$namespace}-notify-fade-leave-to {
  opacity: 0;
}
