/**
 * Palec.net B-Complex — lightweight lightbox.
 */

.palec-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(10, 12, 16, 0.88);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.palec-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.palec-lightbox__figure {
	margin: 0;
	max-width: min(96vw, 1200px);
	max-height: 92vh;
	transform: scale(0.97);
	transition: transform 0.2s ease;
}

.palec-lightbox.is-open .palec-lightbox__figure {
	transform: scale(1);
}

.palec-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 92vh;
	width: auto;
	height: auto;
	margin: 0 auto;
}

.palec-lightbox__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.palec-lightbox__close:hover,
.palec-lightbox__close:focus {
	background: rgba(255, 255, 255, 0.22);
}

body.palec-lightbox-open {
	overflow: hidden;
}
