/* .modal-open      - body class for killing the scroll */
/* .modal           - container to scroll within */
/* .modal-dialog    - positioning shell for the actual modal */
/* .modal-content   - actual modal w/ bg and corners and stuff */

/* Container that the modal scrolls within */
.modal {
  position: fixed;
  top: 10%;
  left: 0;
  z-index: 1050; /* Replace $zindex-modal with 1050 */
  display: none;
  width: 100%;
  height: 65vh;
  outline: 0;
}

.modal .row {
    --bs-gutter-x: 0;
}

/* Shell div to position the modal with bottom padding */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto; /* Replace $modal-dialog-margin with 1.75rem auto */
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out; /* Replace $modal-transition with transform 0.3s ease-out */
  transform: translate(0, -25%); /* Replace $modal-fade-transform with translate(0, -25%) */
}

.modal.show .modal-dialog {
  transform: translate(0, 0); /* Replace $modal-show-transform with translate(0, 0) */
}

.modal.modal-static .modal-dialog {
  transform: scale(1.02); /* Replace $modal-scale-transform with scale(1.02) */
}

.modal-dialog-scrollable {
  height: calc(100% - 3.5rem * 2); /* Replace $modal-dialog-margin with 3.5rem */

  .modal-content {
    max-height: 100%;
    overflow: hidden;
  }

  .modal-body {
    overflow-y: auto;
  }
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem * 2); /* Replace $modal-dialog-margin with 3.5rem */
}

/* Actual modal */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  color: #212529; /* Replace $modal-content-color with #212529 */
  background-color: #fff; /* Replace $modal-content-bg with #fff */
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2); /* Replace $modal-content-border-width and $modal-content-border-color */
  border-radius: 0.3rem; /* Replace $modal-content-border-radius with 0.3rem */
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); /* Replace $modal-content-box-shadow-xs with 0 3px 9px rgba(0, 0, 0, 0.5) */
  outline: 0;
}

/* Modal background */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040; /* Replace $zindex-modal-backdrop with 1040 */
  width: 100vw;
  height: 100vh;
  background-color: #000; /* Replace $modal-backdrop-bg with #000 */
  opacity: 0.5; /* Replace $modal-backdrop-opacity with 0.5 */
}

/* Modal header */
.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem; /* Replace $modal-header-padding with 1rem */
  border-bottom: 1px solid #dee2e6; /* Replace $modal-header-border-width and $modal-header-border-color */
  border-top-left-radius: 0.3rem; /* Replace $modal-content-inner-border-radius with 0.3rem */
  border-top-right-radius: 0.3rem; /* Replace $modal-content-inner-border-radius with 0.3rem */
}

.modal-header .btn-close {
  padding: 0.5rem 0.5rem; /* Replace $modal-header-padding-y and $modal-header-padding-x with 0.5rem */
  margin: -0.5rem -0.5rem -0.5rem auto; /* Replace $modal-header-padding-y and $modal-header-padding-x with -0.5rem */
}

/* Title text within header */
.modal-title {
  margin-bottom: 0;
  line-height: 1.5; /* Replace $modal-title-line-height with 1.5 */
}

/* Modal body */
.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem; /* Replace $modal-inner-padding with 1rem */
}

/* Footer (for actions) */
.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem; /* Replace $modal-inner-padding and $modal-footer-margin-between with 0.75rem */
  border-top: 1px solid #dee2e6; /* Replace $modal-footer-border-width and $modal-footer-border-color */
  border-bottom-left-radius: 0.3rem; /* Replace $modal-content-inner-border-radius with 0.3rem */
  border-bottom-right-radius: 0.3rem; /* Replace $modal-content-inner-border-radius with 0.3rem */
}

.modal-footer > * {
  margin: 0.375rem; /* Replace $modal-footer-margin-between with 0.375rem */
}

/* Scale up the modal */
@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px; /* Replace $modal-md with 500px */
    margin: 1.75rem auto; /* Replace $modal-dialog-margin-y-sm-up with 1.75rem auto */
  }

  .modal-dialog-scrollable {
    height: calc(100% - 1.75rem * 2); /* Replace $modal-dialog-margin-y-sm-up with 1.75rem */
  }

  .modal-dialog-centered {
    min-height: calc(100% - 1.75rem * 2); /* Replace $modal-dialog-margin-y-sm-up with 1.75rem */
  }

  .modal-content {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Replace $modal-content-box-shadow-sm-up with 0 5px 15px rgba(0, 0, 0, 0.5) */
  }

  .modal-sm {
    max-width: 300px; /* Replace $modal-sm with 300px */
  }
}

@media (min-width: 992px) {
  .modal-lg,
  .modal-xl {
    max-width: 96vw; /* Replace $modal-lg with 800px */
  }
}

@media (min-width: 1200px) {
  .modal-xl {
    max-width: 96vw; /* Replace $modal-xl with 1140px */
  }
}

/* Modal fullscreen */
@media (max-width: 575.98px) {
  .modal-fullscreen-down {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .modal-fullscreen-down .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen-down .modal-header {
    border-radius: 0;
  }

  .modal-fullscreen-down .modal-body {
    overflow-y: auto;
  }

  .modal-fullscreen-down .modal-footer {
    border-radius: 0;
  }
}

@media (max-width: 767.98px) {
  .modal-fullscreen-md-down {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .modal-fullscreen-md-down .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen-md-down .modal-header {
    border-radius: 0;
  }

  .modal-fullscreen-md-down .modal-body {
    overflow-y: auto;
  }

  .modal-fullscreen-md-down .modal-footer {
    border-radius: 0;
  }
}

@media (max-width: 991.98px) {
  .modal-fullscreen-lg-down {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .modal-fullscreen-lg-down .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen-lg-down .modal-header {
    border-radius: 0;
  }

  .modal-fullscreen-lg-down .modal-body {
    overflow-y: auto;
  }

  .modal-fullscreen-lg-down .modal-footer {
    border-radius: 0;
  }
}

@media (max-width: 1199.98px) {
  .modal-fullscreen-xl-down {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .modal-fullscreen-xl-down .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen-xl-down .modal-header {
    border-radius: 0;
  }

  .modal-fullscreen-xl-down .modal-body {
    overflow-y: auto;
  }

  .modal-fullscreen-xl-down .modal-footer {
    border-radius: 0;
  }
}
