/* ===================================================
   LFab Photo Slider — Frontend  v0.1.0
   =================================================== */

/* ── Wrapper ── */
.lfabps-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	-webkit-user-select: none;
	user-select: none;
}

/* ── Viewport: aspect-ratio via padding-bottom trick.
      padding-bottom is set inline by PHP (height/width * 100%).
      This is the ONLY source of truth for proportions — never overridden. ── */
.lfabps-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	/* height: 0 is implicit because of padding-bottom */
	height: 0;
}

/* ── Track: fills the viewport absolutely ── */
.lfabps-track {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ── Slides: stacked, fade transition ── */
.lfabps-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.65s ease;
	cursor: zoom-in;
	z-index: 0;
}

.lfabps-slide.is-active {
	opacity: 1;
	z-index: 1;
}

/* ── Images: always fill slide, crop to center ── */
.lfabps-slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	pointer-events: none;
}

/* ── Navigation arrows ──
      Hidden by default, appear on hover at 50% opacity.
      On mobile: always visible at 50%.                    ── */
.lfabps-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: transparent;
	border: none;
	padding: 10px;
	cursor: pointer;
	color: #fff;
	opacity: 0;
	transition: opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	outline: none;
}

.lfabps-arrow svg {
	width: 34px;
	height: 34px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
}

.lfabps-arrow--prev { left: 10px; }
.lfabps-arrow--next { right: 10px; }

/* Show arrows at 50% on gallery hover */
.lfabps-wrap:hover .lfabps-arrow {
	opacity: 0.5;
}

/* Arrow itself hovered: go slightly brighter */
.lfabps-arrow:hover {
	opacity: 0.85 !important;
}

.lfabps-arrow:active {
	opacity: 1 !important;
}

/* ── Dot indicators ── */
.lfabps-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 7px;
}

.lfabps-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	border: none;
	padding: 0;
	cursor: pointer;
	outline: none;
	transition: background 0.2s, transform 0.2s;
}

.lfabps-dot.is-active {
	background: #fff;
	transform: scale(1.4);
}

/* ============================================================
   Lightbox
   ============================================================ */

.lfabps-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.28s ease;
}

.lfabps-lightbox.is-open {
	opacity: 1;
	pointer-events: all;
}

/* Backdrop */
.lfabps-lb__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.91);
	cursor: pointer;
}

/* Image wrapper */
.lfabps-lb__img-wrap {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 92vw;
	max-height: 90vh;
}

.lfabps-lb__img {
	display: block;
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.lfabps-lb__img.is-loaded {
	opacity: 1;
}

/* Close button */
.lfabps-lb__close {
	position: fixed;
	top: 16px;
	right: 18px;
	z-index: 10;
	background: transparent;
	border: none;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.65);
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	outline: none;
	transition: color 0.18s;
}

.lfabps-lb__close:hover  { color: #fff; }
.lfabps-lb__close svg    { width: 28px; height: 28px; }

/* Lightbox arrows */
.lfabps-lb__arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: transparent;
	border: none;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	padding: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	outline: none;
	transition: color 0.18s;
}

.lfabps-lb__arrow:hover  { color: rgba(255, 255, 255, 0.92); }
.lfabps-lb__arrow svg    { width: 38px; height: 38px; filter: drop-shadow(0 1px 5px rgba(0,0,0,.6)); }
.lfabps-lb__arrow--prev  { left: 12px; }
.lfabps-lb__arrow--next  { right: 12px; }

/* Lightbox dots */
.lfabps-lb__dots {
	position: fixed;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 8px;
	align-items: center;
}

.lfabps-lb__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.38);
	border: none;
	padding: 0;
	cursor: pointer;
	outline: none;
	transition: background 0.2s, transform 0.2s;
}

.lfabps-lb__dot.is-active {
	background: #fff;
	transform: scale(1.4);
}

/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 768px) {
	/* Arrows always visible on touch devices */
	.lfabps-wrap .lfabps-arrow,
	.lfabps-wrap:hover .lfabps-arrow {
		opacity: 0.5;
	}

	.lfabps-arrow {
		width: 42px;
		height: 42px;
		padding: 8px;
	}

	.lfabps-arrow svg {
		width: 26px;
		height: 26px;
	}

	.lfabps-arrow--prev { left: 5px; }
	.lfabps-arrow--next { right: 5px; }

	/* Lightbox arrows */
	.lfabps-lb__arrow {
		width: 48px;
		height: 48px;
		padding: 10px;
	}

	.lfabps-lb__arrow svg {
		width: 30px;
		height: 30px;
	}

	.lfabps-lb__arrow--prev { left: 4px; }
	.lfabps-lb__arrow--next { right: 4px; }

	.lfabps-lb__img {
		max-width: 96vw;
		max-height: 82vh;
	}
}
