@value (
  lightContentTextColor
) from "pageflow-scrolled/values/colors.module.css";

.wrapper {
  --overlap: 20px;
  --gutter: 8%;
  display: grid;
  grid-template-columns: 1fr 84% 1fr;
  align-items: center;
  height: 100%;
  margin: 0 auto;
  color: lightContentTextColor;
}

@media (min-width: 1000px) {
  .wide {
    --overlap: 40px;
  }
}

.customMargin {
  --gutter: max(var(--content-margin), (100% - var(--content-max-width)) / 2);
  grid-template-columns:
    var(--content-margin)
    minmax(0, var(--content-max-width))
    var(--content-margin);
  justify-content: center;
}

.clip {
  --overlap: 0px;
}

.full.clip {
  --gutter: 0px;
}

.button {
  grid-row: 1;
  z-index: 2;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.leftButton {
  composes: button;
  grid-column: 1;
}

.rightButton {
  composes: button;
  grid-column: 3;
}

.paginationIndicator {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: center;
  z-index: 3;
  margin-top: var(--theme-image-gallery-pagination-margin-top, 10px);
  margin-bottom: var(--theme-image-gallery-pagination-margin-bottom, 10px);
}

.items {
  grid-row: 1;
  grid-column: 1/-1;
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  align-items: center;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 calc(var(--overlap) + var(--gutter));
  scrollbar-width: none;
}

.clip .items {
  clip-path: content-box;
}

.items::-webkit-scrollbar {
  display: none;
}

.item {
  scroll-snap-stop: always;
  scroll-snap-align: center;
  margin: 0 calc(-1 * var(--overlap));
}

.current {
  z-index: 1
}

.figure {
  transition: transform .2s ease, filter .2s linear;
  transform: scale(var(--theme-image-gallery-item-scale, 0.9));
  filter: brightness(0.5);
}

.current .figure {
  transform: scale(1);
  filter: none;
}

.placeholder {
  opacity: 0.2;
}
