/* Galerías del editor de bloques y del editor clásico. */
.wp-block-gallery,
.gallery {
	column-count: var(--sml-columns, 3) !important;
	column-gap: var(--sml-gap, 16px) !important;
	display: block !important;
}

.wp-block-gallery > .wp-block-image,
.wp-block-gallery > figure,
.gallery > .gallery-item {
	break-inside: avoid;
	box-sizing: border-box;
	display: inline-block !important;
	float: none !important;
	margin: 0 0 var(--sml-gap, 16px) !important;
	max-width: none !important;
	position: relative;
	vertical-align: top;
	width: 100% !important;
}

.wp-block-gallery img,
.gallery .gallery-item img {
	border: 0 !important;
	display: block;
	height: auto !important;
	max-width: 100%;
	width: 100%;
}

.wp-block-gallery a,
.gallery .gallery-item a {
	cursor: zoom-in;
	display: block;
}

.gallery::after {
	clear: both;
	content: "";
	display: table;
}

/* Lightbox. */
.sml-lightbox {
	align-items: center;
	background: rgba(0, 0, 0, .92);
	box-sizing: border-box;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 56px 72px;
	position: fixed;
	z-index: 999999;
}

.sml-lightbox.is-open {
	display: flex;
}

body.sml-lock {
	overflow: hidden;
}

.sml-lightbox__figure {
	align-items: center;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	margin: 0;
	max-width: 100%;
}

.sml-lightbox__image {
	box-shadow: 0 4px 30px rgba(0, 0, 0, .35);
	display: block;
	max-height: calc(100vh - 150px);
	max-width: 100%;
	object-fit: contain;
}

.sml-lightbox__caption {
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	margin-top: 12px;
	max-width: 900px;
	text-align: center;
}

.sml-lightbox__button {
	align-items: center;
	background: rgba(0, 0, 0, .35);
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: flex;
	font: 400 34px/1 sans-serif;
	height: 48px;
	justify-content: center;
	padding: 0;
	position: absolute;
	width: 48px;
}

.sml-lightbox__button:hover,
.sml-lightbox__button:focus-visible {
	background: #fff;
	color: #111;
	outline: none;
}

.sml-lightbox__close {
	right: 18px;
	top: 18px;
}

.sml-lightbox__previous {
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.sml-lightbox__next {
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.sml-lightbox__counter {
	color: #fff;
	font-size: 13px;
	left: 18px;
	position: absolute;
	top: 24px;
}

@media (max-width: 800px) {
	.wp-block-gallery,
	.gallery {
		column-count: var(--sml-tablet-columns, 2) !important;
	}
}

@media (max-width: 520px) {
	.wp-block-gallery,
	.gallery {
		column-count: 1 !important;
	}

	.sml-lightbox {
		padding: 60px 16px 80px;
	}

	.sml-lightbox__previous {
		bottom: 16px;
		left: calc(50% - 60px);
		top: auto;
		transform: none;
	}

	.sml-lightbox__next {
		bottom: 16px;
		right: calc(50% - 60px);
		top: auto;
		transform: none;
	}
}
