/* ==========================================================================
   Neostella Video Card (1.0.0)
   Matches the Resource Grid card: same surface, type, badge and
   rectangular gradient button. Colours are custom properties.
   ========================================================================== */

.ns-video-card {
	--nsv-card-bg: #1E1E25;
	--nsv-border: #2C2C36;
	--nsv-border-hover: #4A4A5A;
	--nsv-cover-bg: #0B0B0E;
	--nsv-text: #FFFFFF;
	--nsv-muted: #C9C9D2;
	--nsv-meta: #A9A9B5;
	--nsv-badge-bg: #2E2E3A;
	--nsv-accent: #71ACFF;
	--nsv-cta-bg: linear-gradient(90deg, #BB00FF, #403EFF);
	--nsv-title-font: var(--wp--preset--font-family--the-seasons, "the-seasons", Georgia, serif);

	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	background: var(--nsv-card-bg);
	border: 1px solid var(--nsv-border);
	border-radius: 12px;
	color: var(--nsv-text);
	transition: border-color 0.2s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ns-video-card:not(.ns-video-card--single):hover {
	border-color: var(--nsv-border-hover);
	transform: translateY(-3px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

/* ── Thumbnail / player ── */
.ns-video-player {
	position: relative;
	flex-shrink: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--nsv-cover-bg);
	cursor: pointer;
}

.ns-video-thumb-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}

.ns-video-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ns-video-card:hover .ns-video-thumb {
	transform: scale(1.03);
}

.ns-video-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
	pointer-events: none;
}

/* Round play icon (the one round control: it's an icon, not a button label). */
.ns-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0 0 0 3px;
	box-sizing: border-box;
	border: 0;
	border-radius: 50%;
	background: var(--nsv-cta-bg);
	color: #FFFFFF;
	box-shadow: 0 6px 24px rgba(187, 0, 255, 0.35);
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	pointer-events: none;
}

.ns-play-btn--playable {
	z-index: 2;
	cursor: pointer;
	pointer-events: auto;
	font: inherit;
}

.ns-video-player:hover .ns-play-btn {
	transform: translate(-50%, -50%) scale(1.08);
	box-shadow: 0 8px 30px rgba(187, 0, 255, 0.5);
}

.ns-video-duration {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 1;
	padding: 3px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.85);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 500;
	pointer-events: none;
}

.ns-video-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Shown instead of the video when marketing cookies aren't accepted. */
.ns-video-consent {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 20px;
	background: rgba(11, 11, 14, 0.92);
	color: var(--nsv-muted);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.ns-video-consent a {
	color: var(--nsv-accent) !important;
	font-weight: 500;
}

/* ── Body ── */
.ns-video-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
}

.ns-video-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
}

.ns-video-badge {
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--nsv-badge-bg);
	color: var(--nsv-text);
	font-weight: 500;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}

.ns-video-length {
	color: var(--nsv-meta);
}

.ns-video-title {
	margin: 0;
	color: var(--nsv-text);
	font-family: var(--nsv-title-font);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.2;
	font-synthesis: none;
}

/* The theme styles every link (font, colour, size): reset them here. */
.ns-video-title a {
	color: inherit !important;
	font-family: inherit !important;
	text-decoration: none !important;
}

.ns-video-title a:hover {
	color: var(--nsv-accent) !important;
}

.ns-video-excerpt {
	flex: 1;
	margin: 0;
	color: var(--nsv-muted);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.55;
}

/* ── Buttons: rectangular, like the Resource Grid ── */
.ns-video-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 8px;
}

.ns-btn-play,
.ns-btn-youtube {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	padding: 12px 18px; /* same size as the Resource Grid button */
	border-radius: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none !important;
	cursor: pointer;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.ns-btn-play {
	border: 0;
	background: var(--nsv-cta-bg);
	color: #FFFFFF !important;
}

.ns-btn-play:hover {
	box-shadow: 0 4px 16px rgba(187, 0, 255, 0.35);
}

.ns-btn-youtube {
	border: 1px solid #3A3A46;
	background: transparent;
	color: var(--nsv-text) !important;
}

.ns-btn-youtube:hover {
	border-color: var(--nsv-accent);
}

.ns-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 640px) {
	.ns-video-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.ns-btn-play,
	.ns-btn-youtube {
		justify-content: center;
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ns-video-card,
	.ns-video-thumb,
	.ns-play-btn {
		transition: none;
	}
	.ns-video-card:hover,
	.ns-video-card:hover .ns-video-thumb {
		transform: none;
	}
	.ns-video-player:hover .ns-play-btn {
		transform: translate(-50%, -50%);
	}
}
