.rr-gallery {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.rr-gallery__display {
	flex: 1 1 auto;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
	min-height: 240px;
	outline: none;
	border-radius: 14px;
	overflow: hidden;
	background: var(--cheese-hole, #e3b542);
	box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
	transition: box-shadow 160ms ease;
}

.rr-gallery__display-media {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rr-gallery__display::before {
	content: '';
	position: absolute;
	inset: -20%;
	background-image: var(--rr-gallery-bg, none);
	background-size: cover;
	background-position: center;
	filter: blur(60px);
	transform: scale(1.15);
	opacity: 0;
	transition: opacity 200ms ease;
}

.rr-gallery__display--has-bg::before {
	opacity: 0.85;
}

.rr-gallery__display:focus {
	box-shadow: 0 0 0 3px rgba(255,255,255,0.15), 0 25px 45px rgba(0,0,0,0.25);
}

.rr-gallery__display-img {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.35));
}

.rr-gallery__display-video {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	background: #000;
	border-radius: inherit;
}

.rr-gallery__thumbs {
	display: flex;
	gap: 10px;
	margin-top: 15px;
	flex-wrap: wrap;
}

.rr-gallery__thumb {
	position: relative;
	border: 2px solid transparent;
	padding: 0;
	background: none;
	cursor: pointer;
	border-radius: 4px;
	width: 70px;
	height: 70px;
	overflow: hidden;
}

.rr-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rr-gallery__thumb--active {
	border-color: #333;
}

.rr-gallery__thumb--video::after {
	content: '▶';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: rgba(255,255,255,0.9);
	font-size: 20px;
	text-shadow: 0 0 10px rgba(0,0,0,0.4);
	pointer-events: none;
}

.rr-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	visibility: hidden;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 120ms ease;
	padding: 40px;
}

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

.rr-lightbox img {
	max-width: 95vw;
	max-height: 95vh;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0,0,0,0.45);
	border-radius: 6px;
}

.rr-lightbox__video {
	width: 96vw;
	height: 96vh;
	object-fit: contain;
	background: #000;
}

.rr-lightbox__close {
	position: absolute;
	top: 20px;
	right: 30px;
	font-size: 34px;
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
}

@media screen and (max-width: 650px) {
	.rr-gallery {
		flex-direction: column;
	}

	.rr-gallery__thumb {
		width: 60px;
		height: 60px;
	}
}
