/*
 * Hide the surrounding Elementor container on projects without mixed media
 * (the widget prints nothing then). Give the container the CSS class "lpg-section".
 */
.lpg-section:not(:has(.elementor-widget-lemon-mixed-gallery)) {
	display: none;
}

/*
 * Justified gallery, pure CSS.
 * Each item grows in proportion to its aspect ratio (--ar), so every item in a row
 * ends up with the same height; rows differ slightly in height. Wraps responsively.
 */
.lpg-gallery {
	--lpg-row-h: 360px;
	--lpg-gap: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--lpg-gap);
}

.lpg-item {
	--ar: 1.5;
	position: relative;
	display: block;
	flex: var(--ar) 1 calc(var(--ar) * var(--lpg-row-h));
	min-width: 0;
	aspect-ratio: var(--ar);
	overflow: hidden;
	background: rgba(127, 127, 127, 0.12);
}

/* When the script has calculated the rows, it sets exact sizes. */
.lpg-gallery.lpg-js .lpg-item {
	flex: none;
	aspect-ratio: auto;
}

.lpg-gallery.lpg-js::after {
	display: none;
}

/* Last row keeps the target height instead of stretching to full width. */
.lpg-last-keep::after {
	content: "";
	flex: 1000000 1 0;
}

.lpg-media {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: inherit;
}

a.lpg-item {
	cursor: pointer;
}

.lpg-empty {
	padding: 24px;
	border: 1px dashed currentColor;
	opacity: 0.6;
	font-size: 14px;
}

/* Uploaded video inside Elementor's lightbox slideshow. */
.lpg-lb-video {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lpg-lb-video video {
	max-width: 85vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	background: #000;
}
