.#{$toast-prefix-cls} {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: $toast-zindex;
  width: auto;
  min-width: 1.2rem;
  max-width: 50%;
  padding: nth($toast-padding, 1) nth($toast-padding, 2);
  text-align: center;
  background: $white;
  border-radius: $toast-border-radius;
  box-shadow: $toast-box-shadow;
  transform: translate(-50%, -50%);
  @extend %text-truncate;

  &__text {
    font-size: $toast-text-font-size;
    color: $gray-9;
    display: block;
  }

  // 带图标
  &--with-icon {
    padding: 0 0.24rem 0.24rem;

    .#{$toast-prefix-cls}__icon {
      display: block;
      font-size: $toast-icon-font-size;
      width: 0.92rem;
      height: 0.92rem;
      margin: 0 auto;
      line-height: 0.92rem;
    }
  }

  // 成功
  &--success {
    .#{$toast-prefix-cls}__icon {
      color: $brand-success;
    }
  }

  // 失败
  &--danger {
    .#{$toast-prefix-cls}__icon {
      color: $brand-danger;
    }
  }

  // 反色
  &--inverse {
    color: $white;
    background: #fff;
    box-shadow: none;
  }

  &--dark {
    box-shadow: none;
    background: #333;
    .#{$toast-prefix-cls}__text{
      color: #fff;
    }
  }
}
