.msb-lightbox-open {
  overflow: hidden;
}

.msb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.msb-lightbox.is-active {
  display: block;
}

.msb-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.msb-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: min(1200px, calc(100vw - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 32px 0;
}

.msb-lightbox__figure {
  margin: 0;
  width: 100%;
  max-width: 960px;
}

.msb-lightbox__image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

.msb-lightbox__caption {
  margin-top: 16px;
  color: #fff;
  text-align: center;
}

.msb-lightbox__title,
.msb-lightbox__text {
  margin: 0;
}

.msb-lightbox__title:not([hidden]) {
  margin-bottom: 8px;
  font-weight: 700;
}

.msb-lightbox__text {
  color: rgba(255, 255, 255, 0.82);
}

.msb-lightbox__close,
.msb-lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.msb-lightbox__nav-icon {
  width: 30px;
  height: 30px;
  display: block;
}

.msb-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
}

.msb-lightbox__nav {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
}

@media (max-width: 767px) {
  .msb-lightbox__dialog {
    width: calc(100vw - 24px);
    gap: 8px;
    padding: 24px 0;
  }

  .msb-lightbox__figure {
    max-width: none;
  }

  .msb-lightbox__image {
    max-height: calc(100vh - 180px);
  }

  .msb-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}
