/**
 * Lightbox v2 + marquee: solo estilos usados por template-parts/V2-marquee-auto-change-on-scroll-lightbox.php
 */

/* Clon del vuelo open (capa visual; la foto real del marquee no se mueve). */
.v2-lb__fly-clone {
	pointer-events: none;
}

/* Triggers dentro del marquee (no usamos clases gallery-grid de referencia). */
.section-marquee-auto-change-on-scroll [data-lightbox="trigger"] {
	outline-offset: -1px;
	background-color: transparent;
	border: 0;
  border-radius: 0;
	outline: 1px #131313;
	width: 100%;
	height: 100%;
	padding: 0;
	display: block;
	cursor: zoom-in;
	-webkit-appearance: none;
	appearance: none;
}

.section-marquee-auto-change-on-scroll [data-lightbox="trigger"]:focus-visible {
	outline-offset: 3px;
  border-radius: 0;
}

.section-marquee-auto-change-on-scroll [data-lightbox="trigger"] img {
	display: block;
	width: 100%;
	height: auto;
	height: 100%; /* With aspect-ratio defined*/
}

.lightbox-wrap {
	z-index: 1001;
	flex-direction: column;
	justify-content: flex-start;
	align-items: stretch;
	width: 100%;
	height: 100dvh;
	display: none;
	position: fixed;
	inset: 0;
	background: transparent;
}

.lightbox-wrap.is-active {
	display: flex;
}

body:has(.lightbox-wrap.is-active) {
	overflow: hidden;
}

/* Capa glass (blur + tinte desde style.css .glass-panel); la opacidad la anima GSAP */
.lightbox-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0;
	will-change: opacity;
}

.lightbox-inner {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
	align-self: stretch;
}

.lightbox-img__wrap {
	width: 90vw;
	height: calc(100svh - 10em);
}

.lightbox-img__list {
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	display: flex;
	position: relative;
}

.lightbox-img__item {
	visibility: hidden;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	display: flex;
	position: absolute;
}

.lightbox-img__item.is-active {
	visibility: visible;
}

.lightbox-img,
.lightbox-img__item img {
	object-fit: contain;
	object-position: center;
	box-sizing: border-box;
	height: 100%;
	width: auto;
	max-width: 100%;
	max-height: 100%;
}

.lightbox-nav {
	z-index: 2;
	color: var(--color-secondary);
	justify-content: space-between;
	align-items: center;
	display: flex;
	position: absolute;
	bottom: 2em;
	left: 2em;
	right: 2em;
}

.lightbox-nav__col {
	width: 33.333%;
}

.lightbox-nav__col.start {
	justify-content: flex-start;
	align-items: center;
	display: flex;
}

.lightbox-nav__col.center {
	grid-column-gap: 2em;
	grid-row-gap: 2em;
	justify-content: center;
	align-items: center;
	display: flex;
}

.lightbox-nav__col.end {
	justify-content: flex-end;
	align-items: center;
	display: flex;
}

.lightbox-nav__text {
	margin-bottom: 0;
	font-size: 1em;
  margin-block-start: 0;
  margin-block-end: 0;
}

button.lightbox-nav__button {
	color: currentColor;
	grid-column-gap: 0.5em;
	grid-row-gap: 0.5em;
	background-color: transparent;
	justify-content: flex-start;
	align-items: center;
	margin: -1em;
	padding: 1em;
	display: flex;
	border-style: none;
	cursor: pointer;
	font: inherit;
}

/* Dot (mismo gesto hover que el dot anterior: se desplazan en horizontal). */
.lightbox-nav__dot {
  background-color: currentColor;
  border-radius: 10em;
  width: .375em;
  height: .375em;
  margin-bottom: -.1em;
  transition-property: transform;
  transition-duration: .45s;
  transition-timing-function: cubic-bezier(.625, .05, 0, 1);
}

.lightbox-nav__button:hover .lightbox-nav__dot {
	transform: translate(-100%, 0);
}

.lightbox-nav__button:nth-of-type(2):hover .lightbox-nav__dot {
	transform: translate(100%, 0);
}

@media screen and (max-width: 767px) {
	.lightbox-img__wrap {
		width: 92vw;
	}
  .lightbox-img, .lightbox-img__item img {
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
    height: auto;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
}
}
