/* 1. The Modal Container (Hidden State) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999; /* Needs a high z-index */
  display: none; /* Hidden by default */
  width: 100%;
  height: 100%;
  overflow: show;
  outline: 0;
}

/* 2. The Modal Container (Shown State) */
.modal.show {
  overflow-x: hidden;
  overflow-y: auto;
}

/* 3. The Backdrop/Overlay */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040; /* Lower z-index than the modal itself */
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.5; /* Adds the grey transparency */
}

/* 4. The Dialog/Positioning Wrapper */
.modal-dialog {
  position: relative;
  max-height: 85vh;
  max-width:700px;
  width: 90%;
  margin: 2.5rem auto;
  align-items: flex-start;
  min-height: calc(100% - 50rem);
  pointer-events: none; /* Allows clicks to pass through to the content inside */
  display:flex;
}

/* 5. The Content Box (Inner styles: background, border, etc.) */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-items: center;
  margin: 0.5rem auto;
  margin-top:250px;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
  overflow-y: auto;
}

/* 6. Basic Header, Body, Footer padding */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
  overflow-y: auto;
}

.modal.fade {
  opacity: 1;
}
