/* .modal-open - body class for killing the scroll */
.modal-open {
  /* Kill the scroll on the body */
  overflow: hidden;
}

.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Container that the modal scrolls within */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050; /* You can adjust this $zindex-modal value */
  display: none;
  overflow: hidden;
  outline: 0;
}

/* Prevent Chrome on Windows from adding a focus outline */
.modal {
  /* For details, see https://github.com/twbs/bootstrap/pull/10951. */
  /* We deliberately don't use `-webkit-overflow-scrolling: touch;` due to */
  /* a gnarly iOS Safari bug. */
}

/* Shell div to position the modal with bottom padding */
.modal-dialog {
  position: relative;
  width: auto;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;  /* Example value for $modal-dialog-margin */
  pointer-events: none;
  transition: transform 0.3s ease-in-out;
}

.modal.fade .modal-dialog {
  transform: translate(0, -25%);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

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

.modal-dialog-centered::before {
  display: block;
  height: calc(100vh - (1.75rem * 2));
  content: "";
}

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

/* Modal background */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040; /* Example value for $zindex-modal-backdrop */
  background-color: rgba(0, 0, 0, 0.5); /* Example for $modal-backdrop-bg */
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 1;
}

/* Modal header */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem; /* Example for $modal-header-padding */
  border-bottom: 1px solid #ccc; /* Example for $modal-header-border-color */
}

.modal-header .close {
  padding: 1rem;
  margin: -1rem -1rem -1rem auto;
}

/* Title text within header */
.modal-title {
  margin-bottom: 0;
}

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

/* Footer (for actions) */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem; /* Example for $modal-inner-padding */
  border-top: 1px solid #ccc; /* Example for $modal-footer-border-color */
}

.modal-footer > :not(:first-child) {
  margin-left: 0.25rem;
}

.modal-footer > :not(:last-child) {
  margin-right: 0.25rem;
}

/* Measure scrollbar width for padding body during modal show/hide */
.modal-scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}

/* Scale up the modal */
@media (min-width: 576px) {
  .modal-dialog {
    max-width: 540px; /* Example for $modal-md */
    margin: 1rem auto; /* Example for $modal-dialog-margin-y-sm-up */
  }

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

  .modal-content {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Example for $modal-content-box-shadow-sm-up */
  }

  .modal-sm {
    max-width: 300px; /* Example for $modal-sm */
  }
}

@media (min-width: 992px) {
  .modal-lg {
    max-width: 800px; /* Example for $modal-lg */
  }
}
