/* Aparatchi – video blocks and the light player. Logical properties: one file for RTL and LTR.
   Inherits the theme's font and text color; the accent is neutral unless set in Settings. */

.apc,
.apc-player,
.apc-modal,
.apc-page,
.apc-view,
.apc-archive {
	--apc-accent: #1b2430;
	--apc-on-accent: #fff;
	--apc-line: rgba(127, 127, 127, 0.22);
	--apc-soft: rgba(127, 127, 127, 0.07);
	--apc-muted: rgba(127, 127, 127, 0.95);
	--apc-radius: 12px;
	--apc-gap: 16px;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
	.apc,
	.apc-page,
	.apc-view,
	.apc-archive {
		--apc-line: color-mix(in srgb, currentColor 14%, transparent);
		--apc-soft: color-mix(in srgb, currentColor 5%, transparent);
		--apc-muted: color-mix(in srgb, currentColor 62%, transparent);
	}
}

.apc {
	--c: var(--apc-cols, 3);
	clear: both;
	margin-block: 2em;
	margin-inline: 0;
	padding: 0;
	box-sizing: border-box;
	text-align: start;
}

.apc *,
.apc *::before,
.apc *::after,
.apc-player,
.apc-player *,
.apc-modal,
.apc-modal * {
	box-sizing: border-box;
}

@media (max-width: 1024px) {
	.apc {
		--c: var(--apc-cols-t, 2);
	}
}

@media (max-width: 767px) {
	.apc {
		--c: var(--apc-cols-m, 1);
	}
}

/* «Video card» widget: one card on its own. */
.apc.apc-cardw {
	margin: 0;
}

/* ------------------------------------------------------------------ A post's own videos */

/* Real players (one click each), one under another, side by side or in a carousel. */
.apc-own .apc-player {
	margin: 0;
}

.apc-own .apc__list {
	row-gap: calc(var(--apc-gap) * 1.5);
}

.apc .apc-own__title,
.apc-single-title {
	margin: 10px 0 0;
	padding: 0;
	color: inherit;
	font-family: var(--apc-head, var(--apc-font, inherit));
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
}

.apc-single-title {
	margin-block: -0.75em 1.5em;
}

/* ------------------------------------------------------------------ Head */

.apc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 14px;
}

.apc .apc__title {
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.apc__tools {
	display: flex;
	flex: none;
	align-items: center;
	gap: 14px;
	margin-inline-start: auto;
}

.apc__nav {
	display: flex;
	flex: none;
	gap: 8px;
}

.apc__nav[hidden] {
	display: none;
}

.apc .apc__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--apc-line);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: inherit;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

/* Themes such as Hello Elementor colour every button:hover / button:focus; these states win over that. */
.apc .apc__arrow:focus,
.apc .apc__arrow:disabled:hover {
	border-color: var(--apc-line);
	background: transparent;
	color: inherit;
}

.apc .apc__arrow:hover:not(:disabled) {
	border-color: var(--apc-accent);
	background: var(--apc-accent);
	color: var(--apc-on-accent);
}

.apc .apc__arrow:focus-visible {
	outline: 2px solid var(--apc-accent);
	outline-offset: 2px;
}

.apc .apc__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.apc .apc__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--apc-accent);
	font-weight: 600;
	text-decoration: none;
	box-shadow: none;
}

.apc .apc__more:hover {
	text-decoration: underline;
}

.rtl .apc__arrow svg,
[dir="rtl"] .apc__arrow svg,
.rtl .apc__more svg,
[dir="rtl"] .apc__more svg {
	transform: scaleX(-1);
}

.apc a:focus-visible,
.apc button:focus-visible,
.apc-player a:focus-visible,
.apc-modal button:focus-visible {
	outline: 2px solid var(--apc-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ List of cards */

.apc .apc__list {
	display: grid;
	grid-template-columns: repeat(var(--c), minmax(0, 1fr));
	gap: var(--apc-gap);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.apc .apc__list > li {
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.apc .apc__list > li::before,
.apc .apc__list > li::marker {
	content: none;
}

/* Carousel: native scroll with snap (swipe everywhere); arrows and dots from front.js. */

.apc--carousel .apc__list {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--c) - 1) * var(--apc-gap)) / var(--c));
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-block-end: 2px !important;
}

.apc--carousel .apc__list::-webkit-scrollbar {
	display: none;
}

.apc--carousel .apc__list > li {
	scroll-snap-align: start;
}

@media (max-width: 767px) {
	.apc--peek .apc__list {
		grid-auto-columns: calc((100% - var(--c) * var(--apc-gap)) / (var(--c) + 0.25));
	}
}

@media (prefers-reduced-motion: reduce) {
	.apc--carousel .apc__list {
		scroll-behavior: auto;
	}
}

.apc__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-block-start: 14px;
}

.apc__dots[hidden] {
	display: none;
}

.apc .apc__dot {
	width: 8px;
	height: 8px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--apc-line);
	box-shadow: none;
	cursor: pointer;
	transition: width 0.2s, background-color 0.2s;
}

.apc .apc__dot:hover,
.apc .apc__dot:focus {
	background: var(--apc-muted);
	color: inherit;
}

.apc .apc__dot[aria-current="true"],
.apc .apc__dot[aria-current="true"]:hover,
.apc .apc__dot[aria-current="true"]:focus {
	width: 22px;
	background: var(--apc-accent);
}

.apc .apc__dot:focus-visible {
	outline: 2px solid var(--apc-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ Poster */

.apc .apc-poster,
.apc-player .apc-poster,
.apc-page .apc-poster {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
}

.apc-poster--none {
	background: linear-gradient(135deg, #2a3342, #11161e);
}

/* ------------------------------------------------------------------ Video card */

.apc-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
}

.apc .apc-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--apc-radius);
	background: #11161e;
	box-shadow: none;
	text-decoration: none;
	aspect-ratio: 16 / 9;
}

.apc .apc-card__media img {
	transition: transform 0.35s ease;
}

.apc .apc-card__media:hover img {
	transform: scale(1.04);
}

.apc-card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc .apc-card__title {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	box-shadow: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.apc .apc-card__title:hover {
	color: var(--apc-accent);
}

.apc .apc-meta,
.apc-page .apc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 6px;
	margin: 0;
	color: var(--apc-muted);
	font-size: 0.82em;
	line-height: 1.7;
}

.apc-meta__sep {
	opacity: 0.7;
}

/* Play mark and duration */

.apc-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: block;
	width: 64px;
	height: 64px;
	color: #fff;
	line-height: 0;
	filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.5));
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.apc-play svg {
	display: block;
	width: 100%;
	height: 100%;
}

.apc-play--sm {
	width: 44px;
	height: 44px;
}

.apc-dur {
	position: absolute;
	inset-block-end: 8px;
	inset-inline-end: 8px;
	padding: 0 6px;
	border-radius: 5px;
	background: rgba(10, 12, 16, 0.82);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 20px;
	direction: ltr;
	unicode-bidi: isolate;
	pointer-events: none;
}

/* ------------------------------------------------------------------ Light player */

.apc-player {
	position: relative;
	overflow: hidden;
	width: 100%;
	margin-block: 1.5em;
	border-radius: var(--apc-radius);
	background: #0b0e13;
	aspect-ratio: 16 / 9;
}

.apc .apc-player,
.apc-page .apc-player,
.apc-modal .apc-player {
	margin-block: 0;
}

.apc-player .apc-player__facade {
	position: absolute;
	inset: 0;
	display: block;
	color: #fff;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
}

.apc-player__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.35) 100%);
	pointer-events: none;
}

.apc-player__title {
	position: absolute;
	inset-block-start: 14px;
	inset-inline: 16px;
	display: -webkit-box;
	overflow: hidden;
	color: #fff;
	font-weight: 600;
	line-height: 1.6;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	pointer-events: none;
}

.apc-player iframe,
.apc-card__media iframe,
.apc-player video,
.apc-card__media video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
}

/* The real player right away (video pages). */
.apc-player--live {
	background: #000;
}

/* A video uploaded to the site: the browser's own player, letterboxed like Aparat's. */
.apc-file {
	display: block;
	max-width: none;
	background: #000;
	object-fit: contain;
}

.apc-card__media.is-playing {
	cursor: default;
}

.apc-card__media.is-playing img,
.apc-card__media.is-playing .apc-play,
.apc-card__media.is-playing .apc-dur {
	display: none;
}

/* ------------------------------------------------------------------ List layout */

.apc--list .apc__list {
	grid-template-columns: minmax(0, 1fr);
}

.apc--list .apc-card {
	flex-direction: row;
	align-items: center;
	gap: 14px;
}

.apc--list .apc-card__media {
	flex: none;
	width: min(38%, 260px);
}

.apc--list .apc-card__body {
	flex: 1;
}

/* ------------------------------------------------------------------ Player and list */

.apc-stage {
	display: grid;
	grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr);
	gap: var(--apc-gap);
	align-items: stretch;
}

.apc-stage--single {
	grid-template-columns: minmax(0, 1fr);
}

.apc-stage__main {
	min-width: 0;
}

.apc-stage__caption {
	padding-block-start: 10px;
}

.apc .apc-stage__title {
	margin: 0 0 2px;
	font-weight: 600;
	line-height: 1.6;
}

/* The list is as tall as the player column and scrolls inside. */
.apc-stage > .apc-stage__list,
.apc .apc-stage__list {
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

@media (min-width: 768px) {
	/* contain: size = the list adds no height of its own: the row takes the player column's height,
	   the list stretches to it and scrolls. */
	.apc-stage > .apc-stage__list {
		contain: size;
		overflow-y: auto;
		scrollbar-width: thin;
	}
}

.apc .apc-stage__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.apc .apc-stage__item::before,
.apc .apc-stage__item::marker {
	content: none;
}

.apc .apc-stage__link {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px;
	border-radius: calc(var(--apc-radius) - 2px);
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 0.15s;
}

.apc .apc-stage__link:hover {
	background: var(--apc-soft);
}

.apc .apc-stage__link[aria-current="true"] {
	background: var(--apc-soft);
	box-shadow: inset 3px 0 0 var(--apc-accent);
}

[dir="rtl"] .apc .apc-stage__link[aria-current="true"],
.rtl .apc .apc-stage__link[aria-current="true"] {
	box-shadow: inset -3px 0 0 var(--apc-accent);
}

.apc-stage__thumb {
	position: relative;
	flex: none;
	overflow: hidden;
	width: 128px;
	border-radius: 8px;
	background: #11161e;
	aspect-ratio: 16 / 9;
}

.apc-stage__thumb .apc-dur {
	inset-block-end: 4px;
	inset-inline-end: 4px;
	padding: 0 4px;
	font-size: 11px;
	line-height: 17px;
}

.apc-stage__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc-stage__name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.apc-stage__link[aria-current="true"] .apc-stage__name {
	color: var(--apc-accent);
}

.apc-stage__text .apc-meta {
	font-size: 0.78em;
}

@media (max-width: 767px) {
	.apc-stage {
		grid-template-columns: minmax(0, 1fr);
	}

	.apc-stage > .apc-stage__list {
		max-height: 360px;
		overflow-y: auto;
	}
}

/* Narrow content columns (most themes' post width): the list goes below the player. */
.apc--player {
	container-type: inline-size;
}

@container (max-width: 700px) {
	.apc-stage {
		grid-template-columns: minmax(0, 1fr);
	}

	.apc-stage > .apc-stage__list {
		contain: none;
		max-height: 340px;
		overflow-y: auto;
	}
}

/* ------------------------------------------------------------------ Pop-up player */

.apc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 16px;
	border: 0;
	background: rgba(8, 10, 14, 0.88);
	color: #fff;
}

.apc-modal:not([open]) {
	display: none;
}

.apc-modal::backdrop {
	background: rgba(8, 10, 14, 0.88);
}

.apc-modal__box {
	position: relative;
	width: min(1000px, 100%);
}

.apc-modal__frame {
	position: relative;
	overflow: hidden;
	border-radius: var(--apc-radius);
	background: #000;
	aspect-ratio: 16 / 9;
}

.apc-modal__frame iframe,
.apc-modal__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.apc-modal__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 10px;
}

.apc-modal__title {
	margin: 0;
	overflow: hidden;
	color: #fff;
	font-weight: 600;
	line-height: 1.6;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apc-modal .apc-modal__close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s;
}

.apc-modal .apc-modal__close:focus {
	background: transparent;
	color: #fff;
}

.apc-modal .apc-modal__close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.apc-modal .apc-modal__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

html.apc-locked,
html.apc-locked body {
	overflow: hidden;
}

/* ------------------------------------------------------------------ Video page */

.apc-page {
	margin-block-end: 1.5em;
}

.apc-page__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding-block: 10px 4px;
}

.apc-page .apc-page__aparat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--apc-accent);
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
	box-shadow: none;
}

.apc-page .apc-page__aparat:hover {
	text-decoration: underline;
}

/* Related posts below a video. */

.apc--posts {
	--c: 4;
}

@media (max-width: 1024px) {
	.apc--posts {
		--c: 2;
	}
}

@media (max-width: 480px) {
	.apc--posts {
		--c: 1;
	}
}

.apc .apc-post {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

.apc-post__media {
	display: block;
	overflow: hidden;
	border-radius: var(--apc-radius);
	background: var(--apc-soft);
	aspect-ratio: 16 / 9;
}

.apc-post__title {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 600;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.apc .apc-post:hover .apc-post__title {
	color: var(--apc-accent);
}

/* ------------------------------------------------------------------ Misc */

.apc-empty {
	padding: 16px;
	border: 1px dashed rgba(127, 127, 127, 0.4);
	border-radius: 8px;
	color: inherit;
	opacity: 0.75;
	text-align: center;
}

.apc .screen-reader-text,
.apc-modal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ Design tokens */

/* The font of Aparatchi's design: its own, the site's, or chosen in Settings → Design. */
.apc,
.apc-modal,
.apc-page,
.apc-view,
.apc-archive {
	font-family: var(--apc-font, inherit);
}

/* Titles: the heading font (Aparatchi's own, or the site's: Elementor's «Primary» or the block theme's heading font). */
.apc .apc__title,
.apc .apc-card__title,
.apc .apc-post__title,
.apc-player .apc-player__title,
.apc .apc-stage__title,
.apc-view .apc-single__title,
.apc-view .apc-side__title,
.apc-view .apc-next__title,
.apc-view .apc-view__title {
	font-family: var(--apc-head, var(--apc-font, inherit));
}

/* «My theme»: the theme styles it; Aparatchi keeps only the layout. */
.apc--bare .apc-card__media:hover img {
	transform: none;
}

/* ------------------------------------------------------------------ Aparatchi's page designs */

.apc-view {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding: clamp(20px, 4vw, 40px) 20px 64px;
	box-sizing: border-box;
	text-align: start;
}

.apc-view *,
.apc-view *::before,
.apc-view *::after {
	box-sizing: border-box;
}

.apc-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0 0 18px;
	color: var(--apc-muted);
	font-size: 0.85em;
	line-height: 1.7;
}

.apc-crumbs a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

.apc-crumbs a:hover {
	color: var(--apc-accent);
}

.apc-crumbs [aria-current] {
	overflow: hidden;
	max-width: 48ch;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apc-crumbs__sep {
	opacity: 0.5;
}

/* Video page */

.apc-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 32px;
	align-items: start;
}

.apc-single--wide {
	grid-template-columns: minmax(0, 1fr);
	max-width: 960px;
}

.apc-view .apc-single .apc-player {
	margin: 0;
}

.apc-view .apc-single__title {
	margin: 18px 0 6px;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: clamp(1.3rem, 2.2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.5;
}

.apc-single__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding-block-end: 16px;
	border-block-end: 1px solid var(--apc-line);
}

.apc-view .apc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 6px;
	margin: 0;
	color: var(--apc-muted);
	font-size: 0.86em;
	line-height: 1.7;
}

.apc-view .apc-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	font-size: 0.86em;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	box-shadow: none;
}

.apc-view .apc-btn--ghost {
	border: 1px solid var(--apc-line);
	color: inherit;
}

.apc-view .apc-btn--ghost:hover {
	border-color: var(--apc-accent);
	color: var(--apc-accent);
}

.apc-single__desc {
	margin-block-start: 18px;
	line-height: 1.95;
	overflow-wrap: anywhere;
}

.apc-single__desc p {
	margin: 0 0 0.9em;
}

.apc-single__desc a {
	color: var(--apc-accent);
}

.apc-single__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-start: 18px;
}

.apc-view .apc-chip,
.apc-archive .apc-chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	height: 34px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--apc-soft);
	color: inherit;
	font-size: 0.86em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.apc-view .apc-chip:hover,
.apc-archive .apc-chip:hover {
	border-color: var(--apc-accent);
	color: var(--apc-accent);
}

.apc-view .apc-chip.is-list {
	border-color: var(--apc-line);
	background: transparent;
}

.apc-view .apc-chip[aria-current="page"],
.apc-archive .apc-chip[aria-current="page"] {
	border-color: var(--apc-accent);
	background: var(--apc-accent);
	color: var(--apc-on-accent);
}

/* «More videos» beside the player */

.apc-single__side {
	position: sticky;
	top: calc(24px + var(--wp-admin--admin-bar--height, 0px));
}

.apc-view .apc-side__title {
	margin: 0 0 10px;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.6;
}

.apc-view .apc-next {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.apc-view .apc-next > li {
	margin: 0;
	padding: 0;
}

.apc-view .apc-next__link {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 6px;
	border-radius: calc(var(--apc-radius) + 4px);
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	transition: background 0.15s;
}

.apc-view .apc-next__link:hover {
	background: var(--apc-soft);
}

.apc-next__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--apc-radius);
	background: #11161e;
	aspect-ratio: 16 / 9;
}

.apc-view .apc-next__thumb .apc-poster {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.apc-next__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apc-next__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.apc-view .apc-next__text .apc-meta {
	font-size: 0.78em;
}

.apc-view .apc-next__link:hover .apc-next__title {
	color: var(--apc-accent);
}

.apc-view > .apc-view__wrap > .apc {
	margin-block: 48px 0;
}

@media (max-width: 1024px) {
	.apc-single {
		grid-template-columns: minmax(0, 1fr);
	}

	.apc-single__side {
		position: static;
	}
}

@media (max-width: 480px) {
	.apc-view .apc-next__link {
		grid-template-columns: 128px minmax(0, 1fr);
		gap: 10px;
	}
}

/* Videos page */

.apc-view__head {
	margin-block-end: 22px;
}

.apc-view .apc-view__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	letter-spacing: normal;
	line-height: 1.4;
}

.apc-view__intro {
	max-width: 72ch;
	margin-block-start: 10px;
	color: var(--apc-muted);
	line-height: 1.9;
}

.apc-view__intro > :last-child {
	margin-block-end: 0;
}

.apc-archive {
	margin-block: 1.5em;
}

.apc-view .apc-archive {
	margin-block: 0;
}

/*
 * The bar of the videos page. Styled in both designs (the theme's design keeps its font and the site's
 * accent): most themes give form fields no look of their own. Selectors are specific enough to beat a
 * theme's or a page builder's generic «input, select, button» rules.
 */
.apc-archive .apc-archive__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 8px;
	border: 1px solid var(--apc-line);
	border-radius: calc(var(--apc-radius) + 10px);
	background: var(--apc-soft);
}

.apc-archive .apc-archive__search {
	position: relative;
	display: flex;
	flex: 1 1 240px;
	align-items: center;
	min-width: 0;
	margin: 0;
}

.apc-archive .apc-archive__search svg {
	position: absolute;
	inset-inline-start: 15px;
	z-index: 1;
	color: var(--apc-muted);
	pointer-events: none;
}

.apc-archive .apc-archive__select {
	position: relative;
	display: block;
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
}

.apc-archive .apc-archive__select::after {
	position: absolute;
	top: 50%;
	inset-inline-end: 16px;
	width: 7px;
	height: 7px;
	margin-top: -6px;
	border-right: 1.6px solid currentColor; /* Physical on purpose: a down arrow in RTL and LTR. */
	border-bottom: 1.6px solid currentColor;
	content: "";
	opacity: 0.55;
	transform: rotate(45deg);
	pointer-events: none;
}

.apc-archive .apc-archive__bar .apc-archive__search input[type="search"],
.apc-archive .apc-archive__bar .apc-archive__select select,
.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--apc-line);
	border-radius: 999px;
	background: #fff;
	background-image: none;
	color: #1f2328;
	font-family: var(--apc-font, inherit);
	font-size: 14px;
	font-weight: 400;
	line-height: 42px;
	box-shadow: none;
	outline: 0;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apc-archive .apc-archive__bar .apc-archive__search input[type="search"] {
	padding-inline-start: 42px;
}

.apc-archive .apc-archive__bar .apc-archive__search input[type="search"]::placeholder {
	color: #6b7280;
	opacity: 1;
}

.apc-archive .apc-archive__bar .apc-archive__search input[type="search"]::-webkit-search-decoration,
.apc-archive .apc-archive__bar .apc-archive__search input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.apc-archive .apc-archive__bar .apc-archive__select select,
.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn {
	max-width: 240px;
	padding-inline-end: 40px;
	cursor: pointer;
	text-overflow: ellipsis;
}

.apc-archive .apc-archive__bar .apc-archive__select:hover select,
.apc-archive .apc-archive__bar .apc-archive__select:hover button.apc-picker__btn,
.apc-archive .apc-archive__bar .apc-archive__search:hover input[type="search"] {
	border-color: color-mix(in srgb, #1f2328 28%, transparent);
}

.apc-archive .apc-archive__bar .apc-archive__search input[type="search"]:focus,
.apc-archive .apc-archive__bar .apc-archive__select select:focus,
.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn:focus-visible,
.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn[aria-expanded="true"] {
	border-color: var(--apc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--apc-accent) 18%, transparent);
}

.apc-archive .apc-archive__bar button.apc-archive__go {
	flex: none;
	box-sizing: border-box;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: var(--apc-accent);
	color: var(--apc-on-accent);
	font-family: var(--apc-font, inherit);
	font-size: 14px;
	font-weight: 600;
	line-height: 44px;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.apc-archive .apc-archive__bar button.apc-archive__go:hover,
.apc-archive .apc-archive__bar button.apc-archive__go:focus-visible {
	border: 0;
	background: var(--apc-accent);
	color: var(--apc-on-accent);
	filter: brightness(1.1);
}

.apc-archive .apc-archive__bar button.apc-archive__go:focus-visible {
	outline: 2px solid var(--apc-accent);
	outline-offset: 2px;
}


/* Aparatchi's own drop-down (mouse and trackpad screens; phones keep the native picker). */
.apc-archive .apc-archive__select.is-picker > select.apc-picker__native {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn {
	display: block;
	min-width: 150px;
	overflow: hidden;
	text-align: start;
	white-space: nowrap;
	text-transform: none;
	letter-spacing: 0;
}

.apc-archive .apc-archive__bar .apc-archive__select button.apc-picker__btn:hover {
	background: #fff;
	color: #1f2328;
}

.apc-picker__value {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.apc-archive .apc-picker__pop {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-start: 0;
	z-index: 50;
	box-sizing: border-box;
	width: max(100%, 260px);
	max-width: min(340px, calc(100vw - 32px));
	padding: 6px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	background: #fff;
	color: #1f2328;
	font-family: var(--apc-font, inherit);
	font-size: 14px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
	text-align: start;
}

.apc-archive .apc-picker__pop[hidden] {
	display: none;
}

.apc-archive .is-flip .apc-picker__pop {
	inset-inline-start: auto;
	inset-inline-end: 0;
}

.apc-archive .apc-picker__pop input.apc-picker__search {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 38px;
	margin: 0 0 6px;
	padding: 0 12px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 10px;
	background: #f6f7f9;
	color: inherit;
	font: inherit;
	box-shadow: none;
	outline: 0;
}

.apc-archive .apc-picker__pop input.apc-picker__search:focus {
	border-color: var(--apc-accent);
	background: #fff;
}

.apc-archive .apc-picker__list {
	max-height: 300px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	outline: 0;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.apc-archive .apc-picker__opt {
	position: relative;
	margin: 0;
	padding: 8px 12px;
	padding-inline-end: 32px;
	border-radius: 8px;
	line-height: 1.6;
	list-style: none;
	cursor: pointer;
}

.apc-archive .apc-picker__opt::before {
	display: none;
}

.apc-archive .apc-picker__opt[hidden] {
	display: none;
}

.apc-archive .apc-picker__opt.is-active {
	background: #f2f4f7;
}

.apc-archive .apc-picker__opt[aria-selected="true"] {
	color: var(--apc-accent);
	font-weight: 600;
}

.apc-archive .apc-picker__opt[aria-selected="true"]::after {
	position: absolute;
	top: 50%;
	inset-inline-end: 12px;
	width: 9px;
	height: 5px;
	margin-top: -4px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	content: "";
	transform: rotate(-45deg);
}

.apc-archive .apc-picker__empty {
	margin: 0;
	padding: 10px 12px;
	color: #6b7280;
}

/* Arrow points up while open. */
.apc-archive .apc-archive__select.is-picker:has(.apc-picker__btn[aria-expanded="true"])::after {
	transform: rotate(-135deg);
	margin-top: -2px;
}

.apc-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin: 0 0 18px;
	padding-block-end: 4px;
	scrollbar-width: thin;
}

.apc-archive__count {
	margin: 0 0 12px;
	color: var(--apc-muted);
	font-size: 0.86em;
}

.apc-archive__empty {
	margin: 0;
	padding: 48px 16px;
	border: 1px dashed var(--apc-line);
	border-radius: var(--apc-radius);
	color: var(--apc-muted);
	text-align: center;
}

.apc-archive .apc--archive {
	margin-block: 0;
}

.apc-pages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-block-start: 32px;
}

.apc-pages a,
.apc-pages span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--apc-line);
	border-radius: 999px;
	color: inherit;
	font-size: 0.92em;
	text-decoration: none;
	box-shadow: none;
}

.apc-pages a:hover {
	border-color: var(--apc-accent);
	color: var(--apc-accent);
}

.apc-pages [aria-current="page"] {
	border-color: var(--apc-accent);
	background: var(--apc-accent);
	color: var(--apc-on-accent);
}

.apc-pages .apc-pages__gap {
	border-color: transparent;
}

@media (max-width: 600px) {
	.apc-archive .apc-archive__bar {
		padding: 6px;
		border-radius: calc(var(--apc-radius) + 6px);
	}

	.apc-archive .apc-archive__search {
		flex-basis: 100%;
	}

	.apc-archive .apc-archive__select {
		flex: 1 1 140px;
	}

	.apc-archive .apc-archive__bar .apc-archive__select select {
		max-width: none;
	}

	.apc-archive .apc-archive__bar button.apc-archive__go {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------------ Minimal card (Settings → Video card) */

.apc-card--minimal .apc-card__media::after {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	content: "";
	transition: background 0.2s ease;
	pointer-events: none;
}

.apc-card--minimal .apc-card__media:hover::after,
.apc-card--minimal .apc-card__media:focus-visible::after {
	background: rgba(0, 0, 0, 0.18);
}

.apc .apc-card--minimal .apc-card__media:hover img {
	transform: none;
}

/* The play mark of minimal cards: a thin white circle with a small triangle, nothing behind it. A soft
   shadow keeps it readable on light posters. It does not move; the poster darkens a little on hover. */
.apc-mark {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: block;
	width: 38px;
	height: 38px;
	color: #fff;
	line-height: 0;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.apc-mark svg {
	display: block;
	width: 100%;
	height: 100%;
}

.apc-card__media.is-playing .apc-mark {
	display: none;
}

.apc--list .apc-mark,
.apc-stage__thumb .apc-mark {
	width: 28px;
	height: 28px;
}

.apc-card--minimal .apc-dur {
	z-index: 1;
	padding: 0 7px;
	border-radius: 999px;
	background: rgba(10, 12, 16, 0.72);
}

/* ------------------------------------------------------------------ A video's site connection (card, lists) */

.apc .apc-term,
.apc-view .apc-term {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	max-width: 100%;
	color: var(--apc-muted);
	font-size: 0.82em;
	line-height: 1.6;
	text-decoration: none;
	box-shadow: none;
}

.apc a.apc-term:hover,
.apc-view a.apc-term:hover {
	color: var(--apc-accent);
}

.apc-term__img {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 1px;
	border: 1px solid var(--apc-line);
	border-radius: 6px;
	background: #fff;
	object-fit: contain;
}

.apc-term__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apc-view .apc-term--sm {
	font-size: 0.76em;
}

.apc-view .apc-term--sm .apc-term__img {
	width: 18px;
	height: 18px;
}

/* ------------------------------------------------------------------ Video page: site connections */

.apc-single__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block-start: 16px;
}

.apc-view .apc-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 100%;
	padding: 8px 14px 8px 10px;
	border: 1px solid var(--apc-line);
	border-radius: calc(var(--apc-radius) + 2px);
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 0.15s;
}

.apc-view a.apc-link:hover {
	border-color: var(--apc-accent);
}

.apc-link__img {
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 3px;
	border: 1px solid var(--apc-line);
	border-radius: 8px;
	background: #fff;
	object-fit: contain;
}

.apc-link__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.apc-link__label {
	color: var(--apc-muted);
	font-size: 0.76em;
	line-height: 1.5;
}

.apc-link__name {
	overflow: hidden;
	font-size: 0.92em;
	font-weight: 700;
	line-height: 1.6;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apc-view a.apc-link:hover .apc-link__name {
	color: var(--apc-accent);
}

/* ------------------------------------------------------------------ Elementor widget «Aparatchi video page» */

.apc-view.apc-view--part {
	max-width: none;
	margin: 0;
	padding: 0;
}

.apc-view--part > .apc-single__title,
.apc-view--part > .apc-single__links,
.apc-view--part > .apc-single__terms,
.apc-view--part > .apc-single__desc {
	margin-block-start: 0;
}

.apc-view--part > .apc-single__side {
	position: static;
}
