#custom-lightbox {
  position: fixed;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  inset: 0;
}

.lightbox-overlay {
  position: absolute;
  width: 100vw; 
  height: 100vh;
  top: 0; left: 0;
  cursor: zoom-out;
  inset: 0;
}

.lightbox-content {
  position: relative;
  text-align: center;
  color: white;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
}

#lightbox-image {
  max-width: 94%;
  max-height: 90vh;
  display: block;
  margin: 0 auto;
  opacity: 0;
  width: auto;
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 1rem;
}

.lightbox-prev, .lightbox-next, .lightbox-close {
  position: absolute;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
  text-shadow: 1px 0px 1px #000, -1px 0px 1px #000, 0px 1px 1px #000, 0px -1px 1px #000;
}
.lightbox-prev, .lightbox-next{
  font-size: 4rem;
  padding: 0 10px;
  margin: 0;
  line-height: 2em;
}
.lightbox-prev { 
  left: calc(4% - 10px); 
  top: 50%; 
  transform: translateY(-50%); }
.lightbox-next { 
  right: calc(4% - 8px); 
  top: 50%; 
  transform: translateY(-50%); }
.lightbox-close { 
  top: 1%;
  right: 1%;
  text-shadow: 1px 0px 1px #000, -1px 0px 1px #000, 0px 1px 1px #000, 0px -1px 1px #000;
  font-size: 3rem; 
}
.lightbox-loader {
  color: white;
  font-size: 14px;
  display: none;
  position: absolute;
  z-index: 10;
  width: 100%;
  top: calc(50% - 20px);
}
.lightbox-loader::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}