// Alerts
.#{$alert-prefix-cls}{
  display: flex;
  align-items: center;
  justify-content: center;
  height: $alert-height;
  padding: 0 $alert-padding-x;
  margin-bottom: $alert-margin-bottom;
  font-size: $alert-font-size;
  color: $gray-10;
  background: $alert-bg;

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

  &__content {
    padding: 0 $alert-content-padding-x;
    font-size: inherit;
    color: inherit;
    @extend %text-truncate;
  }

  &__operation{
    flex: 1;
    width: 100%;
    font-size: $alert-close-font-size;
    color: $brand-primary;
    text-align: right;
    white-space: nowrap;
    @extend %text-truncate;
    i{
      font-size: $alert-close-icon-font-size;
      color: $gray-11;
    }
  }


  // Alternate styles
  //
  // Generate contextual modifier classes for colorizing the alert.
  &--success {
    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;
  }
}
