/*
 * Video facade (EO_Media_Facade): poster, source, title and play button in place of a provider's player until the
 * reader presses play. La órbita light theme: navy #023c70, paper #f7f8f6, focus #0375db; Bricolage for the title,
 * Poppins for the source (both loaded by the site header).
 */

.eo-vf {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #023c70;
	border-radius: 12px;
}

/* Inside core's responsive wrapper (padding-box sized by `wp-embed-aspect-*`) the facade fills the box like the iframe. */
.wp-embed-responsive .wp-has-aspect-ratio .eo-vf {
	position: absolute;
	inset: 0;
	height: 100%;
	aspect-ratio: auto;
}

.eo-vf__btn {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: #ffffff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.eo-vf__btn:focus-visible {
	outline: 3px solid #0375db;
	outline-offset: -3px;
}

.eo-vf__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.eo-vf__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(2, 30, 56, 0) 45%, rgba(2, 30, 56, 0.78) 100%);
}

/* With the provider's own poster (which already carries its title), only the source shows; the title stays in the
   button's accessible name. */
.eo-vf:not(.eo-vf--card) .eo-vf__title {
	display: none;
}

.eo-vf:not(.eo-vf--card) .eo-vf__scrim {
	background: linear-gradient(180deg, rgba(2, 30, 56, 0) 70%, rgba(2, 30, 56, 0.6) 100%);
}

.eo-vf--card .eo-vf__scrim {
	background: radial-gradient(120% 90% at 85% 0%, rgba(3, 117, 219, 0.35) 0%, rgba(3, 117, 219, 0) 60%);
}

.eo-vf__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #ffffff;
	color: #023c70;
	box-shadow: 0 6px 24px rgba(2, 30, 56, 0.28);
	transform: translate(-50%, -50%);
	transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), background-color 0.25s, color 0.25s;
}

.eo-vf__play svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

.eo-vf__btn:hover .eo-vf__play,
.eo-vf__btn:focus-visible .eo-vf__play {
	background: #0375db;
	color: #ffffff;
	transform: translate(-50%, -50%) scale(1.06);
}

.eo-vf__btn:hover .eo-vf__img {
	transform: scale(1.02);
}

.eo-vf__meta {
	position: absolute;
	right: 24px;
	bottom: 20px;
	left: 24px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.eo-vf__src {
	font-family: "Poppins", system-ui, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	opacity: 0.85;
}

.eo-vf__title {
	display: -webkit-box;
	overflow: hidden;
	font-family: "Bricolage Grotesque", "Poppins", system-ui, sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.eo-vf iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 600px) {
	.eo-vf {
		border-radius: 8px;
	}

	.eo-vf__play {
		width: 56px;
		height: 56px;
	}

	.eo-vf__play svg {
		width: 24px;
		height: 24px;
	}

	.eo-vf__meta {
		right: 16px;
		bottom: 12px;
		left: 16px;
	}

	.eo-vf__src {
		font-size: 12px;
	}

	.eo-vf__title {
		font-size: 16px;
		-webkit-line-clamp: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eo-vf__img,
	.eo-vf__play {
		transition: none;
	}

	.eo-vf__btn:hover .eo-vf__img {
		transform: none;
	}
}
