.wp-block-svp-media-gallery.svp-media-gallery {
	margin: 2rem 0;
}

.svp-media-gallery__viewport {
	position: relative;
}

.svp-media-gallery__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.svp-media-gallery__item {
	margin: 0;
}

.svp-media-gallery__item-link,
.svp-media-gallery__item-shell {
	display: block;
	position: relative;
	overflow: hidden;
	border: 1px solid #d8dde0;
	border-radius: 6px;
	background: #f3f2f1;
	box-shadow: 0 12px 24px rgba(11, 12, 12, 0.06);
	padding-bottom: 75%; /* 4:3 ratio */
	height: 0;
}

.svp-media-gallery__item-link {
	text-decoration: none;
	color: inherit;
}

.svp-media-gallery__item-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.svp-media-gallery__item-link:focus-visible,
.svp-media-gallery__button:focus-visible,
.svp-media-gallery__dot:focus-visible {
	outline: 3px solid #d96e00;
	outline-offset: 3px;
}

.svp-media-gallery__controls {
	display: none;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.svp-media-gallery__button {
	border: 2px solid #0b0c0c;
	border-radius: 5px;
	background: #fff;
	color: #0b0c0c;
	cursor: pointer;
	padding: 0.55rem 0.85rem;
	min-width: 2.9rem;
	min-height: 2.9rem;
	font-family: Source Sans Pro, arial, sans-serif;
	font-size: 1.1875rem;
	line-height: 1.2631578947;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-weight: 700;
}

.svp-media-gallery__button[disabled] {
	cursor: not-allowed;
	opacity: 0.45;
}

.svp-media-gallery__toggle {
	min-width: auto;
	padding-inline: 1rem;
}

.svp-media-gallery__dots {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-left: auto;
}

.svp-media-gallery__dot {
	width: 12px;
	height: 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(11, 12, 12, 0.25);
	cursor: pointer;
	padding: 0;
}

.svp-media-gallery__dot[aria-current="true"] {
	background: #005ea5;
}

.svp-media-gallery--carousel.is-enhanced .svp-media-gallery__viewport {
	overflow: hidden;
}

.svp-media-gallery--carousel.is-enhanced .svp-media-gallery__list {
	display: flex;
	gap: 0;
	transition: transform 320ms ease;
	will-change: transform;
}

.svp-media-gallery--carousel.is-enhanced .svp-media-gallery__item {
	flex: 0 0 calc(100% / var(--svp-media-gallery-per-view, 3));
	max-width: calc(100% / var(--svp-media-gallery-per-view, 3));
	padding: 0 0.45rem;
	box-sizing: border-box;
}

.svp-media-gallery--carousel.is-enhanced .svp-media-gallery__controls {
	display: flex;
}

.svp-media-gallery__status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (min-width: 740px) {
	.svp-media-gallery__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 739px) {
	.svp-media-gallery__controls {
		align-items: stretch;
	}

	.svp-media-gallery__dots {
		width: 100%;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.svp-media-gallery--carousel.is-enhanced .svp-media-gallery__list {
		transition: none;
	}
}

/* Lightbox */
.svp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.88);
	padding: 1rem;
	box-sizing: border-box;
	border: 0;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
	overflow: auto;
}

.svp-lightbox::backdrop {
	background: transparent;
}

.svp-lightbox[open] {
	display: flex;
	animation: svp-lightbox-in 220ms ease;
}

@keyframes svp-lightbox-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.svp-lightbox[open] {
		animation: none;
	}
}

.svp-lightbox__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(90vw, 1200px);
	max-height: 90vh;
}

.svp-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 6px;
}

.svp-lightbox__caption {
	margin-top: 0.75rem;
	padding: 0 1rem;
	color: #fff;
	font-family: "Source Sans Pro", arial, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.4;
	text-align: center;
	max-width: 100%;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.svp-lightbox__close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	width: 2.75rem;
	height: 2.75rem;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.svp-lightbox__close:focus-visible {
	outline: 3px solid #d96e00;
	outline-offset: 3px;
}

.svp-lightbox__prev,
.svp-lightbox__next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.svp-lightbox__prev {
	left: 1rem;
}

.svp-lightbox__next {
	right: 1rem;
}

.svp-lightbox__prev:focus-visible,
.svp-lightbox__next:focus-visible {
	outline: 3px solid #d96e00;
	outline-offset: 3px;
}

.svp-lightbox__prev[hidden],
.svp-lightbox__next[hidden] {
	display: none;
}

.svp-lightbox__counter {
	position: fixed;
	bottom: 1rem;
	right: 1.5rem;
	color: rgba(255, 255, 255, 0.5);
	font-family: "Source Sans Pro", arial, sans-serif;
	font-size: 0.8125rem;
}
