/*
 * AOIT Video Library. Layout, type and cards come from the theme's own
 * classes (aoit-card, link-arrow, aoit-prose...); this file only adds what
 * the theme doesn't have: the 16:9 player, play button, length badge, the
 * card grid, topic chips and the series colours.
 */
:root {
	--aoit-vl-blue: #2a63b8;
	--aoit-vl-blue-dark: #0c3577;
	--aoit-vl-accent: #6fb1ff;
	--aoit-vl-red: #c1112f;
	--aoit-vl-gradient: linear-gradient(135deg, var(--aoit-vl-blue), var(--aoit-vl-blue-dark));
	--aoit-vl-radius: 10px;
	--aoit-vl-chip-bg: #f3f3f3;
	--aoit-vl-chip-text: #3f3f3f;
}

/* Series accent on the header band */
.aoit-vl-series-band::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--aoit-vl-gradient);
}
.aoit-vl-eyebrow { color: var(--aoit-vl-blue); }
.aoit-vl-intro p + p { margin-top: 0.75rem; }

/* Player: a 16:9 box that never changes size, so nothing shifts */
.aoit-vl-player {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--aoit-vl-radius);
	overflow: hidden;
	background: var(--aoit-vl-blue-dark);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.aoit-vl-player__facade,
.aoit-vl-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.aoit-vl-player__facade { display: block; cursor: pointer; }
.aoit-vl-cover {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/*
 * Play controls sit bottom-left, so they never cover the title that is
 * part of each cover image. White on the blue covers for contrast.
 */
.aoit-vl-play-pill {
	position: absolute;
	left: 1rem;
	bottom: 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	height: 3.25rem;
	padding: 0 1.25rem 0 0.375rem;
	border-radius: 999px;
	background: #fff;
	color: var(--aoit-vl-blue-dark);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}
.aoit-vl-play-pill__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--aoit-vl-gradient);
	color: #fff;
}
.aoit-vl-play-pill__icon svg { margin-left: 2px; }
.aoit-vl-play-pill__time {
	font-weight: 600;
	color: #3f3f3f;
	font-variant-numeric: tabular-nums;
}
.aoit-vl-player__play {
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: #fff;
	color: var(--aoit-vl-blue-dark);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}
.aoit-vl-player__play svg { margin-left: 2px; }
.aoit-vl-player__facade:hover .aoit-vl-play-pill,
.aoit-vl-card:hover .aoit-vl-player__play { transform: scale(1.06); }
@media (max-width: 479px) {
	.aoit-vl-play-pill { left: 0.625rem; bottom: 0.625rem; height: 2.75rem; font-size: 0.9375rem; }
	.aoit-vl-play-pill__icon { width: 2.125rem; height: 2.125rem; }
}

/* Visible focus: an inset ring (the box clips outside outlines) plus a halo on the pill */
.aoit-vl-player__facade:focus-visible {
	outline: 3px solid var(--aoit-vl-accent);
	outline-offset: -3px;
}
.aoit-vl-player__facade:focus-visible .aoit-vl-play-pill {
	box-shadow: 0 0 0 3px var(--aoit-vl-blue-dark), 0 0 0 6px #fff;
}

/* Length badge */
.aoit-vl-badge {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	padding: 0.125rem 0.5rem;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.25rem;
	font-variant-numeric: tabular-nums;
}

/* Card grid */
.aoit-vl-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.aoit-vl-grid > li { display: flex; min-width: 0; }
.aoit-vl-grid > li > .aoit-card { width: 100%; }
@media (min-width: 640px) {
	.aoit-vl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.aoit-vl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.aoit-vl-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	margin: -1.5rem -1.5rem 1.25rem;
	border-radius: var(--aoit-vl-radius) var(--aoit-vl-radius) 0 0;
	overflow: hidden;
	background: var(--aoit-vl-blue-dark);
}
.aoit-vl-card:focus-visible {
	outline: 3px solid var(--aoit-vl-blue);
	outline-offset: 3px;
}

/* Topic filter chips */
.aoit-vl-chip {
	display: inline-block;
	padding: 0.375rem 1rem;
	border-radius: 999px;
	background: var(--aoit-vl-chip-bg);
	color: var(--aoit-vl-chip-text);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.aoit-vl-chip:hover { background: var(--aoit-vl-blue-dark); color: #fff; }
.aoit-vl-chip[aria-current="page"] { background: var(--aoit-vl-blue); color: #fff; }
.aoit-vl-chip:focus-visible {
	outline: 3px solid var(--aoit-vl-blue);
	outline-offset: 2px;
}

.aoit-vl-sources { list-style: disc; padding-left: 1.25rem; }
.aoit-vl-sources li + li { margin-top: 0.375rem; }

/* "Watch in 60 seconds" card on glossary pages */
.aoit-vl-watch {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin-top: 2rem;
	padding: 1rem;
	border-radius: var(--aoit-vl-radius);
	border-left: 4px solid var(--aoit-vl-blue);
	background: var(--aoit-vl-chip-bg);
	text-decoration: none;
	color: inherit;
}
.aoit-vl-watch__media {
	position: relative;
	flex: 0 0 9rem;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background: var(--aoit-vl-blue-dark);
}
.aoit-vl-watch:hover .aoit-vl-player__play { transform: scale(1.08); }
.aoit-vl-watch:focus-visible {
	outline: 3px solid var(--aoit-vl-blue);
	outline-offset: 2px;
}
.aoit-vl-watch__eyebrow {
	display: block;
	color: var(--aoit-vl-blue);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.aoit-vl-watch__title { display: block; font-weight: 700; color: #1a1a1a; }
@media (max-width: 479px) {
	.aoit-vl-watch { flex-direction: column; align-items: stretch; }
	.aoit-vl-watch__media { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.aoit-vl-player__play,
	.aoit-vl-play-pill,
	.aoit-vl-chip { transition: none; }
	.aoit-vl-player__facade:hover .aoit-vl-play-pill,
	.aoit-vl-card:hover .aoit-vl-player__play,
	.aoit-vl-watch:hover .aoit-vl-player__play { transform: none; }
}

/* Smaller play mark on the glossary card's thumbnail */
.aoit-vl-watch .aoit-vl-player__play {
	left: 0.375rem;
	bottom: 0.375rem;
	width: 1.75rem;
	height: 1.75rem;
}
.aoit-vl-watch .aoit-vl-player__play svg { width: 14px; height: 14px; }

/* The glossary body is .aoit-prose, which underlines links; not this card */
/* Matches the theme's selector plus one class, so it wins without !important */
.aoit-prose a.aoit-vl-watch:not(.btn-primary):not(.btn-dark):not(.wp-block-button__link),
.aoit-prose a.aoit-vl-watch:not(.btn-primary):not(.btn-dark):not(.wp-block-button__link):hover {
	color: inherit;
	font-weight: 400;
	text-decoration-line: none;
}
.aoit-prose a.aoit-vl-watch:hover .aoit-vl-watch__title { color: var(--aoit-vl-red); }
.aoit-prose .aoit-vl-watch img { margin: 0; }
.aoit-vl-watch__body > span { display: block; }

/*
 * Utility classes the templates use that the theme's purged Tailwind build
 * doesn't contain (the plugin isn't in the theme's Tailwind content list).
 * Kept here so the plugin deploys without a theme CSS rebuild. Values match
 * the theme's tailwind.config.js (md 768px, lg 1025px, h2 45px, primary #C1112F).
 */
.text-\[\#1A1A1A\] { color: #1a1a1a; }
.text-white\/90 { color: rgb(255 255 255 / 0.9); }
.border-black\/5 { border-color: rgb(0 0 0 / 0.05); }
.border-black\/10 { border-color: rgb(0 0 0 / 0.1); }
.hover\:text-primary:hover { color: #c1112f; }
.hover\:underline:hover { text-decoration-line: underline; }
.shadow-\[0_20px_60px_rgba\(0\,0\,0\,0\.18\)\] { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
@media (min-width: 768px) {
	.md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
	.md\:text-h2 { font-size: 45px; font-weight: 700; }
	.md\:p-14 { padding: 3.5rem; }
}
@media (min-width: 1025px) {
	.lg\:text-h2 { font-size: 45px; font-weight: 700; }
	.lg\:grid-cols-\[2fr_minmax\(0\2c 1fr\)\] { grid-template-columns: 2fr minmax(0, 1fr); }
	.lg\:sticky { position: sticky; }
	.lg\:top-8 { top: 2rem; }
	.lg\:self-start { align-self: flex-start; }
}
