/* ── Canvas Image Lightbox (see assets/js/lightbox.js) ───────────────────── */

.cs-lightbox-trigger {
	cursor: zoom-in;
}

.cs-lightbox-trigger:focus-visible {
	outline: 3px solid var(--color-primary, #1d4ed8);
	outline-offset: 3px;
}

html.cs-lightbox-open {
	overflow: hidden;
}

.cs-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
}

.cs-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.85);
}

.cs-lightbox-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 3.5rem 1rem 1rem;
	box-sizing: border-box;
	overflow: auto;
}

.cs-lightbox-stage img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	cursor: zoom-in;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Actual size: let the image overflow and scroll inside the stage. */
.cs-lightbox.is-zoomed .cs-lightbox-stage {
	align-items: flex-start;
	justify-content: flex-start;
}

.cs-lightbox.is-zoomed .cs-lightbox-stage img {
	max-width: none;
	max-height: none;
	margin: auto;
	cursor: zoom-out;
}

.cs-lightbox-close {
	position: fixed;
	top: 0.75rem;
	right: 1rem;
	z-index: 1;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.cs-lightbox-close:hover,
.cs-lightbox-close:focus-visible {
	background: rgba(255, 255, 255, 0.3);
	outline: none;
}
