.screenshot-item,
.product-cover-link {
  display: block;
  cursor: zoom-in;
  position: relative;
}

.product-cover-link {
  width: 100%;
  height: 100%;
}

.screenshot-item:focus-visible,
.product-cover-link:focus-visible {
  outline: 3px solid rgba(13, 110, 253, .35);
  outline-offset: 3px;
}

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

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  color: #fff;
}

.screenshot-lightbox.is-open {
  display: block;
}

.screenshot-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .9);
}

.screenshot-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 18px;
}

.screenshot-lightbox__header,
.screenshot-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screenshot-lightbox__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenshot-lightbox__counter {
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
}

.screenshot-lightbox__stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-lightbox__image {
  display: block;
  max-width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 138px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

.screenshot-lightbox__button,
.screenshot-lightbox__nav {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(15, 23, 42, .68);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.screenshot-lightbox__button:hover,
.screenshot-lightbox__button:focus,
.screenshot-lightbox__nav:hover,
.screenshot-lightbox__nav:focus {
  background: rgba(15, 23, 42, .92);
  border-color: rgba(255, 255, 255, .48);
  color: #fff;
}

.screenshot-lightbox__button:focus-visible,
.screenshot-lightbox__nav:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .32);
  outline-offset: 2px;
}

.screenshot-lightbox__button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.screenshot-lightbox__nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.screenshot-lightbox__nav--prev {
  left: 12px;
}

.screenshot-lightbox__nav--next {
  right: 12px;
}

.screenshot-lightbox__nav[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .screenshot-lightbox__dialog {
    padding: 12px;
  }

  .screenshot-lightbox__image {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 122px);
    border-radius: 6px;
  }

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