// Toast Message
//================================================== //

.toast-container {
  max-width: 60%;
  position: fixed;
  z-index: 8000;

  &.toast-bottom-right {
    bottom: 10px;
    right: 10px;

    &.is-dragging {
      bottom: auto;
    }
  }

  &.toast-bottom-left {
    bottom: 10px;
    left: 10px;
  }

  &.toast-top-right {
    right: 10px;
    top: 10px;
  }

  &.toast-top-left {
    left: 10px;
    top: 10px;
  }

  &.is-dragging,
  &.is-draggable {
    .toast {
      &:hover {
        cursor: move;
      }
    }
  }
}

.toast {
  background-color: $toast-bg-color;
  border: 1px solid $toast-border-color;
  border-radius: 2px;
  box-shadow: $toast-shadow;
  color: $toast-text-color;
  font-size: $ids-size-font-base;
  overflow: hidden;
  padding: 0 10px;
  position: relative;
  width: auto;

  .toast-title {
    color: $toast-header-color;
    display: block;
    font-weight: $ids-number-font-weight-bold;
    margin-right: 25px;
    margin-top: 19px;
    z-index: -1;
  }

  .toast-message {
    display: block;
    margin-bottom: 19px;
    margin-top: 8px;
    padding-right: 20px;
  }

  &.audible {
    opacity: 0;
  }

  // Close Buttons on Toast Message are positioned and sized differently
  .btn-close {
    height: 20px;
    position: absolute;
    right: 3px;
    top: 9px;
    width: 20px;
    min-height: 28px;
    min-width: 28px;

    .icon {
      height: 18px;
      width: 18px;
    }
  }
}

// Toast Animation
.effect-scale {
  @include animation(animScale 0.25s);
}

.effect-scale-hide {
  @include animation(animScaleOut 0.25s);

  opacity: 0;
}

@include keyframes(animScale) {
  0% {
    @include transform(translate3d(0, 40px, 0) scale3d(0.1, 0.6, 1));

    opacity: 0;
  }

  100% {
    @include transform(translate3d(0, 0, 0) scale3d(1, 1, 1));

    opacity: 1;
  }
}

@include keyframes(animScaleOut) {
  0% {
    @include transform(translate3d(0, 0, 0) scale3d(1, 1, 1));

    opacity: 1;
  }

  100% {
    @include transform(translate3d(0, 40px, 0) scale3d(0.1, 0.6, 1));

    opacity: 0;
  }
}

.toast-progress {
  background-color: $toast-progress-color;
  bottom: 0;
  height: 3px;
  left: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

// RTL Styles
html[dir='rtl'] {
  .toast-container {
    &.toast-bottom-right {
      left: 10px;
      right: auto;
    }

    &.toast-bottom-left {
      left: auto;
      right: 10px;
    }

    &.toast-top-right {
      left: 10px;
      right: auto;
    }

    &.toast-top-left {
      left: auto;
      right: 10px;
    }
  }

  .toast {
    .toast-title {
      margin-left: 20px;
      margin-right: 0;
    }

    .toast-message {
      margin-bottom: 17px;
      padding-left: 20px;
      padding-right: 0;
    }

    .btn-close {
      left: 1px;
      right: auto;
    }
  }

  .toast-progress {
    left: auto;
    right: 0;
  }
}
