/**
 * Cave Art TV — video wall, category page and player page.
 *
 * Uses the Schon design tokens (accent #ff6060, surface #f6f6f6, Montserrat for
 * UI) so the module looks native to the theme, but falls back to sane values if
 * it is ever used elsewhere.
 *
 * Contents
 *   1. Tokens
 *   2. Head row, status line, chips
 *   3. Watch block (stage + Up next rail)
 *   4. Rows and grid
 *   5. Card
 *   6. Keep watching
 *   7. Buttons
 *   8. Breadcrumb
 *   9. Category page
 *  10. Player page
 *  11. Breakpoints
 */

/*
 * A note on the `text-transform: none` and `letter-spacing: normal` that appear
 * on the three big titles below.
 *
 * Schon styles bare `h1` and `h2` globally: h1 gets `text-transform: uppercase`,
 * and h2 gets that plus `letter-spacing: 4.6px`. Load order does not save us —
 * this stylesheet loads last, but a property this file never declares simply
 * keeps the theme's value. The hero title was rendering as
 * "S A M P L E   V I D E O   1" instead of the design's sentence-case 32px/800.
 *
 * The resets are written onto each title class rather than as one blanket
 * `.caveart-tv h2 {}` block, because a descendant selector like that
 * (specificity 0,1,1) would outrank the single-class rules here (0,1,0) and
 * clobber the row and sidebar headings that are *meant* to be uppercase.
 */

/* --------------------------------------------------------------- 1. Tokens */

/*
 * The TV page no longer has the theme's page banner above it, so the wall sits
 * directly under the nav. `.schon-section` adds 20px of top padding intended to
 * clear that banner — without it there, the padding is just a gap.
 */
.caveart-tv-page {
	padding-top: 0;
}

.caveart-tv {
	--caveart-tv-accent: var(--schon-accent, #ff6060);
	--caveart-tv-surface: var(--schon-surface, #f6f6f6);
	--caveart-tv-ink: #282828;
	--caveart-tv-dark: var(--schon-ink, #353535);
	--caveart-tv-muted: #868686;
	--caveart-tv-line: var(--schon-line, #eee);
	--caveart-tv-line-2: var(--schon-line-2, #dadada);
	--caveart-tv-live: #3bb273;
	--caveart-tv-backdrop: #101010;
	--caveart-tv-cols: 3;
	--caveart-tv-gap: 26px;
	--caveart-tv-section-gap: 60px;
	--caveart-tv-font: var(--schon-font-head, Montserrat, sans-serif);
	--caveart-tv-font-ui: var(--schon-font-ui, Oxygen, Montserrat, sans-serif);
}

/* ------------------------------------ 2. Head row, status line, chips */

.caveart-tv__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	/*
	 * Tighter than the design's 14/34/40 rhythm here and on the status line and
	 * chips below. That spacing was drawn around a half-width hero; with a
	 * full-bleed stage the page wants the screen closer to the fold.
	 */
	margin-bottom: 8px;
}

.caveart-tv__headtext {
	min-width: 0;
}

.caveart-tv__h1 {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 40px;
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.1;
	margin: 0;
	text-transform: none;
}

.caveart-tv__search {
	display: flex;
	align-items: center;
	gap: 10px;
}

.caveart-tv__searchfield {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--caveart-tv-surface);
	border-radius: 999px;
	padding: 0 22px;
	height: 56px;
	min-width: 320px;
}

/* The magnifier is two borders and a box-shadow — no icon font, no SVG fetch. */
.caveart-tv__searchicon {
	display: block;
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--caveart-tv-muted);
	border-radius: 50%;
	box-shadow: 6px 6px 0 -4px var(--caveart-tv-muted);
}

.caveart-tv__searchfield input[type="search"] {
	appearance: none;
	width: 100%;
	min-height: 0;
	padding: 0;
	background: none;
	border: 0;
	outline: none;
	font: 600 15px/1.3 var(--caveart-tv-font);
	color: var(--caveart-tv-ink);
}

.caveart-tv__searchfield input[type="search"]:focus {
	border: 0;
	box-shadow: none;
}

.caveart-tv__searchfield:focus-within {
	outline: 2px solid var(--caveart-tv-accent);
	outline-offset: 2px;
}

/*
 * The submit button carries `.screen-reader-text`, so it is off-screen rather
 * than removed: the design has no button, but the form still has to submit
 * without JS. It is given a visible focus style so a keyboard user who tabs
 * onto it is not stranded on an invisible control.
 */
.caveart-tv__searchgo:focus {
	background: var(--caveart-tv-dark);
	border: 1px solid var(--caveart-tv-dark);
	clip: auto !important;
	clip-path: none;
	color: #fff;
	font: 700 12px/1 var(--caveart-tv-font);
	height: auto;
	letter-spacing: 1px;
	padding: 14px 22px;
	position: static !important;
	text-transform: uppercase;
	width: auto;
}

.caveart-tv__status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	color: var(--caveart-tv-muted);
	font-family: var(--caveart-tv-font-ui);
	font-size: 13px;
}

.caveart-tv__dot {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--caveart-tv-live);
}

.caveart-tv__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}

.caveart-tv__chip {
	display: inline-flex;
	align-items: center;
	height: 48px;
	padding: 0 24px;
	background: #fff;
	border: 2px solid var(--caveart-tv-line);
	border-radius: 999px;
	color: var(--caveart-tv-ink);
	font: 700 14px/1 var(--caveart-tv-font);
	letter-spacing: 0.3px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.caveart-tv__chip:hover,
.caveart-tv__chip:focus-visible {
	border-color: var(--caveart-tv-ink);
	color: var(--caveart-tv-ink);
}

.caveart-tv__chip.is-active {
	background: var(--caveart-tv-ink);
	border-color: var(--caveart-tv-ink);
	color: #fff;
}

/* --------------------------------------------------------- 3. Watch block */

/*
 * The watch block. Not the design's 1.35fr/1fr poster-plus-blurb hero: this is
 * a player that stays mounted, with the channel listed beside it, so the page
 * behaves like a TV rather than a catalogue that opens modals.
 *
 * Same proportions as the player page (1fr + 356px rail) so the two screens
 * feel like one product.
 */
.caveart-tv__watch {
	align-items: start;
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr) 356px;
	margin-bottom: 56px;
}

.caveart-tv__watch-main {
	min-width: 0;
}

.caveart-tv__stage {
	aspect-ratio: 16 / 9;
	background: var(--caveart-tv-backdrop);
	border-radius: 10px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.caveart-tv__stage iframe {
	border: 0;
	display: block;
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
}

.caveart-tv__hero-media {
	background: var(--caveart-tv-surface);
	border-radius: 10px;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.caveart-tv__hero-media img {
	height: 100%;
}

.caveart-tv__label {
	color: var(--caveart-tv-accent);
	display: inline-block;
	font-family: var(--caveart-tv-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	margin-bottom: 12px;
	text-transform: uppercase;
}

.caveart-tv__hero-title {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 26px;
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.25;
	margin: 22px 0 12px;
	text-transform: none;
	text-wrap: pretty;
}

.caveart-tv__hero-meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.caveart-tv__hero-text {
	color: var(--caveart-tv-muted);
	font-size: 15px;
	line-height: 24px;
	margin: 0 0 20px;
	max-width: 70ch;
	text-wrap: pretty;
}

.caveart-tv__hero-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.caveart-tv__watch-side {
	min-width: 0;
}

/*
 * Muted-autoplay is the only autoplay browsers allow, so the sound has to be
 * the visitor's choice. Bottom-LEFT and lifted 62px, not the obvious
 * bottom-right: YouTube draws its own control bar across the bottom (~48px)
 * and its fullscreen button in the right corner, so anything placed there sits
 * on top of the player's own chrome. This corner of the frame stays clear.
 */
.caveart-tv__unmute {
	align-items: center;
	backdrop-filter: blur(4px);
	background: rgba(40, 40, 40, 0.72);
	border: 0;
	border-radius: 999px;
	bottom: 62px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: 700 12px/1 var(--caveart-tv-font);
	gap: 8px;
	left: 18px;
	letter-spacing: 1px;
	padding: 12px 20px;
	position: absolute;
	text-transform: uppercase;
	transition: background 0.2s ease;
	z-index: 2;
}

.caveart-tv__unmute:hover,
.caveart-tv__unmute:focus-visible {
	background: var(--caveart-tv-accent);
}

/* ------------------------------------------------------ 4. Rows and grid */

.caveart-tv__row {
	margin-bottom: var(--caveart-tv-section-gap);
}

.caveart-tv__row[hidden] {
	display: none;
}

.caveart-tv__rowhead {
	align-items: baseline;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin-bottom: 20px;
}

.caveart-tv__rowhead h2 {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	margin: 0;
	text-transform: uppercase;
}

.caveart-tv__seeall,
.caveart-tv__rowmeta {
	color: var(--caveart-tv-muted);
	font-family: var(--caveart-tv-font-ui);
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}

.caveart-tv__seeall:hover,
.caveart-tv__seeall:focus-visible {
	color: var(--caveart-tv-accent);
}

.caveart-tv__rowtext {
	color: var(--caveart-tv-muted);
	font-size: 14px;
	margin: -12px 0 20px;
}

.caveart-tv__grid {
	display: grid;
	gap: var(--caveart-tv-gap);
	grid-template-columns: repeat(var(--caveart-tv-cols), minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

/* A grid that is the page's only content still needs air beneath it. */
.caveart-tv > .caveart-tv__grid {
	margin-bottom: 48px;
}

/* ----------------------------------------------------------------- 5. Card */

.caveart-tv__card {
	margin: 0;
}

.caveart-tv__card[hidden] {
	display: none;
}

/* The whole card is the link, so it needs resetting rather than styling. */
.caveart-tv__play {
	appearance: none;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: block;
	font: inherit;
	padding: 0;
	text-align: left;
	text-decoration: none;
	width: 100%;
}

.caveart-tv__play:focus-visible {
	outline: 2px solid var(--caveart-tv-accent);
	outline-offset: 3px;
}

.caveart-tv__thumb {
	background: var(--caveart-tv-surface);
	border-radius: 8px;
	display: block;
	overflow: hidden;
	position: relative;
}

.caveart-tv__thumb img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.45s ease;
	width: 100%;
}

.caveart-tv__play:hover .caveart-tv__thumb img,
.caveart-tv__play:focus-visible .caveart-tv__thumb img {
	transform: scale(1.05);
}

/* Play badge — a CSS triangle, so there is no icon font or SVG request. */
.caveart-tv__playicon {
	background: rgba(40, 40, 40, 0.72);
	border-radius: 50%;
	height: 54px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: background 0.25s ease, transform 0.25s ease;
	width: 54px;
}

.caveart-tv__playicon::after {
	border-bottom: 9px solid transparent;
	border-left: 15px solid #fff;
	border-top: 9px solid transparent;
	content: "";
	height: 0;
	left: calc(50% + 2px);
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 0;
}

.caveart-tv__play:hover .caveart-tv__playicon,
.caveart-tv__play:focus-visible .caveart-tv__playicon {
	background: var(--caveart-tv-accent);
	transform: translate(-50%, -50%) scale(1.08);
}

.caveart-tv__hero-media .caveart-tv__playicon {
	background: var(--caveart-tv-accent);
	box-shadow: 0 12px 34px rgba(255, 96, 96, 0.4);
	height: 96px;
	width: 96px;
}

.caveart-tv__hero-media .caveart-tv__playicon::after {
	border-bottom-width: 16px;
	border-left-width: 26px;
	border-top-width: 16px;
	left: calc(50% + 4px);
}

.caveart-tv__duration {
	background: rgba(0, 0, 0, 0.78);
	border-radius: 3px;
	bottom: 8px;
	color: #fff;
	font-family: var(--caveart-tv-font);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 7px;
	position: absolute;
	right: 8px;
}

.caveart-tv__hero-actions .caveart-tv__duration {
	background: var(--caveart-tv-surface);
	border-radius: 4px;
	color: var(--caveart-tv-ink);
	font-size: 12px;
	padding: 8px 12px;
	position: static;
}

.caveart-tv__meta {
	display: block;
	padding-top: 14px;
}

.caveart-tv__section {
	color: var(--caveart-tv-muted);
	display: block;
	font-family: var(--caveart-tv-font-ui);
	font-size: 11px;
	letter-spacing: 1px;
	margin-bottom: 5px;
	text-transform: uppercase;
}

.caveart-tv__title {
	color: var(--caveart-tv-ink);
	display: block;
	font-family: var(--caveart-tv-font);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	transition: color 0.2s ease;
}

.caveart-tv__play:hover .caveart-tv__title {
	color: var(--caveart-tv-accent);
}

.caveart-tv__empty {
	background: var(--caveart-tv-surface);
	border-radius: 8px;
	color: var(--caveart-tv-muted);
	padding: 48px 24px;
	text-align: center;
}

.caveart-tv__channel {
	border-top: 1px solid var(--caveart-tv-line);
	margin-top: 8px;
	padding-top: 40px;
	text-align: center;
}

.caveart-tv__channel p {
	color: var(--caveart-tv-muted);
	font-family: var(--caveart-tv-font-ui);
	font-size: 12px;
	margin: 18px 0 0;
}

/* -------------------------------------------------------- 6. Keep watching */

/*
 * Hidden until the script finds something in localStorage. There is no server
 * state and no empty state — a first-time visitor never sees this block.
 */
.caveart-tv__resume {
	margin-bottom: var(--caveart-tv-section-gap);
}

.caveart-tv__resume[hidden] {
	display: none;
}

.caveart-tv__progress {
	background: rgba(255, 255, 255, 0.55);
	bottom: 0;
	display: block;
	height: 5px;
	left: 0;
	position: absolute;
	right: 0;
}

.caveart-tv__progress span {
	background: var(--caveart-tv-accent);
	display: block;
	height: 100%;
}

/* Lift the badge clear of the progress bar rather than letting them collide. */
.caveart-tv__card.is-resuming .caveart-tv__duration {
	bottom: 14px;
}

/* -------------------------------------------------------------- 7. Buttons */

.caveart-tv-btn {
	align-items: center;
	background: transparent;
	border: 1px solid var(--caveart-tv-dark);
	color: var(--caveart-tv-dark);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--caveart-tv-font);
	font-size: 12px;
	font-weight: 700;
	justify-content: center;
	letter-spacing: 1px;
	line-height: 1;
	min-height: 44px;
	padding: 12px 24px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.caveart-tv-btn.is-accent {
	background: var(--caveart-tv-accent);
	border-color: var(--caveart-tv-accent);
	color: #fff;
}

.caveart-tv-btn.is-accent:hover,
.caveart-tv-btn.is-accent:focus-visible {
	background: var(--caveart-tv-ink);
	border-color: var(--caveart-tv-ink);
	color: #fff;
}

.caveart-tv-btn.is-ghost:hover,
.caveart-tv-btn.is-ghost:focus-visible {
	background: var(--caveart-tv-dark);
	color: #fff;
}

.caveart-tv-btn.is-quiet {
	border-color: var(--caveart-tv-line-2);
	color: var(--caveart-tv-muted);
}

.caveart-tv-btn.is-quiet:hover,
.caveart-tv-btn.is-quiet:focus-visible {
	border-color: var(--caveart-tv-dark);
	color: var(--caveart-tv-dark);
}

.caveart-tv-btn.is-block {
	display: flex;
	margin-top: 22px;
	padding: 12px 20px;
	width: 100%;
}

/* ----------------------------------------------------------- 8. Breadcrumb */

.caveart-tv__crumbs {
	align-items: center;
	color: var(--caveart-tv-muted);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--caveart-tv-font-ui);
	font-size: 13px;
	gap: 10px;
	margin-bottom: 24px;
}

.caveart-tv__crumbs a {
	color: var(--caveart-tv-muted);
	text-decoration: none;
}

.caveart-tv__crumbs a:hover,
.caveart-tv__crumbs a:focus-visible {
	color: var(--caveart-tv-accent);
}

.caveart-tv__crumbs .is-current {
	color: var(--caveart-tv-ink);
}

/* ------------------------------------------------------- 9. Category page */

.caveart-tv-category,
.caveart-tv-player {
	padding-bottom: 70px;
	padding-top: 26px;
}

.caveart-tv-category__head {
	align-items: flex-end;
	border-bottom: 1px solid var(--caveart-tv-line);
	display: flex;
	gap: 32px;
	justify-content: space-between;
	margin-bottom: 34px;
	padding-bottom: 28px;
}

.caveart-tv-category__title {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 38px;
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.1;
	margin: 0 0 12px;
	text-transform: none;
}

.caveart-tv-category__blurb {
	color: var(--caveart-tv-muted);
	font-size: 15px;
	line-height: 24px;
	margin: 0;
	max-width: 52ch;
	text-wrap: pretty;
}

.caveart-tv-category__count {
	color: var(--caveart-tv-muted);
	font-family: var(--caveart-tv-font-ui);
	font-size: 13px;
	white-space: nowrap;
}

.caveart-tv-category .caveart-tv__chips {
	margin-bottom: 36px;
}

.caveart-tv-category__more {
	border-top: 1px solid var(--caveart-tv-line);
	margin-top: 44px;
	padding-top: 36px;
	text-align: center;
}

/* get_next_posts_link() hands back a bare <a>; dress it as the ghost button. */
.caveart-tv-category__more a {
	align-items: center;
	background: transparent;
	border: 1px solid var(--caveart-tv-dark);
	color: var(--caveart-tv-dark);
	display: inline-flex;
	font-family: var(--caveart-tv-font);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	line-height: 1;
	min-height: 44px;
	padding: 12px 28px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background 0.25s ease, color 0.25s ease;
}

.caveart-tv-category__more a:hover,
.caveart-tv-category__more a:focus-visible {
	background: var(--caveart-tv-dark);
	color: #fff;
}

/* ---------------------------------------------------------- 10. Player page */

.caveart-tv-player__layout {
	align-items: start;
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr) 356px;
}

.caveart-tv-player__stage {
	aspect-ratio: 16 / 9;
	background: var(--caveart-tv-backdrop);
	border-radius: 10px;
	overflow: hidden;
	position: relative;
}

.caveart-tv-player__start {
	appearance: none;
	background: none;
	border: 0;
	cursor: pointer;
	display: block;
	height: 100%;
	padding: 0;
	position: relative;
	width: 100%;
}

.caveart-tv-player__start img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.caveart-tv-player__badge {
	background: var(--caveart-tv-accent);
	border-radius: 50%;
	box-shadow: 0 12px 34px rgba(255, 96, 96, 0.35);
	height: 96px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: transform 0.25s ease;
	width: 96px;
}

.caveart-tv-player__badge::after {
	border-bottom: 16px solid transparent;
	border-left: 26px solid #fff;
	border-top: 16px solid transparent;
	content: "";
	height: 0;
	left: calc(50% + 4px);
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 0;
}

.caveart-tv-player__start:hover .caveart-tv-player__badge,
.caveart-tv-player__start:focus-visible .caveart-tv-player__badge {
	transform: translate(-50%, -50%) scale(1.06);
}

.caveart-tv-player__stage iframe {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.caveart-tv-player__title {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 30px;
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.2;
	margin: 26px 0 12px;
	text-transform: none;
	text-wrap: pretty;
}

.caveart-tv-player__meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}

.caveart-tv-player__pill {
	background: var(--caveart-tv-surface);
	border-radius: 999px;
	color: var(--caveart-tv-ink);
	font: 700 12px/1 var(--caveart-tv-font);
	letter-spacing: 0.5px;
	padding: 9px 14px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.caveart-tv-player__pill:hover,
.caveart-tv-player__pill:focus-visible {
	background: var(--caveart-tv-ink);
	color: #fff;
}

.caveart-tv-player__metatext {
	color: var(--caveart-tv-muted);
	font-family: var(--caveart-tv-font-ui);
	font-size: 13px;
}

.caveart-tv-player__text {
	color: var(--caveart-tv-muted);
	font-size: 15px;
	line-height: 25px;
	margin-bottom: 26px;
	max-width: 62ch;
	text-wrap: pretty;
}

.caveart-tv-player__text > :last-child {
	margin-bottom: 0;
}

.caveart-tv-player__actions {
	border-top: 1px solid var(--caveart-tv-line);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 26px;
}

.caveart-tv-player__sidetitle {
	color: var(--caveart-tv-ink);
	font-family: var(--caveart-tv-font);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.5px;
	margin: 0 0 18px;
	text-transform: uppercase;
}

.caveart-tv-upnext {
	display: grid;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.caveart-tv-upnext li {
	margin: 0;
}

.caveart-tv-upnext__link {
	align-items: start;
	display: grid;
	gap: 14px;
	grid-template-columns: 148px minmax(0, 1fr);
	text-decoration: none;
}

.caveart-tv-upnext__link:focus-visible {
	outline: 2px solid var(--caveart-tv-accent);
	outline-offset: 3px;
}

.caveart-tv-upnext__thumb {
	aspect-ratio: 16 / 9;
	background: var(--caveart-tv-surface);
	border-radius: 6px;
	display: block;
	overflow: hidden;
	position: relative;
}

.caveart-tv-upnext__thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.caveart-tv-upnext__duration {
	background: rgba(0, 0, 0, 0.78);
	border-radius: 3px;
	bottom: 6px;
	color: #fff;
	font-family: var(--caveart-tv-font);
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	position: absolute;
	right: 6px;
}

.caveart-tv-upnext__body {
	display: block;
}

.caveart-tv-upnext__title {
	color: var(--caveart-tv-ink);
	display: block;
	font-family: var(--caveart-tv-font);
	font-size: 13px;
	font-weight: 700;
	line-height: 19px;
	margin-bottom: 5px;
	transition: color 0.2s ease;
}

.caveart-tv-upnext__link:hover .caveart-tv-upnext__title {
	color: var(--caveart-tv-accent);
}

.caveart-tv-upnext__section {
	color: var(--caveart-tv-muted);
	display: block;
	font-family: var(--caveart-tv-font-ui);
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* A share confirmation, only ever shown when navigator.share is unavailable. */
.caveart-tv-toast {
	background: var(--caveart-tv-ink);
	border-radius: 4px;
	bottom: 24px;
	color: #fff;
	font: 700 12px/1 var(--caveart-tv-font);
	left: 50%;
	letter-spacing: 1px;
	padding: 14px 22px;
	position: fixed;
	text-transform: uppercase;
	transform: translateX(-50%);
	z-index: 99999;
}

/* --------------------------------------------------------- 11. Breakpoints */
/* Matched to the theme's own: 1199, 991, 767, 550. */

@media (max-width: 1199px) {
	.caveart-tv__watch,
	.caveart-tv-player__layout {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 30px;
	}

	.caveart-tv__hero-title {
		font-size: 24px;
	}

	.caveart-tv-upnext__link {
		grid-template-columns: 120px minmax(0, 1fr);
	}
}

@media (max-width: 991px) {
	.caveart-tv__grid {
		--caveart-tv-cols: 3;
	}

	/* One column with the rail below the video, not squeezed beside it. */
	.caveart-tv__watch,
	.caveart-tv-player__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.caveart-tv__watch-side,
	.caveart-tv-player__side {
		border-top: 1px solid var(--caveart-tv-line);
		padding-top: 30px;
	}

	/* Two across once the rail is full width, so it is not a long stack. */
	.caveart-tv-upnext {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.caveart-tv-player__side {
		border-top: 1px solid var(--caveart-tv-line);
		padding-top: 30px;
	}

	.caveart-tv-upnext {
		gap: 20px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.caveart-tv__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 20px;
	}

	.caveart-tv__h1 {
		font-size: 32px;
	}

	/* Search goes full width once it is no longer beside the heading. */
	.caveart-tv__search {
		width: 100%;
	}

	.caveart-tv__searchfield {
		flex: 1;
		min-width: 0;
	}

	.caveart-tv-category__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.caveart-tv-category__title {
		font-size: 32px;
	}
}

@media (max-width: 767px) {
	.caveart-tv__grid {
		--caveart-tv-cols: 2;
		--caveart-tv-gap: 20px;
	}

	.caveart-tv {
		--caveart-tv-section-gap: 44px;
	}

	/*
	 * Chips scroll sideways rather than wrapping into three stacked lines that
	 * push the first video below the fold.
	 */
	.caveart-tv__chips {
		flex-wrap: nowrap;
		margin-left: -15px;
		margin-right: -15px;
		overflow-x: auto;
		padding: 2px 15px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.caveart-tv__chips::-webkit-scrollbar {
		display: none;
	}

	.caveart-tv__chip {
		flex: none;
	}

	.caveart-tv-player__title {
		font-size: 25px;
	}

}

@media (max-width: 550px) {
	.caveart-tv__grid {
		--caveart-tv-cols: 1;
	}

	.caveart-tv__playicon {
		height: 46px;
		width: 46px;
	}

	.caveart-tv-player__badge {
		height: 68px;
		width: 68px;
	}

	.caveart-tv-player__badge::after {
		border-bottom-width: 11px;
		border-left-width: 18px;
		border-top-width: 11px;
	}

	.caveart-tv-upnext {
		grid-template-columns: minmax(0, 1fr);
	}

	.caveart-tv-btn {
		width: 100%;
	}

	.caveart-tv-category__title {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.caveart-tv__thumb img,
	.caveart-tv__playicon,
	.caveart-tv__title,
	.caveart-tv-player__badge {
		transition: none;
	}

	.caveart-tv__play:hover .caveart-tv__thumb img {
		transform: none;
	}
}
