/* EP Video Library
 * Override any of these custom properties from your theme, e.g.
 * .epvl { --epvl-accent: #8a1c1c; --epvl-panel: #161616; --epvl-side: 380px; }
 *
 * Accent: the color set in Videos > Settings, otherwise the theme's accent
 * color, otherwise light green.
 */
.epvl {
	/* Settings accent or Salient's accent (set by the plugin), else the theme's CSS variables, else light green. */
	--epvl-accent: var(--epvl-site-accent, var(--nectar-accent-color, var(--wp--preset--color--accent, var(--wp--preset--color--accent-1, #90ee90))));
	--epvl-accent-ink: var(--epvl-site-ink, #111);
	--epvl-side: 360px;
	--epvl-radius: 8px;
	--epvl-panel: #1c1c1c;        /* side and bottom panels */
	--epvl-panel-text: #f2f2f2;
	--epvl-border: rgba(255, 255, 255, .1);
	--epvl-muted: rgba(255, 255, 255, .62);
	--epvl-hover: rgba(255, 255, 255, .06);
	box-sizing: border-box;
	margin: 0;
	color: inherit;
	font: inherit;
}
.epvl *, .epvl *::before, .epvl *::after { box-sizing: inherit; }
.epvl-wrap { container: epvl / inline-size; margin: 0; }
.epvl-wrap > .epvl { margin: 0; }
.epvl ul { list-style: none; margin: 0; padding: 0; }
/* Themes (Salient) put bullets and margins on content list items. */
.epvl ul > li { list-style: none !important; margin: 0 !important; padding-left: 0 !important; }
.epvl ul > li::before, .epvl ul > li::marker { content: none !important; display: none !important; }
.epvl li { margin: 0; padding: 0; }
.epvl a { text-decoration: none; color: inherit; }

.epvl-sr {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- Player */

.epvl-player {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}
.epvl-player > .epvl-facade,
.epvl-player > iframe,
.epvl-player > video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	border: 0; margin: 0; padding: 0;
	display: block;
}
.epvl-player > video { background: #000; }

.epvl-facade {
	background: #000;
	cursor: pointer;
	color: #fff;
	font: inherit;
	border-radius: 0;
	-webkit-appearance: none; appearance: none;
}
.epvl-facade:disabled { cursor: default; }
.epvl .epvl-poster {
	position: absolute !important; inset: 0 !important;
	width: 100% !important; height: 100% !important;
	max-width: none !important; max-height: none !important;
	margin: 0 !important; border: 0 !important; border-radius: 0 !important;
	object-fit: contain; object-position: center;
	display: block;
}

.epvl-play {
	position: absolute; left: 50%; top: 50%;
	width: clamp(56px, 9vw, 92px); aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 2px solid #fff;
	background: rgba(0, 0, 0, .35);
	transition: background-color .2s, transform .2s;
}
.epvl-play::after {
	content: "";
	position: absolute; left: 54%; top: 50%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: .55em 0 .55em .9em;
	border-color: transparent transparent transparent #fff;
	font-size: clamp(16px, 2.6vw, 26px);
	filter: drop-shadow(0 0 8px rgba(0, 0, 0, .35)); /* stays visible on light accents */
}
.epvl-facade:hover .epvl-play,
.epvl-facade:focus-visible .epvl-play {
	background: color-mix(in srgb, var(--epvl-accent) 50%, transparent); /* light green fallback = #90ee9080 */
	border-color: var(--epvl-accent);
	transform: translate(-50%, -50%) scale(1.06);
}
.epvl-facade:focus-visible { outline: 3px solid var(--epvl-accent); outline-offset: -3px; }

.epvl-caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 2.5em 1em .8em;
	background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
	text-align: left;
	pointer-events: none;
}
.epvl-caption-title {
	display: block;
	font-weight: 700;
	font-size: clamp(1rem, 2vw, 1.35rem);
	line-height: 1.25;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.epvl-caption-meta { display: block; font-size: .85rem; opacity: .9; margin-top: .2em; }

/* ----------------------------------------------------------- Playlist tiles */

.epvl-tile {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: #2c2c2c;
	text-align: center;
	border-radius: 0;
}
.epvl a.epvl-tile { color: #fff; }
.epvl .epvl-tile img {
	position: absolute !important; inset: 0 !important;
	width: 100% !important; height: 100% !important;
	max-width: none !important; margin: 0 !important; border-radius: 0 !important;
	object-fit: cover; display: block;
	transition: transform .35s ease;
}
.epvl-tile::after { /* keeps the name readable on any photo */
	content: ""; position: absolute; inset: 0;
	background: rgba(0, 0, 0, .42);
	transition: background-color .2s;
}
.epvl-tile-name {
	position: relative; z-index: 1;
	padding: 0 1em;
	font-weight: 700;
	font-size: clamp(1.05rem, 4.5vw, 1.35rem);
	line-height: 1.2;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
/* Video count badge (playlists with 2+ videos) */
.epvl-tile-count {
	position: absolute; top: 6px; right: 6px; z-index: 2;
	display: inline-flex; align-items: center; justify-content: center; gap: .3em;
	min-width: 1.9em; height: 1.9em; padding: 0 .55em;
	box-sizing: border-box;
	border-radius: 999px;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	font-size: .72rem; font-weight: 400; line-height: 1;
	font-variant-numeric: tabular-nums;
	text-shadow: none;
	pointer-events: none;
}
.epvl-tile-count svg { width: .8em; height: .8em; flex: none; }
.epvl-tile:hover img { transform: scale(1.05); }
.epvl-tile:hover::after { background: rgba(0, 0, 0, .3); }
.epvl-tile:focus-visible { outline: 3px solid var(--epvl-accent); outline-offset: 3px; }
.epvl-tile.is-active::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
	background: var(--epvl-accent); z-index: 2;
}

/* --------------------------------------------------------- Playlist sidebar */

.epvl-tiles,
.epvl-side {
	background: var(--epvl-panel);
	color: var(--epvl-panel-text);
}
.epvl .epvl-side a,
.epvl .epvl-side h3 { color: var(--epvl-panel-text); }

.epvl-side-head {
	display: flex; align-items: center; gap: .6em;
	padding: .85em 1em;
	border-bottom: 1px solid var(--epvl-border);
}
.epvl-side-title { margin: 0; font-size: 1.1rem; line-height: 1.3; font-weight: 700; }
/* Theme heading rules (margins, tall line-heights) would push the title off-center. */
.epvl .epvl-side-head .epvl-side-title {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.15 !important;
	display: flex;
	align-items: center;
	gap: .3em;
	min-height: 2.25em;          /* same height as the back arrow, so both center */
	flex: 1 1 auto;
	min-width: 0;
	/* One line only: a long name runs under the Autoplay switch and fades out there. */
	white-space: nowrap;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 200px), rgba(0, 0, 0, .1) calc(100% - 100px), transparent 100%);
	        mask-image: linear-gradient(to right, #000 calc(100% - 200px), rgba(0, 0, 0, .1) calc(100% - 100px), transparent 100%);
}
.epvl-side-hint { display: none; }

.epvl-back {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.25em; height: 2.25em; margin: -.4em 0 -.4em -.4em;
	border-radius: 50%;
	flex: none;
}
.epvl-back:hover, .epvl-back:focus-visible { background: var(--epvl-hover); }
/* The whole header row is the back button (stretched link). */
.epvl-side-head { position: relative; }
/* z-index keeps the stretched link above the title (its fade mask makes its own layer). */
.epvl-back::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.epvl .epvl-side-head .epvl-side-title { pointer-events: none; }
.epvl-side-head:has(.epvl-back:hover) { background: var(--epvl-hover); cursor: pointer; }

/* "Choose a Playlist" bar above the tiles (stacked layout only) */
.epvl-tiles-head {
	padding: .6em 1em;
	background: #111;
	color: rgba(255, 255, 255, .85);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	line-height: 1.3;
	text-align: center;
	border-bottom: 1px solid var(--epvl-border);
}
.epvl-back-arrow {
	display: inline-block;
	width: 0; height: 0;
	border-style: solid;
	border-width: .5em .7em .5em 0;
	border-color: transparent currentColor transparent transparent;
}

.epvl-list { position: relative; }
.epvl-item {
	display: grid;
	grid-template-columns: minmax(96px, 38%) 1fr;
	align-items: center;
	gap: .9em;
	padding: .6em 1em;
	border-bottom: 1px solid var(--epvl-border);
	border-left: 4px solid transparent;
	transition: background-color .15s;
}
.epvl-item:hover { background: var(--epvl-hover); }
.epvl-item:focus-visible { outline: 3px solid var(--epvl-accent); outline-offset: -3px; }
.epvl-item.is-active {
	border-left-color: var(--epvl-accent);
	background: color-mix(in srgb, var(--epvl-accent) 16%, transparent);
}
.epvl-thumb {
	position: relative; display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: calc(var(--epvl-radius) - 3px);
	background: #2c2c2c;
}
.epvl .epvl-thumb img {
	position: absolute !important; inset: 0 !important;
	width: 100% !important; height: 100% !important;
	max-width: none !important; margin: 0 !important;
	object-fit: cover; display: block;
}
.epvl-text { min-width: 0; }
.epvl-item-title {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
	overflow: hidden;
	font-weight: 700; font-size: 1.05rem; line-height: 1.25;
}
.epvl-item-meta { display: block; font-size: .85rem; color: var(--epvl-muted); margin-top: .25em; }

/* ------------------------------------------------------- Mobile (default) */

.epvl-tile-list { display: grid; gap: 10px; padding: 10px; }
.epvl-side-label { display: none; }

.epvl[data-view="tiles"] .epvl-side { display: none; }
.epvl[data-view="list"] .epvl-tiles { display: none; }

/* Stacked layout with room for two columns (iPad portrait) */
@container epvl (min-width: 600px) {
	.epvl-tile-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.epvl-tile { aspect-ratio: 16 / 9; }
	.epvl-tile-name { font-size: 1.15rem; }
	/* 1px gap shows the border color between the two columns */
	.epvl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1px;
		background: linear-gradient(var(--epvl-border), var(--epvl-border)) 50% 0 / 1px 100% no-repeat, var(--epvl-panel); }
	.epvl-list > li { background: var(--epvl-panel); }
	.epvl-list > .epvl-live-li { grid-column: 1 / -1; }
	.epvl-item { grid-template-columns: minmax(96px, 42%) 1fr; }
}

/* -------------------------------------------------------------- Desktop */

/* The layout follows the width of the space the library sits in (not the
 * screen), so it also works inside a narrow theme column. */
/* Wide AND (landscape OR mouse): an iPad in portrait keeps the stacked layout. */
@media (orientation: landscape), (hover: hover) and (pointer: fine) {
@container epvl (min-width: 820px) {
	.epvl {
		display: grid;
		grid-template-columns: minmax(0, 1fr) var(--epvl-side);
		grid-template-areas:
			"stage side"
			"tiles side";
		border-radius: 0;
		overflow: hidden;
		background: var(--epvl-panel);
	}
	.epvl-stage { grid-area: stage; }

	/* Keep the player short enough that the playlist tiles stay on screen on wide
	 * browsers. Extra width shows as black bars beside the video.
	 * --epvl-chrome = room left for the tile row plus your site header. */
	.epvl-stage { background: #000; }
	.epvl-player {
		margin: 0 auto;
		max-height: max(360px, calc(100vh - var(--epvl-chrome, 270px)));
		max-height: max(360px, calc(100svh - var(--epvl-chrome, 270px)));
	}

	.epvl .epvl-tiles,
	.epvl[data-view] .epvl-tiles {
		display: block;
		grid-area: tiles;
		min-width: 0;
		border-top: 1px solid var(--epvl-border);
	}
	.epvl-tile-list {
		display: flex; gap: var(--epvl-tile-gap, 4px);
		padding: var(--epvl-tile-gap, 4px);
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
	}
	.epvl-tile-list > li { flex: 0 0 clamp(180px, 18vw, 240px); scroll-snap-align: start; }
	.epvl-tile { aspect-ratio: 16 / 9; }
	.epvl-tile-name { font-size: 1.05rem; }

	/* The sidebar takes the height of the player + tiles and scrolls inside. */
	.epvl .epvl-side,
	.epvl[data-view] .epvl-side {
		display: block;
		grid-area: side;
		position: relative;
		border-left: 1px solid var(--epvl-border);
	}
	.epvl-side-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
	.epvl-list { display: block; background: none; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; }
	.epvl-back { display: none; }
	.epvl-tiles-head { display: none; }
	.epvl-side-head { height: 60px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; }

	.epvl-item { grid-template-columns: 96px 1fr; gap: .75em; padding: .55em .8em; }
	.epvl-item-title { font-size: .95rem; }
	.epvl-item-meta { font-size: .78rem; }
}
}

@media (orientation: landscape), (hover: hover) and (pointer: fine) {
@container epvl (min-width: 1300px) {
	.epvl { --epvl-side: 400px; }
	.epvl-item { grid-template-columns: 112px 1fr; }
}
}

/* ---------------------------------------- Desktop: collapsible playlist panel
 * On devices with a mouse, the playlist panel rests as a narrow thumbnail
 * column. It slides open over the right edge of the player on hover, keyboard
 * focus, or for a moment after a playlist is chosen, so the video never resizes.
 * Touch screens keep the full panel. Turn it off with:
 *   .epvl { --epvl-rail: var(--epvl-side); }
 */
@media (hover: hover) and (pointer: fine) {
	@container epvl (min-width: 820px) {
		.epvl {
			--epvl-rail: 152px;
			grid-template-columns: minmax(0, 1fr) var(--epvl-rail);
		}
		.epvl .epvl-side,
		.epvl[data-view] .epvl-side { z-index: 5; }

		.epvl-side-inner {
			left: auto;
			right: 0;
			width: var(--epvl-rail);
			overflow: hidden;
			background: var(--epvl-panel);
			transition: width .2s ease, box-shadow .2s ease; /* closes right away */
		}
		.epvl-side:hover .epvl-side-inner,
		.epvl-side:focus-within .epvl-side-inner,
		.epvl.is-side-open .epvl-side-inner {
			width: var(--epvl-side);
			box-shadow: -12px 0 28px rgba(0, 0, 0, .5);
			transition-delay: .12s; /* small pause before opening */
		}

		/* Content keeps its full width, so opening just reveals the titles. */
		.epvl-side-head,
		.epvl-list > li { width: var(--epvl-side); }
		.epvl-list { overflow-x: hidden; }
		.epvl-item { grid-template-columns: 124px 1fr; }

		/* Collapsed: hide the clipped heading and show an "open" hint instead. */
		.epvl-side-head { position: relative; height: 60px; }
		.epvl-side-title,
		.epvl-autoplay { opacity: 0; transition: opacity .15s ease; }
		.epvl-side-hint {
			position: absolute;
			left: 0; top: 0; bottom: 0;
			width: var(--epvl-rail);
			display: flex;
			align-items: center;
			justify-content: center;
			gap: .55em;
			font-size: .8rem;
			font-weight: 700;
			letter-spacing: .1em;
			text-transform: uppercase;
			opacity: .8;
			pointer-events: none;
			transition: opacity .15s ease;
		}
		.epvl-side-hint::before {
			content: "";
			width: 7px; height: 7px;
			border-left: 2px solid currentColor;
			border-bottom: 2px solid currentColor;
			transform: rotate(45deg);
			margin-left: 3px;
		}
		.epvl-side:hover .epvl-side-title,
		.epvl-side:focus-within .epvl-side-title,
		.epvl.is-side-open .epvl-side-title,
		.epvl-side:hover .epvl-autoplay,
		.epvl-side:focus-within .epvl-autoplay,
		.epvl.is-side-open .epvl-autoplay { opacity: 1; transition-delay: .25s; }
		.epvl-side:hover .epvl-side-hint,
		.epvl-side:focus-within .epvl-side-hint,
		.epvl.is-side-open .epvl-side-hint { opacity: 0; }
	}
}

/* Part X of X */
.epvl-item-part,
.epvl-caption-part {
	display: block;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--epvl-accent);
	margin-bottom: .2em;
}
.epvl-caption-part { font-size: .75rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }

/* Autoplay switch (in the playlist header) */
.epvl-autoplay {
	position: absolute;         /* sits over the end of the title, which fades out beneath it */
	right: 1em;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;                 /* above the title and the full-row back link */
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .3em 0 .3em .5em;
	border: 0;
	background: none;
	color: var(--epvl-panel-text);
	font: inherit;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	cursor: pointer;
	flex: none;
	-webkit-appearance: none; appearance: none;
}
.epvl-ap-track {
	position: relative;
	width: 34px; height: 18px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .25);
	transition: background-color .15s;
}
.epvl-ap-knob {
	position: absolute; top: 2px; left: 2px;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}
.epvl-autoplay[aria-checked="true"] .epvl-ap-track { background: var(--epvl-accent); }
.epvl-autoplay[aria-checked="true"] .epvl-ap-knob { transform: translateX(16px); }
.epvl-autoplay:focus-visible { outline: 2px solid var(--epvl-accent); outline-offset: 2px; border-radius: 4px; }

/* "Up next" countdown */
.epvl-player > .epvl-upnext {
	position: absolute; inset: 0;
	z-index: 5;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	text-align: center;
}
.epvl-upnext-card { display: flex; flex-direction: column; align-items: center; gap: .35em; padding: 1em; max-width: 90%; }
.epvl-upnext-label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.epvl-upnext-part { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--epvl-accent); }
.epvl-upnext-title { font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 700; line-height: 1.2; }
.epvl-upnext-count { font-size: .85rem; opacity: .85; }
.epvl-upnext-actions { display: flex; gap: .6em; margin-top: .5em; }
.epvl-upnext-actions button {
	padding: .5em 1.1em;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 3px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none; appearance: none;
}
.epvl-upnext-actions .epvl-upnext-go { background: #fff; color: #111; border-color: #fff; }
.epvl-upnext-actions button:focus-visible { outline: 2px solid var(--epvl-accent); outline-offset: 2px; }

/* Share button + "Link copied" */
.epvl-stage { position: relative; }
.epvl-stage > .epvl-share {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	cursor: pointer;
	transition: background-color .15s, opacity .2s;
	-webkit-appearance: none; appearance: none;
}
.epvl-stage > .epvl-share:hover,
.epvl-stage > .epvl-share:focus-visible { background: rgba(0, 0, 0, .85); opacity: 1; }
.epvl-stage:has(.is-playing) > .epvl-share { opacity: .45; }
.epvl-stage > .epvl-toast {
	position: absolute;
	top: 18px;
	right: 60px;
	z-index: 4;
	padding: .35em .8em;
	border-radius: 3px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: .85rem;
	line-height: 1.3;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}
.epvl-stage > .epvl-toast.is-on { opacity: 1; }

/* Skip intro */
.epvl-player > .epvl-skip {
	position: absolute;
	right: 14px;
	bottom: 58px;           /* above the video controls */
	z-index: 3;
	padding: .55em 1.1em;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 3px;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none; appearance: none;
}
.epvl-player > .epvl-skip:hover,
.epvl-player > .epvl-skip:focus-visible { background: rgba(0, 0, 0, .85); border-color: #fff; }
.epvl-player > .epvl-skip[hidden] { display: none; }

/* Live stream */
.epvl-live-badge {
	display: inline-flex; align-items: center; gap: .4em;
	padding: .2em .55em .2em .5em;
	border-radius: 3px;
	background: #d32f2f;
	color: #fff;
	font-size: .72rem; font-weight: 700; letter-spacing: .08em; line-height: 1.3;
	text-transform: uppercase;
	text-shadow: none;
}
.epvl-live-badge::before {
	content: ""; width: .5em; height: .5em; border-radius: 50%;
	background: #fff;
	animation: epvl-pulse 1.6s ease-in-out infinite;
}
@keyframes epvl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.epvl-caption .epvl-live-badge { margin-bottom: .45em; }
.epvl-thumb .epvl-live-badge { position: absolute; left: 6px; top: 6px; font-size: .62rem; z-index: 1; }

/* Sticky player (stacked layout only; positioned by epvl.js) */
.epvl-stage.is-stuck { box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.epvl-stage-ph { display: block; }
/* Phones: pinned with CSS sticky (offsets set by the script) */
.epvl.epvl-css-stick-player .epvl-stage { position: sticky; top: var(--epvl-stick-top, 0px); z-index: 90; }
.epvl.epvl-css-sticky .epvl-tiles-head,
.epvl.epvl-css-sticky .epvl-side-head { position: sticky; top: var(--epvl-bar-top, 0px); z-index: 89; }
.epvl.epvl-css-sticky .epvl-side-head { background: var(--epvl-panel); }
.epvl.epvl-css-sticky .epvl-side-head:has(.epvl-back:hover) { background: linear-gradient(var(--epvl-hover), var(--epvl-hover)), var(--epvl-panel); }
/* Playlist bars pinned under the player on phones */
.epvl-bar-ph { display: block; }
.epvl-tiles-head.is-stuck,
.epvl-side-head.is-stuck { box-sizing: border-box; box-shadow: 0 6px 12px rgba(0, 0, 0, .35); }
.epvl-side-head.is-stuck { background: var(--epvl-panel); }
.epvl-side-head.is-stuck:has(.epvl-back:hover) { background: linear-gradient(var(--epvl-hover), var(--epvl-hover)), var(--epvl-panel); }

/* ---------------------------------------------------- Single video page */

.epvl-single { display: block; border: 0; }
.epvl-single .epvl-player { border-radius: 0; }
.epvl-single-back { margin: .9em 0 0; }
.epvl-single-back a { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; color: var(--epvl-accent); }

@media (prefers-reduced-motion: reduce) {
	.epvl *, .epvl *::before, .epvl *::after { transition: none !important; }
}

/* ------------------------------------------- [ep_playlists] tile grid */

.epvl-grid-wrap { container: epvlgrid / inline-size; }
.epvl-grid-list {
	display: grid;
	grid-template-columns: 1fr;          /* phones: stacked */
	gap: var(--epvl-tile-gap, 4px);
}
.epvl-grid .epvl-tile { aspect-ratio: 2 / 1; }
@container epvlgrid (min-width: 540px) {      /* large phones, iPad portrait */
	.epvl-grid-list { grid-template-columns: repeat(min(2, var(--epvl-cols, 4)), minmax(0, 1fr)); }
	.epvl-grid .epvl-tile { aspect-ratio: 16 / 9; }
	.epvl-grid .epvl-tile-name { font-size: 1.05rem; }
}
@container epvlgrid (min-width: 820px) {      /* iPad landscape */
	.epvl-grid-list { grid-template-columns: repeat(min(3, var(--epvl-cols, 4)), minmax(0, 1fr)); }
}
@container epvlgrid (min-width: 1100px) {     /* desktop */
	.epvl-grid-list { grid-template-columns: repeat(var(--epvl-cols, 4), minmax(0, 1fr)); }
}

/* ------------------------------------- [ep_videos] grid, search, pager */

.epvl-vids-wrap { container: epvlvids / inline-size; margin: 0 0 2rem; }
.epvl-vids {
	--epvl-accent: var(--epvl-site-accent, var(--nectar-accent-color, var(--wp--preset--color--accent, var(--wp--preset--color--accent-1, #90ee90))));
	--epvl-accent-ink: var(--epvl-site-ink, #111);
}
.epvl-vids-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: .75rem 1.5rem; margin: 0 0 1rem;
}
.epvl-vids .epvl-vids-title { margin: 0 !important; padding: 0 !important; }
.epvl-vids-search { display: flex; align-items: stretch; gap: .5rem; flex: 0 1 26rem; min-width: 0; margin: 0; }
/* Same height for the field and the button, whatever the theme does to inputs and buttons. */
.epvl-vids .epvl-vids-search input[type="search"],
.epvl-vids .epvl-vids-search button {
	box-sizing: border-box !important;
	height: 2.6em !important; min-height: 0 !important; max-height: none !important;
	margin: 0 !important; font: inherit !important; line-height: 1.2 !important;
	box-shadow: none !important;
}
.epvl-vids .epvl-vids-search input[type="search"] {
	flex: 1 1 auto; min-width: 0;
	padding: 0 .8em !important;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent) !important;
	border-radius: 4px !important; background: transparent !important; color: inherit !important;
}
.epvl-vids .epvl-vids-search button {
	flex: none; display: inline-flex !important; align-items: center; justify-content: center;
	padding: 0 1.1em !important; font-weight: 600 !important; letter-spacing: normal !important; text-transform: none !important;
	border: 0 !important; border-radius: 4px !important; cursor: pointer;
	background: var(--epvl-accent) !important; color: var(--epvl-accent-ink) !important;
	transition: filter .15s;
}
.epvl-vids .epvl-vids-search button:hover { filter: brightness(.92); }
.epvl-vids-count, .epvl-vids-none { margin: 0 0 1rem; opacity: .75; }

.epvl-vids ul.epvl-vids-list {
	display: grid; grid-template-columns: 1fr; gap: 1.5rem 1rem;
	list-style: none !important; margin: 0 !important; padding: 0 !important;
}
.epvl-vids ul.epvl-vids-list > li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.epvl-vids ul.epvl-vids-list > li::before, .epvl-vids ul.epvl-vids-list > li::marker { content: none !important; display: none !important; }
@container epvlvids (min-width: 540px)  { .epvl-vids ul.epvl-vids-list { grid-template-columns: repeat(min(2, var(--epvl-cols, 4)), minmax(0, 1fr)); } }
@container epvlvids (min-width: 820px)  { .epvl-vids ul.epvl-vids-list { grid-template-columns: repeat(min(3, var(--epvl-cols, 4)), minmax(0, 1fr)); } }
@container epvlvids (min-width: 1100px) { .epvl-vids ul.epvl-vids-list { grid-template-columns: repeat(var(--epvl-cols, 4), minmax(0, 1fr)); } }

.epvl-vids a.epvl-vid { display: block; color: inherit; text-decoration: none; }
.epvl-vid-thumb {
	position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
	background: #1c1c1c; margin: 0 0 .55rem;
}
.epvl-vids .epvl-vid-thumb img {
	position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
	max-width: none !important; margin: 0 !important; border-radius: 0 !important;
	object-fit: cover; transition: transform .35s ease;
}
.epvl-vid-play {
	position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
	border-radius: 50%; background: rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .9);
	opacity: 0; transition: opacity .2s, background-color .2s;
}
.epvl-vid-play::after {
	content: ""; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -5px;
	border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff;
}
/* "Part 1 of 3" badge on series videos */
.epvl-vid-part {
	position: absolute; top: 6px; right: 6px; z-index: 1;
	display: inline-flex; align-items: center; height: 1.9em; padding: 0 .7em;
	border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff;
	font-size: .72rem; font-weight: 400; line-height: 1; white-space: nowrap;
	font-variant-numeric: tabular-nums; pointer-events: none;
}
.epvl-vid:hover .epvl-vid-thumb img, .epvl-vid:focus-visible .epvl-vid-thumb img { transform: scale(1.04); }
.epvl-vid:hover .epvl-vid-play, .epvl-vid:focus-visible .epvl-vid-play {
	opacity: 1; background: color-mix(in srgb, var(--epvl-accent) 50%, transparent);
}
.epvl-vid:focus-visible { outline: 3px solid var(--epvl-accent); outline-offset: 3px; }
.epvl-vid-title { display: block; font-weight: 700; line-height: 1.3; }
.epvl-vid-meta { display: block; margin-top: .2rem; font-size: .85em; opacity: .7; }

.epvl-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: 2rem 0 0; }
.epvl-pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; height: 2.4em;
	padding: 0 .75em; border-radius: 4px; text-decoration: none; color: inherit;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.epvl-pager a.page-numbers:hover { border-color: currentColor; }
.epvl-pager .page-numbers.current { background: var(--epvl-accent); border-color: var(--epvl-accent); color: var(--epvl-accent-ink); font-weight: 700; }
.epvl-pager .page-numbers.dots { border: 0; min-width: 0; padding: 0 .2em; }

/* ------------------------------------------------- [ep_teacher] profile */

.epvl-person {
	container: epvlperson / inline-size;
	display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center;
	gap: 1.25rem 2.5rem; margin: 0 0 2.5rem;
}
.epvl-person-photo { width: min(240px, 60vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, currentColor 12%, transparent); }
.epvl-person .epvl-person-img { width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: cover; object-position: 50% 20%; display: block; }
.epvl-person-initials { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 4rem; font-weight: 700; opacity: .6; }
.epvl-person .epvl-person-name { margin: 0 0 .2rem !important; padding: 0 !important; }
.epvl-person-role { margin: 0 0 1rem !important; font-weight: 600; opacity: .75; text-transform: uppercase; letter-spacing: .06em; font-size: .9em; }
.epvl-person-bio p:last-child { margin-bottom: 0; }
@media (min-width: 700px) {
	.epvl-person { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; }
}
.epvl-vids-results { transition: opacity .15s; }
.epvl-vids-wrap.is-loading .epvl-vids-results { opacity: .55; }
.epvl-vids-count[hidden] { display: none !important; }

/* Tapping or long-pressing thumbnails and bars shouldn't start a text selection. */
.epvl-tile, .epvl-item, .epvl-tiles-head, .epvl-side-head, .epvl-caption,
.epvl-vid, .epvl-tile-count, .epvl-vid-part, .epvl-pager {
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
