.lightbox {
  background-color: rgba(0,0,0,0.5);
  margin: 0;
  border: 0; 
  width: 100%;
  height: 100%;
  z-index: 1;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  display: none;
  transition: opacity 0.25s linear;
  opacity: 0;
}

.lightbox_content {
  display:flex;
  flex-direction: column;
  justify-content:center;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  height: 100%;
  width: 100%;
  margin: 0;
  transition: opacity 0.25s ease;
  opacity: 1;
}

.photo_div,
.video_div { 
  height: auto;
  width: auto;
 display: inline-block;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 5px 5px 20px rgba(0,0,0,0.3);
  max-height: 100%;
  background-color: #FFFFFF;
  transition: opacity 0.25s ease;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.photo_div.show,
.video_div.show {
  opacity: 1;
}

.video_div {
  filter: none;
  background-color: transparent;
}

#photo,
#video {
margin:0;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

#photo {
  filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.3));
}

.caption {
  box-shadow: 5px 5px 20px rgba(0,0,0,0.3);
 display: inline-block;
  box-sizing: border-box;
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
  background-color: rgba(0,0,0,0.5);
  border-radius: 10px;
  padding: 0.5em 0;
  text-align: center;
  transition: opacity 0.25s ease;
  opacity: 1;
}

#caption_content {
  opacity:1;
  transition: opacity 0.25s ease;
}

.prev, .next, .close, .full {
  cursor: pointer;
  position: absolute;
  padding: 16px;
  color: white;
  font-weight: bold;
  transition: 0.25s ease;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.2);
}

.close {
  top: 20px;
  right: 20px;
  border-radius: 5px;
  font-size: 40px;
  padding:5px 15px;
}

.full {
  bottom: 20px;
  right: 20px;
  border-radius: 5px;
  font-size: 30px;
}

.prev {
  font-size: 20px;
  top: 50%;
  margin-top: -30px;
  left: 0;
  border-radius: 0 5px 5px 0;
}

.next {
  font-size: 20px;
  top: 50%;
  margin-top: -30px;
  right: 0;
  border-radius: 5px 0 0 5px;
}

.prev:hover, .next:hover, .close:hover, .full:hover {
  background-color: rgba(0, 0, 0, 0.5);
}