$alert-success: $state-success !default;
$alert-info: $state-info !default;
$alert-danger: $state-error !default;
$alert-border-radius: null !default;
$alert-border-width: 2px !default;
$alert-color: null !default;
$alert-font-weight: $font-weight-bold !default;
$alert-padding: 1rem !default;

@mixin alert-variant($color) {
   border-color: $color;

   @if not $alert-color {
      color: $color;
   }
}

.alert {
   background-color: $white;
   border: $alert-border-width solid transparent;
   border-radius: $alert-border-radius;
   color: $alert-color;
   font-weight: $alert-font-weight;
   margin-bottom: $spacer;
   padding: $alert-padding;

   > p {
      margin-bottom: 0;
   }

   > p + p {
      margin-top: 5px;
   }

   a {
      @include underline-default;

      color: inherit;
   }
}

.alert-success {
   @include alert-variant($alert-success);
}

.alert-info {
   @include alert-variant($alert-info);
}

.alert-warning,
.alert-danger {
   @include alert-variant($alert-danger);
}

.alert-wrapper {
   padding-bottom: $spacer;

   .alert:last-child {
      margin-bottom: 0;
   }
}
