/* Workshop Reel 1.3.0 */

.wr {
	--wr-card: clamp(180px, 22vw, 260px);
	--wr-gap: 12px;
	--wr-radius: 10px;
	position: relative;
	margin: 0 0 1.5rem;
}

.wr-track {
	display: flex;
	gap: var(--wr-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 2px 0;
}

.wr-track::-webkit-scrollbar { display: none; }

.wr-card {
	position: relative;
	flex: 0 0 var(--wr-card);
	width: var(--wr-card);
	aspect-ratio: 9 / 16;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wr-radius);
	background: #14161a;
	scroll-snap-align: start;
}

.wr-card video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #14161a;
}

/* Tap target covers the whole clip. Invisible until the clip is paused. */
.wr-tap {
	position: absolute;
	inset: 0;
	width: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.wr-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	opacity: 0;
	transition: opacity .15s linear;
}

.wr-btn::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent #fff;
}

.wr-card.is-paused .wr-btn { opacity: 1; }
.wr-tap:focus-visible .wr-btn { opacity: 1; }

/*
 * Click to play mode. The poster is doing the selling, so it only gets a
 * light scrim, enough to hold the play button against a bright workshop
 * shot. The scrim and the button both clear the moment the clip runs.
 */
.wr-click .wr-card.is-paused .wr-tap {
	background: linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .14));
}

.wr-click .wr-btn {
	width: 62px;
	height: 62px;
	margin: -31px 0 0 -31px;
	background: rgba(0, 0, 0, .62);
	box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

@media (hover: hover) {
	.wr-click .wr-card.is-paused:hover .wr-btn { background: rgba(0, 0, 0, .82); }
}

.wr-mute {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .5);
	cursor: pointer;
}

.wr-card figcaption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 28px 10px 10px;
	font-size: 13px;
	line-height: 1.3;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.wr-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 38px;
	height: 38px;
	margin-top: -19px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	font-size: 17px;
	line-height: 1;
	color: #fff;
	background: rgba(20, 22, 26, .8);
	cursor: pointer;
	transition: opacity .15s linear;
}

.wr-prev { left: -6px; }
.wr-next { right: -6px; }

.wr-nav[hidden] { display: none; }

/* No hover state on touch, so keep the arrows visible there. */
@media (hover: hover) {
	.wr-nav { opacity: 0; }
	.wr:hover .wr-nav,
	.wr-nav:focus-visible { opacity: 1; }
}

.wr-tap:focus-visible,
.wr-mute:focus-visible,
.wr-nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

@media (prefers-reduced-motion: reduce) {
	.wr-track { scroll-behavior: auto; }
	.wr-btn { transition: none; }
}
