/**
 * Photo Gallery Lightbox — lightbox (modal dialog) styles.
 */

.pgl-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 12, 0.92);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--pgl-anim-speed, 300ms) ease;
}

.pgl-lightbox-overlay.pgl-light-theme {
	background: rgba(255, 255, 255, 0.97);
}

.pgl-lightbox-overlay.pgl-open {
	opacity: 1;
	visibility: visible;
}

.pgl-lightbox {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 1rem 2rem;
}

.pgl-lightbox-figure {
	position: relative;
	max-width: min(92vw, 1400px);
	max-height: 78vh;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.pgl-lightbox-img {
	max-width: 100%;
	max-height: 78vh;
	object-fit: contain;
	transform-origin: center center;
	transition: transform 200ms ease, opacity var(--pgl-anim-speed, 300ms) ease;
	touch-action: pinch-zoom;
}

.pgl-lightbox-img.pgl-zoomed {
	cursor: zoom-out;
	max-height: none;
	max-width: none;
}

.pgl-lightbox-caption-wrap {
	max-width: min(92vw, 1000px);
	margin-top: 1rem;
	text-align: center;
	color: #f2f2f2;
}

.pgl-light-theme .pgl-lightbox-caption-wrap {
	color: #1c1c1c;
}

.pgl-lightbox-caption {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
}

.pgl-lightbox-description {
	font-size: 0.9rem;
	opacity: 0.85;
	margin: 0;
}

.pgl-lightbox-counter {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	opacity: 0.75;
}

/* Controls */
.pgl-lb-btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
	transition: background var(--pgl-anim-speed, 300ms) ease;
}

.pgl-light-theme .pgl-lb-btn {
	background: rgba(0, 0, 0, 0.08);
	color: #1c1c1c;
}

.pgl-lb-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

.pgl-light-theme .pgl-lb-btn:hover {
	background: rgba(0, 0, 0, 0.16);
}

.pgl-lb-btn:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

.pgl-light-theme .pgl-lb-btn:focus-visible {
	outline-color: #0b5fa5;
}

.pgl-lb-close {
	top: 1rem;
	right: 1rem;
}

.pgl-lb-prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.pgl-lb-next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.pgl-lb-zoom-in {
	bottom: 1rem;
	left: calc(50% - 56px);
}

.pgl-lb-zoom-out {
	bottom: 1rem;
	left: calc(50% + 12px);
}

.pgl-lb-download {
	top: 1rem;
	left: 1rem;
}

.pgl-lb-share {
	top: 1rem;
	left: 4.5rem;
}

.pgl-lb-btn[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.pgl-lb-btn {
		width: 38px;
		height: 38px;
		font-size: 1rem;
	}
	.pgl-lb-prev {
		left: 0.35rem;
	}
	.pgl-lb-next {
		right: 0.35rem;
	}
	.pgl-lb-zoom-in,
	.pgl-lb-zoom-out {
		bottom: 0.5rem;
	}
}

.pgl-lightbox-sr-status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.pgl-lightbox-overlay,
	.pgl-lightbox-img,
	.pgl-lb-btn {
		transition: none !important;
	}
}
