/* Galeria */
.gallery-container {
  display: flex;
}

.gallery {
  display: flex;
  flex-direction: column;
  margin-right: 20px;
  max-height: 100%;
  overflow-y: auto;
  width: 145px;
  max-height: 500px;
}
/* .gallery {
  display: flex;
  flex-direction: column;
  margin-right: 20px;
  max-height: 500px;
  overflow-y: auto;
} */

.gallery img {
  margin-bottom: 10px;
  cursor: pointer;
  width: auto;
  border-radius: 10px;
}

.main-image-container {
  position: relative;
  /* width: 500px; */
}

@media (max-width: 768px) {
  .main-image-container {
    /* TODO: Try to see a part of next slide */

    /* TODO: Get margins from variable */
    margin-inline: -5vw;
  }
}

#main-image {
  width: 100%;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

button.prev,
button.next {
  position: absolute;
  top: 50%;
  background-color: rgba(0, 0, 0, 0.188);
  border: none;
  padding: 10px;
  cursor: pointer;
  transform: translateY(-50%);
}

button.prev {
  left: 0px;
}

button.next {
  right: 0px;
}

.selected {
  border: 1px solid black;
}

/* Styl dla kropek */
.bullets {
  text-align: center;
  margin-top: 10px;
}

.bullets .bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: gray;
  margin: 0 5px;
  cursor: pointer;
}

.bullets .bullet.active {
  background-color: black;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 9999;
}

#lightbox #overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.lightbox-content {
  position: relative;
  overflow: hidden;
}

#lightbox-image {
  max-width: 100%;
  max-height: 100%;
  position: relative;
  will-change: transform;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

#lightbox .close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #8a8a8a85;
  border: none;
  padding: 10px;
  cursor: pointer;
}

#lightbox button.prev,
#lightbox button.next {
  position: absolute;
  top: 50%;
  background-color: #8a8a8a85;
  height: 50%;
  min-width: 5%;
  border: none;
  padding: 10px;
  cursor: pointer;
  transform: translateY(-50%);
}

#lightbox button.prev {
  left: 20px;
}

#lightbox button.next {
  right: 20px;
}

@media (max-width: 768px) {
  #lightbox {
    height: 100dvh;
  }
  .gallery-container {
    flex-direction: column-reverse;
  }
  .gallery {
    display: none;
    /* TODO: Refactor JS to not show thumbnail instead of just hiding it with CSS */

    flex-direction: row;
    gap: 10px;
    width: auto;
  }
  /* .main-image-container {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  } */
  .gallery img {
    width: 100px;
    height: 100px;
  }
  #lightbox button.prev,
#lightbox button.next {
  height: 10%;
}

}