.toast {
  // Prevents from shrinking in IE11, when in a flex container
  // See https://github.com/twbs/bootstrap/issues/28341
  flex-basis: $toast-max-width;
  max-width: $toast-max-width;
  @include font-size($toast-font-size);
  color: $toast-color;
  background-color: $toast-background-color;
  background-clip: padding-box;
  box-shadow: $toast-box-shadow;
  opacity: 0;
  border-radius: $btn-border-radius;

  position: relative;

  .theme-dark & {
    color: $dm-toast-color;
    background-color: $dm-toast-background-color;
  }

  &:not(:last-child) {
    margin-bottom: $toast-padding-x;
  }

  &.showing {
    opacity: 1;
  }

  &.show {
    display: block;
    opacity: 1;
  }

  &.hide {
    display: none;
  }

  .close {
    color: $toast-color;

    .theme-dark & {color: $dm-toast-color;}
  }
}

.toast-header {
  display: flex;
  align-items: center;
  padding: $toast-padding-y $toast-padding-x;
  color: $toast-header-color;
  @include border-top-radius(subtract($toast-border-radius, $toast-border-width));

  .theme-dark & {color: $dm-toast-header-color;}
}

.toast-body {
  padding: $toast-padding-x; // apply to both vertical and horizontal
}
