.re-lightbox {
  --re-lightbox-background: rgb(15 15 17 / 96%);
  --re-lightbox-foreground: #fff;
  --re-lightbox-control: rgb(35 35 38 / 96%);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--re-lightbox-foreground);
  overscroll-behavior: contain;
  font-family: inherit;
}
.re-lightbox::backdrop {
  background: transparent;
}
.re-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--re-lightbox-background);
  pointer-events: none;
}
.re-lightbox-viewport {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  outline-offset: -4px;
}
.re-lightbox-viewport::-webkit-scrollbar {
  display: none;
}
.re-lightbox-slide {
  position: relative;
  display: grid;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}
.re-lightbox-frame {
  position: relative;
  flex: none;
  transform-origin: center;
  cursor: zoom-in;
}
.re-lightbox[data-zoomed="true"] .re-lightbox-frame {
  cursor: grab;
}
.re-lightbox[data-zoomed="true"] .re-lightbox-frame:active {
  cursor: grabbing;
}
.re-lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.re-lightbox-button {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--re-lightbox-control);
  color: inherit;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(16px);
}
.re-lightbox-button svg {
  width: 24px;
  height: 24px;
}
.re-lightbox-button:hover {
  background: rgb(58 58 62 / 98%);
}
.re-lightbox-button:disabled {
  opacity: 0.3;
  cursor: default;
}
.re-lightbox-button:focus-visible,
.re-lightbox-thumbnails button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.re-lightbox-close {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}
.re-lightbox-zoom {
  top: max(16px, env(safe-area-inset-top));
  right: calc(max(16px, env(safe-area-inset-right)) + 54px);
}
.re-lightbox-prev {
  top: calc(50% - 22px);
  left: max(16px, env(safe-area-inset-left));
}
.re-lightbox-next {
  top: calc(50% - 22px);
  right: max(16px, env(safe-area-inset-right));
}
.re-lightbox-footer {
  position: absolute;
  z-index: 2;
  right: 72px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 72px;
  display: grid;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
}
.re-lightbox-counter {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--re-lightbox-control);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(16px);
}
.re-lightbox-caption {
  max-width: 60ch;
  max-height: 20vh;
  margin: 0;
  overflow: auto;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--re-lightbox-background);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: auto;
}
.re-lightbox-caption:empty {
  display: none;
}
.re-lightbox-thumbnails {
  display: flex;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  pointer-events: auto;
}
.re-lightbox-thumbnails button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 5px;
  background: none;
  opacity: 0.6;
  cursor: pointer;
}
.re-lightbox-thumbnails button[aria-current="true"] {
  border-color: var(--re-lightbox-foreground);
  opacity: 1;
}
.re-lightbox-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.re-lightbox-error {
  position: absolute;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  text-align: center;
}
@media (max-width: 480px) {
  .re-lightbox-prev {
    left: 8px;
  }
  .re-lightbox-next {
    right: 8px;
  }
  .re-lightbox-footer {
    right: 16px;
    left: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .re-lightbox-viewport {
    scroll-behavior: auto;
  }
}
