/* Full-screen photo album (lightbox.js), used on the homepage and the
   product page. */

:root {
  --lightbox-bg: rgba(235, 232, 226, 0.98);
  --lightbox-btn-bg: rgba(235, 232, 226, 0.7);
}

.ps-lightbox {
  position: fixed;
  inset: 0;
  height: 100svh;
  z-index: 110;
  display: none;
  flex-direction: column;
  background: var(--lightbox-bg);
  color: var(--text);
}

.ps-lightbox.open {
  display: flex;
}

.ps-lightbox-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.ps-lightbox-track {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ps-lightbox-track::-webkit-scrollbar {
  display: none;
}

.ps-lightbox-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 72px 20px;
  box-sizing: border-box;
  min-width: 0;
}

.ps-lightbox-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* <picture> (photos with a mobileSrc) stays out of the layout so the image
   sizes against the slide like a plain <img>. */
.ps-lightbox-slide picture {
  display: contents;
}

.ps-lightbox-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ps-lightbox-btn:hover,
.ps-lightbox-btn:focus-visible {
  border-color: var(--text);
}

.ps-lightbox-prev,
.ps-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.ps-lightbox-prev {
  left: 20px;
}

.ps-lightbox-next {
  right: 20px;
}

.ps-lightbox-btn[disabled] {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 699px) {
  .ps-lightbox-slide {
    padding: 0 12px 16px;
  }
}

/* Phones swipe the album; the arrow buttons stay but sit smaller at the edges. */
@media (max-width: 699px) {
  .ps-lightbox-prev,
  .ps-lightbox-next {
    width: 32px;
    height: 32px;
    background: var(--lightbox-btn-bg);
  }

  .ps-lightbox-prev {
    left: 8px;
  }

  .ps-lightbox-next {
    right: 8px;
  }
}

/* The model photos are shot on pure white; multiply blends that white into
   the off-white backdrop so they don't glare. Photos with real backgrounds
   (and the size chart) stay as shot. */
.ps-lightbox-slide img {
  mix-blend-mode: multiply;
}

.ps-lightbox-slide img.is-scene {
  mix-blend-mode: normal;
}
