/* Looty Gallery */

.looty-gallery {
	--looty-gallery-gap: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: var(--looty-gallery-gap);
	margin: 0;
}

.looty-gallery__item {
	position: relative;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #f4f4f2;
}

.looty-gallery__item--full {
	width: 100%;
}

.looty-gallery__item--half {
	width: calc(50% - var(--looty-gallery-gap) / 2);
}

.looty-gallery__img {
	display: block;
	width: 100%;
	height: auto;
}

/* Wymuszone proporcje kadru, gdy shortcode dostał atrybut ratio. */
.looty-gallery--ratio .looty-gallery__item {
	aspect-ratio: var(--looty-gallery-ratio, 4 / 5);
}

.looty-gallery--ratio .looty-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.looty-gallery--zoom .looty-gallery__item {
	cursor: zoom-in;
}

/* --- Powiększenie ------------------------------------------------------ */

.looty-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: rgba(14, 14, 14, .92);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
	cursor: zoom-out;
}

.looty-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.looty-lightbox img {
	max-width: 100%;
	max-height: 100%;
	display: block;
}

.looty-lightbox__close {
	position: absolute;
	top: 20px;
	right: 24px;
	width: 32px;
	height: 32px;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: .7;
	padding: 0 !important;
}

.looty-lightbox__close:hover {
	opacity: 1;
}

@media (max-width: 640px) {
	.looty-gallery__item--half {
		width: 100%;
	}

	.looty-lightbox {
		padding: 16px;
	}
}
