/**
 * Document viewer popup: active-file states only (visual styling lives on the
 * Bricks elements in the "Document viewer" popup template).
 * Lives in bricks-child/assets/css/.
 */
.hv-viewer .hv-slide,
.hv-viewer .hv-file-detail {
	display: none;
}

.hv-viewer .hv-slide.is-active {
	display: flex;
}

.hv-viewer .hv-file-detail.is-active {
	display: flex;
}

.hv-viewer .hv-thumb {
	opacity: 0.5;
	outline: 2px solid transparent;
	outline-offset: 2px;
	transition: opacity 0.2s ease, outline-color 0.2s ease;
	cursor: pointer;
}

.hv-viewer .hv-thumb:hover,
.hv-viewer .hv-thumb:focus-visible {
	opacity: 0.85;
}

.hv-viewer .hv-thumb.is-active {
	opacity: 1;
	outline-color: var(--accent);
}

[data-hv-open],
.hv-viewer [data-hv-step],
.hv-viewer [data-hv-close] {
	cursor: pointer;
}

/* Video slides: native player filling the stage. */
.hv-viewer .hv-video {
	width: 100%;
	height: 100%;
}

.hv-viewer .hv-video video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

/* Play badge on video thumbnails. */
.hv-viewer .hv-thumb[data-hv-video="1"] {
	position: relative;
}

.hv-viewer .hv-thumb[data-hv-video="1"]::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-40%, -50%);
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* Hover magnifier (desktop): covers the stage, panned by heirloom-viewer.js. */
.hv-viewer .hv-zoom {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-color: #181512;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.hv-viewer .hv-zoom.is-active {
	opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
	.hv-viewer .hv-slide.is-active img {
		cursor: zoom-in;
	}
}

/* While a Bricks popup is open, Bricks locks page scrolling (body.no-scroll),
   but <html> still shows a scrollbar that can't move. Hide it as well. */
html:has(body.no-scroll) {
	overflow: hidden;
}

/* Phones: pin the viewer popup to the screen edges and start it at the top
   (Bricks centres a popup sized from a saved viewport height, which on
   iPhone Safari can leave a gap above it). */
@media (max-width: 767px) {
	.brxe-popup-457 {
		inset: 0 !important;
		height: auto !important;
		justify-content: flex-start !important;
	}

	.brxe-popup-457 .brx-popup-content {
		height: 100% !important;
	}

	.brxe-popup-457 .hv-viewer {
		overscroll-behavior: contain;
	}
}
