.noscroll { overflow: hidden; }

/* General lighbox styles */

.lightbox {
  display: none;
  position: fixed;
  flex-direction: column;
  box-sizing: border-box;
  user-select: none;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  padding: calc(3vw + 20px) 3vw;
}

@-webkit-keyframes lightbox-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes lightbox-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox.active {
  display: flex;
  animation-name: lightbox-fade-in;
  animation-duration: 400ms;
  animation-fill-mode: both;
  animation-iteration-count: 1;
}

.lightbox-background {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: white;
  opacity: 0.9;
}

.lightbox-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  width: 100%;
}

/* Lightbox list items */

.lightbox-list {
  position: relative;
  flex-grow: 1;
  flex-shrink: 1;
  z-index: 0;
  box-sizing: border-box;
  margin: 0 calc(3vw + 13px);
  cursor: grab;

    display: flex; /* Add display: flex to center items horizontally */
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
}

.lightbox-item {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  margin: 0;
    width: 100%;
  /* todo: figure out the transition between slides */
  /* transition: opacity 400ms cubic-bezier(0.2, 0.6, 0.3, 1); */
}

.lightbox-item[data-active="true"] {
  opacity: 1;
}

.lightbox-item-img {
  height: 100%;
  /*width: 100%;*/
  object-position: 50% 50%;
  object-fit: contain;
}

/* Lightbox controls */

.lightbox-controls {
  position: absolute;
  display: flex;
  justify-content: space-between;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 200;
}

.lightbox-controls__previous,
.lightbox-controls__next {
  width: 50%;
  display: flex;
  align-items: center;
  z-index: 200;
  pointer-events: auto;
}

.lightbox-controls__previous {
  justify-content: flex-start;
}

.lightbox-controls__next {
  justify-content: flex-end;
}

.lightbox-controls__btn {
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

.lightbox-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1.5vw 1.5vw 0;
  z-index: 200;
}

.lightbox-close {
  width: 30px;
}

/* Responsive designs */

@media (max-width: 575px) {
  .lightbox-controls {
    display: none;
  }
  .lightbox-list {
    margin: 0;
  }

  .lightbox-item[data-active="true"] {
    transition: transform 250ms cubic-bezier(0.2, 0.6, 0.3, 1),
      opacity 250ms cubic-bezier(0.2, 0.6, 0.3, 1);
  }

  .lightbox-item-title {
      font-size: 16px !important;
  }
}

.lightbox-item-container {
    position: relative;
    height: 100%;
    display: flex; /* Add display: flex to center items horizontally */
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    width: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 100%;
}

.lightbox-item-title {
    position: absolute;
    font-size: 24px;
    z-index: 200;
}
