/**
 * Variant CSS: video--channel-grid-subscribe
 * Layer 2 — Path B video role (2026-06-06).
 * Video-channel look (YT channel page): a 2x2 grid of video thumbnails (poster +
 * pure-CSS play overlay + duration badge + title) beside a "Subscribe" channel
 * panel (round avatar + name + @handle + sub count + pill CTA).
 * No iframe / no autoplay / no JS — every play disc is decorative (aria-hidden).
 * Fixed rgba/white sit on PHOTOS (play disc + scrim + badge), per KI-020.
 * Subscribe button + its focus ring are the only interactive chrome. All scoped.
 */

body.aibt-universal .universal-video--channel-grid-subscribe {
	background: var(--background);
	color: var(--text-primary);
}

/* --- Intro --- */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__intro {
	margin: 0 0 var(--space-lg) 0 !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe h2.universal-video__headline,
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__headline {
	font-family: var(--font-display) !important;
	color: var(--text-primary) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

/* --- Layout: grid column + channel column --- */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__layout {
	align-items: stretch;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__grid-col {
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* --- Thumbnail grid (each row is a wp:columns) --- */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__cell {
	min-width: 0;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__thumb {
	position: relative;
	overflow: hidden;
	border-radius: var(--decor-radius);
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__poster-img {
	margin: 0 !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__poster-img img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	filter: var(--photo-filter, none);
}

/* Subtle scrim so play discs + badges read on any poster (fixed rgba on a PHOTO). */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.16);
	pointer-events: none;
}

/* Circular play button.
   Fill stays --accent for theme coherence; the EDGE guarantee is
   theme-independent (white inner ring + dark outer halo) so the disc reads on
   any poster regardless of accent lightness. */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__play {
	position: absolute !important;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: clamp(48px, 5vw, 66px);
	height: clamp(48px, 5vw, 66px);
	border-radius: 50%;
	background: var(--accent);
	box-shadow:
		0 0 0 2px rgba(255, 255, 255, 0.55),
		0 0 0 4px rgba(0, 0, 0, 0.16),
		0 8px 22px rgba(0, 0, 0, 0.38);
	transition: transform var(--duration-fast, 180ms) var(--ease-default, ease);
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	width: 34%;
	height: 38%;
	background: var(--cta-text-primary, #FFFFFF);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__thumb:hover .universal-video__play {
	transform: translate(-50%, -50%) scale(1.1);
}

/* Duration badge (fixed dark pill — sits on a PHOTO). */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__badge {
	position: absolute;
	right: var(--space-sm);
	bottom: var(--space-sm);
	z-index: 3;
	display: inline-block;
	font-family: var(--font-body) !important;
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: var(--tracking-wide);
	line-height: 1;
	color: #FFFFFF;
	background: rgba(0, 0, 0, 0.62);
	padding: 0.35em 0.6em;
	border-radius: var(--decor-radius-pill, 999px);
	pointer-events: none;
}

/* Thumbnail title. */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__cell-title {
	font-family: var(--font-display) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--text-primary) !important;
	margin: var(--space-sm) 0 0 0 !important;
}

/* --- Channel subscribe panel --- */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-col {
	display: flex;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel {
	width: 100%;
	text-align: center;
	padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 1.75rem);
	border-radius: var(--decor-radius);
	border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
	background: color-mix(in srgb, var(--ink) 3%, transparent);
}

/* Round channel avatar, centred (centered direct-child keeps margin-inline auto). */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__avatar {
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__avatar img {
	border-radius: 50%;
	object-fit: cover;
	aspect-ratio: 1 / 1;
	border: 3px solid color-mix(in srgb, var(--accent) 70%, var(--background));
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-name {
	font-family: var(--font-display) !important;
	font-size: var(--text-lg) !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: var(--text-primary) !important;
	margin: 0 auto var(--space-3xs, 0.25rem) auto !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-handle {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide) !important;
	color: var(--accent) !important;
	margin: 0 auto var(--space-xs, 0.5rem) auto !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-stats {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 500 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	color: var(--text-primary) !important;
	opacity: 0.6;
	margin: 0 auto var(--space-md) auto !important;
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-desc {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--text-secondary, var(--text-primary)) !important;
	margin: 0 auto var(--space-lg) auto !important;
	max-width: 30ch;
}

/* Subscribe CTA — pill, accent fill (theme CTA tokens). */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__subscribe a {
	font-family: var(--font-body) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide) !important;
	background: var(--cta-bg-primary) !important;
	color: var(--cta-text-primary) !important;
	border: 1px solid var(--cta-border-primary, var(--cta-bg-primary)) !important;
	padding: var(--space-sm) var(--space-lg) !important;
	border-radius: var(--decor-radius-pill, 999px) !important;
	transition: background var(--duration-fast, 180ms) var(--ease-default, ease),
		transform var(--duration-fast, 180ms) var(--ease-default, ease);
}

body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__subscribe a:hover {
	background: var(--accent-hover, var(--accent)) !important;
	transform: translateY(-1px);
}

/* Keyboard focus ring (a11y) — the subscribe button is the only interactive element. */
body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__subscribe a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* --- Mobile: stack grid over channel panel --- */
@media (max-width: 781px) {
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__layout {
		flex-direction: column !important;
	}
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__grid-col,
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__channel-col {
		flex-basis: 100% !important;
		width: 100% !important;
	}
}

/* Keep the 2-up thumbnail rows side-by-side down to small phones, then stack. */
@media (max-width: 480px) {
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__grid {
		flex-wrap: wrap !important;
	}
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__cell {
		flex-basis: 100% !important;
	}
}

/* A5: soften the wide kicker tracking on small screens so it never wraps awkwardly. */
@media (max-width: 640px) {
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__kicker {
		letter-spacing: var(--tracking-wider) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__play,
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__subscribe a {
		transition: none;
	}
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__thumb:hover .universal-video__play {
		transform: translate(-50%, -50%);
	}
	body.aibt-universal .universal-video--channel-grid-subscribe .universal-video__subscribe a:hover {
		transform: none;
	}
}
