/* The Modal (background) */
@keyframes fadeIn {
  from {opacity: 0}
  to {opacity: 1}
}

.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  padding-top: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(36, 36, 36, 0.6);
  animation: fadeIn 0.3s;
}

#modalImage {
  margin: auto;
  display: block;
  max-width: 95%;
  max-height: 95%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  width: auto;
  height: auto;
  min-width: 80%;  
}

.modal .close {
  color: black;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
  cursor: pointer;
  background-color: white;
}

.modal .close:hover,
.modal .close:focus {
  color: #bbb;
  text-decoration: none;
}

.clickable-image {
  cursor: pointer;
  transition: opacity 0.3s;
}

.clickable-image:hover {
  opacity: 0.8;
}

.bs-example{
  margin:auto
}

.modal img {
  display: block;
  margin: 0 auto;
  max-width: 80%;
  max-height: 80%;
}

.modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* Vertically center */
  min-width: 90%;
  position: relative;
  width: auto;
  pointer-events: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.modal-dialog iframe{
  margin: 0 auto;
  display: block;
}

.modal-content{
  width: 90% !important;
  position: relative;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: .3rem;
  outline: 0;
}

.modal-instructions {
  width: 100%;
  max-width: 500px; /* Set a maximum width for the modal */
  margin: auto;
}

.modal.fade.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal.fade .modal-dialog {
  transition: transform .3s ease-out, -webkit-transform .3s ease-out;
  transform: translate(0, -50px);
}

.fade {
  transition: opacity .15s linear;
}

.fade:not(.show) {
  opacity: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(.3rem - 1px);
  border-top-right-radius: calc(.3rem - 1px);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}


.embed-responsive {
  position: relative;
}

.youtube-error-message {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}