/**
 * Embeds: `mt-10 grid gap-8 lg:grid-cols-2`; a frame `relative aspect-video
 * rounded-xl border border-white/15`, the poster at 60% opacity, the play
 * button over all of it, its disc `h-16 w-16 rounded-full` in the brand red
 * with the icon `h-7 w-7`; the caption `mt-4` white/80, its link
 * underlined.
 *
 * The button carries two classes per rule: the kit's Theme Style reaches
 * button elements.
 */

.sba-c-media-embeds .sba-c-embeds {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.sba-c .sba-c-embed-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.15);
	border-radius: 12px;
	background-color: var(--sba-footer-bg);
}

.sba-c .sba-c-embed-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0.6;
}

.sba-c .sba-c-embed-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sba-c-embed-play.sba-c-embed-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: none;
	box-shadow: none;
	cursor: pointer;
}

.sba-c-embed-play.sba-c-embed-play:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

.sba-c .sba-c-embed-disc {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	background-color: var(--sba-red);
	color: #fff;
}

.sba-c .sba-c-embed-disc .sba-i {
	margin-left: 2px;
	font-size: 28px;
	line-height: 1;
}

.sba-c-media-embeds .sba-c-embed-caption {
	margin-top: 16px;
	color: rgb(255 255 255 / 0.8);
	font-size: 16px;
	line-height: 24px;
}

.sba-c-media-embeds .sba-c-embed-caption p {
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.sba-c-media-embeds .sba-c-embed-caption a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.sba-c-media-embeds .sba-c-embed-caption a:hover {
	color: #fff;
}

/* Beside a text (Home's film): `grid lg:grid-cols-2 gap-10 items-center`,
   the heading `text-2xl md:text-3xl font-bold text-balance`, the text
   `mt-4` white/80. A single embed takes the width, `mt-8` under the header.
   Links under the embeds `mt-5 text-sm` white/80, underlined. */
.sba-c-media-embeds .sba-c-embeds-side {
	align-items: center;
	gap: 40px;
}

.sba-c-media-embeds .sba-c-embeds-title {
	margin: 0;
	color: #fff;
	font-family: var(--sba-font-sans);
	font-size: 24px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 32px;
	text-wrap: balance;
}

.sba-c-media-embeds .sba-c-embeds-text p {
	margin: 16px 0 0;
	color: rgb(255 255 255 / 0.8);
	font-size: 16px;
	line-height: 24px;
}

.sba-c-media-embeds .sba-c-section-header + .sba-c-embeds-single {
	margin-top: 32px;
}

.sba-c-media-embeds .sba-c-embeds + .sba-c-links {
	margin-top: 20px;
}

.sba-c-media-embeds .sba-c-links .sba-c-link {
	color: rgb(255 255 255 / 0.8);
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.sba-c-media-embeds .sba-c-links .sba-c-link:hover {
	color: #fff;
}

@media (min-width: 768px) {
	.sba-c-media-embeds .sba-c-embeds-title {
		font-size: 30px;
		line-height: 36px;
	}
}

@media (min-width: 1024px) {
	.sba-c-media-embeds .sba-c-embeds {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sba-c-media-embeds .sba-c-embeds-single {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The slideshow: the whole viewport on near-black, a bar with the
   slideshow's name, the count and the close button, the photo contained
   in what is left; previous and next at the sides from 768px, side by side
   under the photo below. The buttons carry two classes for the same reason
   as the play button. */
html.sba-c-slideshow-open {
	overflow: hidden;
}

.sba-c-slideshow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background-color: #0a0a0a;
	color: #fff;
}

.sba-c-slideshow[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
}

.sba-c-slideshow::backdrop {
	background-color: rgb(0 0 0 / 0.6);
}

.sba-c-slideshow-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
}

.sba-c-slideshow .sba-c-slideshow-title,
.sba-c-slideshow .sba-c-slideshow-count {
	margin: 0;
	color: rgb(255 255 255 / 0.8);
	font-size: 14px;
	line-height: 20px;
}

.sba-c-slideshow .sba-c-slideshow-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sba-c-slideshow .sba-c-slideshow-count {
	font-variant-numeric: tabular-nums;
}

.sba-c-slideshow-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0 16px 80px;
}

.sba-c-slideshow-stage img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	user-select: none;
	-webkit-user-select: none;
}

.sba-c-slideshow-close.sba-c-slideshow-close,
.sba-c-slideshow-prev.sba-c-slideshow-prev,
.sba-c-slideshow-next.sba-c-slideshow-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background-color: rgb(255 255 255 / 0.1);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.sba-c-slideshow-close.sba-c-slideshow-close {
	flex: none;
	width: 40px;
	height: 40px;
	font-size: 20px;
}

.sba-c-slideshow-prev.sba-c-slideshow-prev,
.sba-c-slideshow-next.sba-c-slideshow-next {
	position: absolute;
	bottom: 16px;
	width: 48px;
	height: 48px;
	font-size: 24px;
}

.sba-c-slideshow-prev.sba-c-slideshow-prev {
	left: calc(50% - 56px);
}

.sba-c-slideshow-next.sba-c-slideshow-next {
	right: calc(50% - 56px);
}

.sba-c-slideshow button:hover {
	background-color: rgb(255 255 255 / 0.2);
}

.sba-c-slideshow button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sba-c-slideshow .sba-i {
	line-height: 1;
}

@media (min-width: 768px) {
	.sba-c-slideshow-bar {
		padding: 16px 24px;
	}

	.sba-c-slideshow-stage {
		padding: 0 96px 24px;
	}

	.sba-c-slideshow-prev.sba-c-slideshow-prev,
	.sba-c-slideshow-next.sba-c-slideshow-next {
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
	}

	.sba-c-slideshow-prev.sba-c-slideshow-prev {
		left: 24px;
	}

	.sba-c-slideshow-next.sba-c-slideshow-next {
		right: 24px;
	}
}

/* Filmstrip (SBD's Home): the large photo in a 3:2 frame with the embed
   frame's border and corners, the slideshow's round buttons on it, darker
   for a light photo: full size top right, previous and next bottom right,
   the count bottom left in a pill of the same. The rail under it scrolls
   sideways, two and a half photos wide, three and a half from 640px; from
   1024px it stands beside the photo, a quarter of the width, as high as
   the photo, and scrolls down. The photo not shown at 60% opacity, the one
   shown framed in the brand red. */
.sba-c-media-embeds .sba-c-filmstrip {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.sba-c .sba-c-filmstrip-frame {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.15);
	border-radius: 12px;
	background-color: var(--sba-footer-bg);
}

.sba-c .sba-c-filmstrip-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.sba-c-filmstrip-open.sba-c-filmstrip-open,
.sba-c-filmstrip-prev.sba-c-filmstrip-prev,
.sba-c-filmstrip-next.sba-c-filmstrip-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background-color: rgb(29 33 43 / 0.6);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.sba-c-filmstrip-open.sba-c-filmstrip-open {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	font-size: 20px;
}

.sba-c-media-embeds .sba-c-filmstrip-nav {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	gap: 8px;
}

.sba-c-filmstrip-prev.sba-c-filmstrip-prev,
.sba-c-filmstrip-next.sba-c-filmstrip-next {
	width: 44px;
	height: 44px;
	font-size: 24px;
}

.sba-c-filmstrip button:hover {
	background-color: rgb(29 33 43 / 0.85);
}

.sba-c-filmstrip button:focus-visible,
.sba-c-media-embeds .sba-c-filmstrip-thumb:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sba-c-filmstrip .sba-i {
	line-height: 1;
}

.sba-c-media-embeds .sba-c-filmstrip-count {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 4px 12px;
	border-radius: 9999px;
	background-color: rgb(29 33 43 / 0.6);
	color: #fff;
	font-size: 14px;
	line-height: 20px;
	font-variant-numeric: tabular-nums;
}

.sba-c-media-embeds .sba-c-filmstrip-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 2 * 12px) / 2.5);
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior: contain;
	scroll-snap-type: x proximity;
	scrollbar-color: rgb(255 255 255 / 0.3) transparent;
	scrollbar-width: thin;
}

.sba-c-media-embeds .sba-c-filmstrip-rail li {
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

.sba-c-filmstrip-thumb.sba-c-filmstrip-thumb {
	position: relative;
	display: block;
	width: 100%;
	min-height: 0;
	aspect-ratio: 3 / 2;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 8px;
	background-color: var(--sba-footer-bg);
	box-shadow: none;
	cursor: pointer;
}

.sba-c-media-embeds .sba-c-filmstrip-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0.6;
	transition: opacity 0.15s ease;
}

.sba-c-media-embeds .sba-c-filmstrip-thumb:hover img,
.sba-c-media-embeds .sba-c-filmstrip-thumb[aria-current] img {
	opacity: 1;
}

.sba-c-media-embeds .sba-c-filmstrip-thumb[aria-current]::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 3px solid var(--sba-red);
	border-radius: inherit;
	pointer-events: none;
}

@media (min-width: 640px) {
	.sba-c-media-embeds .sba-c-filmstrip-rail {
		grid-auto-columns: calc((100% - 3 * 12px) / 3.5);
	}
}

@media (min-width: 768px) {
	.sba-c-filmstrip-open.sba-c-filmstrip-open {
		top: 16px;
		right: 16px;
	}

	.sba-c-media-embeds .sba-c-filmstrip-nav {
		right: 16px;
		bottom: 16px;
	}

	.sba-c-media-embeds .sba-c-filmstrip-count {
		left: 16px;
		bottom: 24px;
	}

	.sba-c-filmstrip-prev.sba-c-filmstrip-prev,
	.sba-c-filmstrip-next.sba-c-filmstrip-next {
		width: 48px;
		height: 48px;
	}
}

/* Beside the photo the rail lies over its column, out of the flow, so the
   photo alone sets the row's height and the rail scrolls within it.
   (contain: size on the rail did that in Chrome, not in Safari.) */
@media (min-width: 1024px) {
	.sba-c-media-embeds .sba-c-filmstrip {
		grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
		gap: 20px;
	}

	.sba-c-media-embeds .sba-c-filmstrip-side {
		position: relative;
	}

	.sba-c-media-embeds .sba-c-filmstrip-rail {
		position: absolute;
		inset: 0;
		grid-auto-flow: row;
		grid-auto-columns: auto;
		overflow-x: hidden;
		overflow-y: auto;
		padding-right: 4px;
		scroll-snap-type: y proximity;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sba-c-slideshow button,
	.sba-c-filmstrip button,
	.sba-c-media-embeds .sba-c-filmstrip-thumb img {
		transition: none;
	}
}
