[data-swal2-theme='bootstrap-5'],
[data-swal2-theme='bootstrap-5-light'],
[data-swal2-theme='bootstrap-5-dark'] {
  /* BACKDROP */
  --swal2-backdrop: rgba(0, 0, 0, 0.5);
  --swal2-backdrop-transition: opacity 0.15s linear;

  /* POPUP */
  --swal2-width: 32rem;
  --swal2-padding: 1.5rem;
  --swal2-border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.175));
  --swal2-border-radius: 0.5rem;
  --swal2-background: #fff;
  --swal2-color: #212529;

  /* ANIMATIONS */
  --swal2-show-animation: bootstrap-5-fade-in 0.15s ease-out;
  --swal2-hide-animation: bootstrap-5-fade-out 0.15s ease-in forwards;

  /* TITLE */
  --swal2-title-padding: 0 0 1rem;

  /* HTML CONTAINER */
  --swal2-html-container-padding: 0 0 1rem;

  /* INPUT */
  --swal2-input-border: 1px solid #dee2e6;
  --swal2-input-border-radius: 0.375rem;
  --swal2-input-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  --swal2-input-background: #fff;
  --swal2-input-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

  /* INPUT:HOVER */
  --swal2-input-hover-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);

  /* INPUT:FOCUS */
  --swal2-input-focus-border: 1px solid #86b7fe;
  --swal2-input-focus-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(13, 110, 253, 0.25);

  /* PROGRESS STEPS */
  --swal2-progress-step-background: #0d6efd;

  /* VALIDATION MESSAGE */
  --swal2-validation-message-background: #f8d7da;
  --swal2-validation-message-color: #842029;

  /* FOOTER */
  --swal2-footer-border-color: #dee2e6;
  --swal2-footer-background: #f8f9fa;
  --swal2-footer-color: #6c757d;

  /* CLOSE BUTTON */
  --swal2-close-button-color: #000;
  --swal2-close-button-transition: color 0.15s ease-in-out, opacity 0.15s ease-in-out;

  /* ACTIONS */
  --swal2-actions-justify-content: flex-end;
  --swal2-actions-margin: 1rem -0.25rem 0;
  --swal2-actions-padding: 0;

  /* COMMON VARIABLES FOR ALL ACTION BUTTONS */
  --swal2-action-button-transition:
    color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  --swal2-action-button-hover: rgba(0, 0, 0, 0.075);
  --swal2-action-button-active: rgba(0, 0, 0, 0.125);
  --swal2-action-button-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);

  /* CONFIRM BUTTON */
  --swal2-confirm-button-border-radius: 0.375rem;
  --swal2-confirm-button-background-color: #0d6efd;
  --swal2-confirm-button-color: #fff;
  --swal2-confirm-button-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);

  /* DENY BUTTON */
  --swal2-deny-button-border-radius: 0.375rem;
  --swal2-deny-button-background-color: #dc3545;
  --swal2-deny-button-color: #fff;
  --swal2-deny-button-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);

  /* CANCEL BUTTON */
  --swal2-cancel-button-border-radius: 0.375rem;
  --swal2-cancel-button-background-color: #6c757d;
  --swal2-cancel-button-color: #fff;
  --swal2-cancel-button-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);

  /* TOASTS */
  --swal2-toast-border: 1px solid rgba(0, 0, 0, 0.175);
  --swal2-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  [data-swal2-theme='bootstrap-5'] {
    /* POPUP */
    --swal2-background: #212529;
    --swal2-color: #fff;
    --swal2-border: 1px solid #495057;

    /* INPUT */
    --swal2-input-background: #2b3035;
    --swal2-input-border: 1px solid #495057;
    --swal2-input-focus-border: 1px solid #86b7fe;
    --swal2-input-focus-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(13, 110, 253, 0.25);

    /* VALIDATION MESSAGE */
    --swal2-validation-message-background: #2c0b0e;
    --swal2-validation-message-color: #ea868f;

    /* FOOTER */
    --swal2-footer-border-color: #495057;
    --swal2-footer-background: #343a40;
    --swal2-footer-color: #adb5bd;

    /* CLOSE BUTTON */
    --swal2-close-button-color: #fff;

    /* TOASTS */
    --swal2-toast-border: 1px solid #495057;
  }
}

[data-swal2-theme='bootstrap-5-dark'] {
  /* POPUP */
  --swal2-background: #212529;
  --swal2-color: #fff;
  --swal2-border: 1px solid #495057;

  /* INPUT */
  --swal2-input-background: #2b3035;
  --swal2-input-border: 1px solid #495057;
  --swal2-input-focus-border: 1px solid #86b7fe;
  --swal2-input-focus-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(13, 110, 253, 0.25);

  /* VALIDATION MESSAGE */
  --swal2-validation-message-background: #2c0b0e;
  --swal2-validation-message-color: #ea868f;

  /* FOOTER */
  --swal2-footer-border-color: #495057;
  --swal2-footer-background: #343a40;
  --swal2-footer-color: #adb5bd;

  /* CLOSE BUTTON */
  --swal2-close-button-color: #fff;

  /* TOASTS */
  --swal2-toast-border: 1px solid #495057;
}

/* Bootstrap 5 Modal Animations */
@keyframes bootstrap-5-fade-in {
  0% {
    transform: translate3d(0, -50px, 0) scale(0.9);
    opacity: 0;
  }

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

@keyframes bootstrap-5-fade-out {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate3d(0, -50px, 0) scale(0.9);
    opacity: 0;
  }
}
