.lightbox-gallery {
  background: #eee;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 25px 15px;
  padding: 25px 15px;
}

.lightbox-gallery > img {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  height: 200px;
  cursor: pointer;
  transition: transform 300ms;
}

.lightbox-gallery > img:hover {
  transform: scale(1.2);
}

.lightbox-gallery__modal {
  position: fixed;
  inset: 0;
  background: #000000f5;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;

  transition: opacity 300ms;

  --modal-bar-padding: 10px;
  --modal-close-btn-size: 2.3rem;
}

.lightbox-gallery__modal .lightbox-gallery__modal__close-btn,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__next-btn,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__previous-btn {
  font-family: Material Icons, serif;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: transform 300ms;
}

.lightbox-gallery__modal .lightbox-gallery__modal__close-btn:hover,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__next-btn:hover,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__previous-btn:hover {
  transform: scale(1.1);
}

.lightbox-gallery__modal .lightbox-gallery__modal__close-btn {
  position: absolute;
  top: var(--modal-bar-padding);
  right: var(--modal-bar-padding);
  font-size: var(--modal-close-btn-size);
  line-height: 1;
  font-weight: 900;
}

.lightbox-gallery__modal .lightbox-gallery__modal__container {
  position: absolute;
  inset: 9% 0;
}

.lightbox-gallery__modal
  .lightbox-gallery__modal__container
  .lightbox-gallery__modal__container__img__wrapper {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-gallery__modal
  .lightbox-gallery__modal__container
  .lightbox-gallery__modal__container__img {
  max-width: 100%;
  max-height: 100%;
  transition: opacity 300ms;
  opacity: 0;
}

.lightbox-gallery__modal
  .lightbox-gallery__modal__container
  .lightbox-gallery__modal__container__img--active {
  opacity: 1;
}

.lightbox-gallery__modal .lightbox-gallery__modal__upper-bar,
.lightbox-gallery__modal .lightbox-gallery__modal__lower-bar {
  position: absolute;
  left: 0;
  right: 0;
  background: #000;
  display: flex;
  align-items: center;
  height: calc(var(--modal-bar-padding) * 2 + var(--modal-close-btn-size));
}

.lightbox-gallery__modal .lightbox-gallery__modal__upper-bar {
  top: 0;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 500;
}

.lightbox-gallery__modal .lightbox-gallery__modal__lower-bar {
  bottom: 0;
  justify-content: space-between;
  padding: 0 15%;
}

.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__next-btn,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__previous-btn {
  font-weight: 500;
  font-size: 3rem;
  transition: color 300ms;
}

.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__next-btn.lightbox-gallery__modal__lower-bar__btn--disabled,
.lightbox-gallery__modal
  .lightbox-gallery__modal__lower-bar
  .lightbox-gallery__modal__lower-bar__previous-btn.lightbox-gallery__modal__lower-bar__btn--disabled {
  pointer-events: none;
  color: #555;
}
