/* ThryonLab Gallery — front-end */

.thryonlab-gallery {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 50px;
	padding: 1rem 0;
}

.thryonlab-gallery__head {
	margin-bottom: 1.25rem;
	text-align: center;
}

.thryonlab-gallery__desc {
	margin: 0 auto;
	max-width: 720px;
	color: #444;
}

.thryonlab-gallery__desc > *:first-child {
	margin-top: 0;
}

.thryonlab-gallery__desc > *:last-child {
	margin-bottom: 0;
}

/* Grid */
.thryonlab-gallery--grid .thryonlab-gallery__items {
	display: grid;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.thryonlab-gallery--cols-3 .thryonlab-gallery__items {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.thryonlab-gallery--cols-4 .thryonlab-gallery__items {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.thryonlab-gallery--cols-6 .thryonlab-gallery__items {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 992px) {
	.thryonlab-gallery--grid .thryonlab-gallery__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 576px) {
	.thryonlab-gallery--grid .thryonlab-gallery__items {
		grid-template-columns: minmax(0, 1fr);
	}
}

.thryonlab-gallery__item {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: #f3f3f3;
	border-radius: 6px;
	overflow: hidden;
	cursor: default;
	line-height: 0;
}

.thryonlab-gallery--lightbox .thryonlab-gallery__item {
	cursor: zoom-in;
}

.thryonlab-gallery__item:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.thryonlab-gallery--grid .thryonlab-gallery__item {
	aspect-ratio: 3 / 2;
}

.thryonlab-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	vertical-align: middle;
}

/* Carousel */
.thryonlab-gallery__slide {
	padding: 0 6px;
	box-sizing: border-box;
}

.thryonlab-gallery--carousel .thryonlab-gallery__slide {
	aspect-ratio: 3 / 2;
}

.thryonlab-gallery__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

.thryonlab-gallery--carousel .thryonlab-gallery__carousel {
	position: relative;
	margin: 0 -6px;
	padding-bottom: 48px; /* space for Slick dots inside flow (avoids overflow clip) */
	overflow: visible;
}

.thryonlab-gallery--carousel .slick-prev,
.thryonlab-gallery--carousel .slick-next {
	z-index: 2;
}

.thryonlab-gallery--carousel .slick-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0;
}

/* Lightbox */
body.thryonlab-gallery-lightbox-open {
	overflow: hidden;
}

.thryonlab-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}

.thryonlab-gallery-lightbox.is-open {
	display: flex;
}

.thryonlab-gallery-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}

.thryonlab-gallery-lightbox__inner {
	position: relative;
	z-index: 1;
	width: min(96vw, 1100px);
	max-height: 92vh;
	padding: 2.5rem 3rem 3rem;
	box-sizing: border-box;
}

.thryonlab-gallery-lightbox__carousel {
	width: 100%;
}

.thryonlab-gallery-lightbox__slide img {
	display: block;
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	border-radius: 4px;
}

.thryonlab-gallery-lightbox__close {
	position: absolute;
	top: 8px;
	right: 12px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.thryonlab-gallery-lightbox__close:hover,
.thryonlab-gallery-lightbox__close:focus {
	background: rgba(255, 255, 255, 0.22);
}

.thryonlab-gallery-lightbox .slick-prev,
.thryonlab-gallery-lightbox .slick-next {
	z-index: 2;
	width: 44px;
	height: 44px;
}

.thryonlab-gallery-lightbox .slick-prev:before,
.thryonlab-gallery-lightbox .slick-next:before {
	font-size: 28px;
}

.thryonlab-gallery-lightbox .slick-dots {
	bottom: -36px;
}

.thryonlab-gallery-lightbox .slick-dots li button:before {
	color: #fff;
	opacity: 0.5;
}

.thryonlab-gallery-lightbox .slick-dots li.slick-active button:before {
	opacity: 1;
}
