// Alerts
.#{$alert-prefix-cls}{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: $alert-height;
  padding: .1rem $alert-padding-x;
  margin-bottom: $alert-margin-bottom;
  font-size: $alert-font-size;
  color: $gray-10;
  background: $alert-bg;
  line-height: 0.48rem;

  &__inner {
    background: #fff;
  }

  &__icon {
    font-size: $alert-icon-font-size;
  }

  &__content {
    padding: 0 $alert-content-cmcc-padding-x;
    font-size: inherit;
    color: inherit;
  }

  &__operation{
    flex: 1;
    font-size: $alert-close-font-size;
    color: $brand-primary;
    text-align: right;
    i{
      font-size: $alert-close-icon-font-size;
      color: $gray-11;
    }
  }

  .text-right .text-primary {
    position: relative;
    z-index: 1002;
  }


  // Alternate styles
  //
  // Generate contextual modifier classes for colorizing the alert.
  &--success {
    &::before {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      width: 100%;
      height: 100%;
      content: "";
      background: $alert-success-bg;
    }
    .#{$alert-prefix-cls}__icon {
      color: $brand-success;
    }
  }

  &--info {
    background: $alert-info-bg;

    .#{$alert-prefix-cls}__icon {
      color: $brand-info;
    }
  }

  &--warning {
    background: $alert-warning-bg;

    .#{$alert-prefix-cls}__icon {
      color: $brand-warning;
    }
  }

  &--danger {
    background: $alert-danger-bg;

    .#{$alert-prefix-cls}__icon {
      color: $brand-danger;
    }
  }

  &--fixed {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: $fixed-zindex;
    visibility: visible;
    opacity: 1;
    transition: all $transition-time;
  }

  &--hidden {
    top: -50%;
    visibility: hidden;
    opacity: 0;
  }
}
