.wsmg-gallery {
	--wsmg-columns: 3;
	--wsmg-gap: 20px;
	box-sizing: border-box;
}

.wsmg-gallery *,
.wsmg-lightbox * {
	box-sizing: border-box;
}

.wsmg-layout-grid {
	display: grid;
	grid-template-columns: repeat(var(--wsmg-columns), minmax(0, 1fr));
	gap: var(--wsmg-gap);
}

.wsmg-layout-masonry {
	display: block;
	column-count: var(--wsmg-columns);
	column-gap: var(--wsmg-gap);
}

.wsmg-layout-masonry .wsmg-item {
	display: inline-block;
	width: 100%;
	break-inside: avoid;
	margin: 0 0 var(--wsmg-gap);
}

.wsmg-item {
	position: relative;
	min-width: 0;
}

.wsmg-media-inner {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	background: #f5f5f5;
}

.wsmg-button-reset {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	text-align: inherit;
	font: inherit;
	color: inherit;
}

.wsmg-media-inner img,
.wsmg-media-inner video,
.wsmg-media-inner iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
}

.wsmg-layout-grid .wsmg-media-inner {
	height: 280px;
}

.wsmg-layout-grid .wsmg-media-inner img,
.wsmg-layout-grid .wsmg-media-inner video,
.wsmg-layout-grid .wsmg-media-inner iframe,
.wsmg-layout-grid .wsmg-empty-thumb {
	height: 100%;
}

.wsmg-layout-grid .wsmg-media-inner img,
.wsmg-layout-grid .wsmg-media-inner video {
	object-fit: cover;
}

.wsmg-layout-grid .wsmg-media-inner iframe {
	aspect-ratio: auto;
}

.wsmg-layout-masonry .wsmg-media-inner img,
.wsmg-layout-masonry .wsmg-media-inner video {
	height: auto;
	object-fit: initial;
}

.wsmg-layout-masonry .wsmg-media-inner iframe,
.wsmg-layout-masonry .wsmg-inline-video iframe {
	aspect-ratio: 16 / 9;
	height: auto;
}

.wsmg-inline-video iframe {
	height: 100%;
}

.wsmg-empty-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	width: 100%;
	background: linear-gradient(135deg, #222, #555);
	color: #fff;
	font-size: 14px;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
}

.wsmg-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	transform: translate(-50%, -50%);
	transition: transform .22s ease, opacity .22s ease;
	z-index: 2;
}

.wsmg-play-icon::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-top: .42em solid transparent;
	border-bottom: .42em solid transparent;
	border-left: .66em solid currentColor;
	margin-left: .12em;
}

.wsmg-lightbox-trigger:hover .wsmg-play-icon,
.wsmg-lightbox-trigger:focus-visible .wsmg-play-icon {
	transform: translate(-50%, -50%) scale(1.08);
}

.wsmg-lightbox-trigger::after,
.wsmg-image-lightbox-trigger::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.10);
	opacity: 0;
	transition: opacity .22s ease;
}

.wsmg-lightbox-trigger:hover::after,
.wsmg-lightbox-trigger:focus-visible::after,
.wsmg-image-lightbox-trigger:hover::after,
.wsmg-image-lightbox-trigger:focus-visible::after {
	opacity: 1;
}

.wsmg-caption {
	margin-top: 10px;
	line-height: 1.4;
	color: #111;
}

.wsmg-lightbox {
	--wsmg-lb-text-align: center;
	--wsmg-lb-meta-distance: 12px;
	--wsmg-lb-meta-gap: 6px;
	--wsmg-lb-title-color: #fff;
	--wsmg-lb-title-font-size: 18px;
	--wsmg-lb-caption-color: #fff;
	--wsmg-lb-caption-font-size: 15px;
	--wsmg-lb-description-color: #fff;
	--wsmg-lb-description-font-size: 14px;
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.82);
	z-index: 999999;
}

.wsmg-lightbox.is-active {
	display: flex;
}

.wsmg-lightbox__dialog {
	position: relative;
	width: min(1100px, 94vw);
	max-height: 90vh;
}

.wsmg-lightbox__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.wsmg-lightbox__content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background: transparent;
	line-height: 0;
}

.wsmg-lightbox__content.is-next {
	animation: wsmgLightboxSlideNext .24s ease;
}

.wsmg-lightbox__content.is-prev {
	animation: wsmgLightboxSlidePrev .24s ease;
}

.wsmg-lightbox__content img,
.wsmg-lightbox__content video,
.wsmg-lightbox__content iframe {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	border: 0;
	background: #000;
}

.wsmg-lightbox__content img {
	width: auto;
	height: auto;
	object-fit: contain;
}

.wsmg-lightbox__content video,
.wsmg-lightbox__content iframe {
	width: 100%;
}

.wsmg-lightbox__content iframe {
	aspect-ratio: 16 / 9;
	height: auto;
}

@keyframes wsmgLightboxSlideNext {
	from {
		opacity: 0;
		transform: translateX(32px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes wsmgLightboxSlidePrev {
	from {
		opacity: 0;
		transform: translateX(-32px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.wsmg-lightbox__meta {
	display: none;
	flex-direction: column;
	gap: var(--wsmg-lb-meta-gap);
	margin-top: var(--wsmg-lb-meta-distance);
	text-align: var(--wsmg-lb-text-align);
	line-height: 1.45;
}

.wsmg-lightbox__meta[hidden] {
	display: none !important;
}

.wsmg-lightbox__meta.is-active {
	display: flex;
}

.wsmg-lightbox__title,
.wsmg-lightbox__caption,
.wsmg-lightbox__description {
	margin: 0;
	padding: 0;
	word-break: break-word;
}

.wsmg-lightbox__title {
	color: var(--wsmg-lb-title-color);
	font-size: var(--wsmg-lb-title-font-size);
	font-weight: 600;
}

.wsmg-lightbox__caption {
	color: var(--wsmg-lb-caption-color);
	font-size: var(--wsmg-lb-caption-font-size);
}

.wsmg-lightbox__description {
	color: var(--wsmg-lb-description-color);
	font-size: var(--wsmg-lb-description-font-size);
}

.wsmg-lightbox__close {
	position: absolute;
	right: -12px;
	top: -44px;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff !important;
	color: #111 !important;
	cursor: pointer;
	font-size: 0;
	line-height: 1;
	text-align: center;
	box-shadow: none !important;
	outline: none;
	z-index: 4;
}

.wsmg-lightbox__close::before,
.wsmg-lightbox__close::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	display: block;
	width: 16px;
	height: 2px;
	background: #111;
	border-radius: 2px;
	transform-origin: center;
}

.wsmg-lightbox__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.wsmg-lightbox__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.wsmg-lightbox__nav {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff !important;
	color: #111 !important;
	cursor: pointer;
	font-size: 0;
	line-height: 1;
	transform: translateY(-50%);
	transition: opacity .2s ease, transform .2s ease;
	box-shadow: none !important;
	outline: none;
	z-index: 3;
}

.wsmg-lightbox__nav:hover,
.wsmg-lightbox__nav:focus,
.wsmg-lightbox__nav:focus-visible,
.wsmg-lightbox__nav:active,
.wsmg-lightbox__close:hover,
.wsmg-lightbox__close:focus,
.wsmg-lightbox__close:focus-visible,
.wsmg-lightbox__close:active {
	background: #fff !important;
	color: #111 !important;
	box-shadow: none !important;
	outline: none;
}

.wsmg-lightbox__nav:hover,
.wsmg-lightbox__nav:focus-visible {
	transform: translateY(-50%) scale(1.06);
}

.wsmg-lightbox__nav::before {
	content: '';
	display: block;
	width: 13px;
	height: 13px;
	border-top: 3px solid #111;
	border-right: 3px solid #111;
}

.wsmg-lightbox__prev::before {
	transform: translateX(3px) rotate(-135deg);
}

.wsmg-lightbox__next::before {
	transform: translateX(-3px) rotate(45deg);
}

.wsmg-lightbox__nav span {
	display: none;
}

.wsmg-lightbox__prev {
	left: -72px;
}

.wsmg-lightbox__next {
	right: -72px;
}

.wsmg-lightbox.is-single .wsmg-lightbox__nav,
.wsmg-lightbox__nav:disabled {
	display: none;
}

body.wsmg-lightbox-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.wsmg-gallery {
		--wsmg-columns: 1;
	}

	.wsmg-lightbox {
		padding: 16px;
	}

	.wsmg-lightbox__close {
		right: 0;
		top: -48px;
	}

	.wsmg-lightbox__nav {
		width: 42px;
		height: 42px;
	}

	.wsmg-lightbox__prev {
		left: 8px;
	}

	.wsmg-lightbox__next {
		right: 8px;
	}

	.wsmg-lightbox__content img,
	.wsmg-lightbox__content video,
	.wsmg-lightbox__content iframe {
		max-height: 78vh;
	}
}

/* Stable video boxes prevent masonry jump/reflow when a video starts playing. */
.wsmg-video-frame {
	position: relative;
	background: #000;
}

.wsmg-video-frame > img,
.wsmg-video-frame > video,
.wsmg-video-frame > iframe,
.wsmg-video-frame > .wsmg-empty-thumb,
.wsmg-video-frame > .wsmg-inline-play-trigger {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.wsmg-video-frame > .wsmg-inline-play-trigger {
	line-height: 0;
	background: transparent;
}

.wsmg-video-frame .wsmg-empty-thumb {
	min-height: 0;
}

.wsmg-layout-masonry .wsmg-video-frame video,
.wsmg-layout-masonry .wsmg-video-frame iframe,
.wsmg-layout-masonry .wsmg-video-frame img {
	height: 100%;
	object-fit: cover;
}

.wsmg-inline-video.is-playing video {
	height: 100%;
}

.wsmg-video-auto-thumb > span {
	position: relative;
	z-index: 1;
}

.wsmg-video-frame > .wsmg-empty-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Load More button */
.wsmg-item.wsmg-is-hidden,
.wsmg-item[hidden] {
	display: none !important;
}

.wsmg-load-more-wrap {
	margin-top: 30px;
	text-align: center;
}

.wsmg-load-more-button {
	--wsmg-load-more-transition: 250ms;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border: 1px solid #111;
	border-radius: 4px;
	background-color: #111;
	color: #fff;
	font: inherit;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	outline: none;
	transition: color var(--wsmg-load-more-transition) ease, background-color var(--wsmg-load-more-transition) ease, border-color var(--wsmg-load-more-transition) ease, transform var(--wsmg-load-more-transition) ease;
}

.wsmg-load-more-button:hover,
.wsmg-load-more-button:focus,
.wsmg-load-more-button:focus-visible,
.wsmg-load-more-button:active {
	background-color: #333;
	color: #fff;
	text-decoration: none;
	box-shadow: none;
	outline: none;
}

.wsmg-load-more-button.is-hidden {
	display: none !important;
}

.wsmg-infinite-scroll-trigger {
	width: 100%;
	height: 1px;
	margin-top: 1px;
	pointer-events: none;
}

.wsmg-infinite-scroll-trigger.is-hidden {
	display: none !important;
}
