/**
 * EFPIC Lightbox — photography-first fullscreen viewer.
 */

.efpic-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 10, 14, 0.94);
	opacity: 0;
	transition: opacity 0.28s ease;
	touch-action: none;
}

.efpic-lb.is-open {
	display: flex;
	opacity: 1;
}

.efpic-lb__stage {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.efpic-lb__img-wrap {
	max-width: min(96vw, 1600px);
	max-height: 86vh;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translate3d(0, 0, 0);
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.efpic-lb.is-dragging .efpic-lb__img-wrap {
	transition: none;
}

.efpic-lb__img {
	display: block;
	max-width: 100%;
	max-height: 86vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	user-select: none;
	-webkit-user-drag: none;
}

.efpic-lb__caption {
	position: absolute;
	left: 50%;
	bottom: 1.35rem;
	transform: translateX(-50%);
	width: min(90vw, 720px);
	padding: 0.65rem 1rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	line-height: 1.45;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.efpic-lb__counter {
	position: absolute;
	top: 1rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.efpic-lb__btn {
	position: absolute;
	z-index: 2;
	border: 0;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	line-height: 1;
	backdrop-filter: blur(6px);
	transition: background 0.2s ease, transform 0.15s ease;
}

.efpic-lb__btn:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: scale(1.05);
}

.efpic-lb__close {
	top: 1rem;
	right: 1rem;
	font-size: 1.35rem;
}

.efpic-lb__prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.efpic-lb__next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.efpic-lb__prev:hover,
.efpic-lb__next:hover {
	transform: translateY(-50%) scale(1.05);
}

.efpic-lb.is-single .efpic-lb__prev,
.efpic-lb.is-single .efpic-lb__next,
.efpic-lb.is-single .efpic-lb__counter {
	display: none;
}

body.efpic-lb-lock {
	overflow: hidden;
}

@media (max-width: 640px) {
	.efpic-lb__prev { left: 0.4rem; }
	.efpic-lb__next { right: 0.4rem; }
	.efpic-lb__btn {
		width: 2.4rem;
		height: 2.4rem;
		font-size: 1.25rem;
	}
	.efpic-lb__caption {
		bottom: 0.85rem;
		font-size: 0.85rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.efpic-lb,
	.efpic-lb__img-wrap,
	.efpic-lb__btn {
		transition: none !important;
	}
}
