/**
 * creapulse-tools — diagram lightbox
 * Click a figure.diagramme to enlarge its inline SVG in an overlay.
 */

figure.diagramme {
	cursor: zoom-in;
}

.cpt-diagram-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	background: rgba(15, 15, 15, 0.85);
	cursor: zoom-out;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.cpt-diagram-overlay__inner {
	width: min(96vw, 1400px);
	max-height: 92vh;
	overflow: auto;
}

/*
 * The diagram SVG usually declares only a viewBox (no width/height), so it has
 * no intrinsic size. Give it a concrete width (100% of the sized container)
 * and let the height follow the viewBox aspect ratio, capped to the viewport.
 */
.cpt-diagram-overlay__inner svg {
	width: 100%;
	height: auto;
	max-height: 92vh;
	display: block;
}

.cpt-diagram-overlay__close {
	position: absolute;
	top: 2vmin;
	right: 2vmin;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #111;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.cpt-diagram-overlay__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
