@import "ngx-toastr/toastr";

@import "bootstrap/scss/_variables.scss";

.toast-container {
  .toast-close-button {
    font-size: 18px;
    margin-right: 4px;
  }

  .ngx-toastr {
    align-items: center;
    background-image: none !important;
    border-radius: $border-radius;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    display: flex;
    padding: 15px;

    .toast-close-button {
      position: absolute;
      right: 5px;
      top: 0;
    }

    &:hover {
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    }

    .icon i::before {
      float: left;
      font-style: normal;
      font-family: $icomoon-font-family;
      font-size: 25px;
      line-height: 20px;
      padding-right: 15px;
    }

    .toast-message {
      p {
        margin-bottom: 0.5rem;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    &.toast-danger,
    &.toast-error {
      background-color: $danger;

      .icon i::before {
        content: map_get($icons, "error");
      }
    }

    &.toast-warning {
      background-color: $warning;

      .icon i::before {
        content: map_get($icons, "exclamation-triangle");
      }
    }

    &.toast-info {
      background-color: $info;

      .icon i:before {
        content: map_get($icons, "info-circle");
      }
    }

    &.toast-success {
      background-color: $success;

      .icon i:before {
        content: map_get($icons, "check");
      }
    }
  }
}

@keyframes modalshow {
  0% {
    opacity: 0;
    transform: translate(0, -25%);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes backdropshow {
  0% {
    opacity: 0;
  }

  100% {
    opacity: $modal-backdrop-opacity;
  }
}

.modal {
  display: block !important;
  opacity: 1 !important;
}

.modal-dialog {
  .modal.fade & {
    transform: initial !important;
    animation: modalshow 0.3s ease-in;
  }
  .modal.show & {
    transform: initial !important;
  }
  transform: translate(0, 0);
}

.modal-backdrop {
  &.fade {
    animation: backdropshow 0.1s ease-in;
  }
  opacity: $modal-backdrop-opacity !important;
}
