/* ---------------------------------------------------------------------------
 * Huelva TV OTT: pagina de un video (inc/ott-single-video.php).
 * Portada con la miniatura a la derecha y los datos a la izquierda; al pulsar
 * "Ver ahora" la portada deja sitio al reproductor y los datos bajan debajo.
 * En movil la miniatura va arriba y los datos debajo.
 * ------------------------------------------------------------------------ */
.htv-video {
	--htv-video-bg: #141414;
	position: relative;
	background: var(--htv-video-bg);
	color: #fff;
}

.htv-video__stage {
	position: relative;
	height: clamp(340px, 39vw, calc(100vh - 150px));
	overflow: hidden;
	background: var(--htv-video-bg);
}

.htv-video__cover,
.htv-video__cover:hover,
.htv-video__cover:focus {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	aspect-ratio: 16 / 9;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: #000 !important;
	box-shadow: none !important;
	cursor: pointer;
	overflow: hidden;
}

.htv-video__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* La miniatura se funde con el fondo por la izquierda y por abajo. */
.htv-video__cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, var(--htv-video-bg) 0%, rgba(20, 20, 20, 0.55) 16%, rgba(20, 20, 20, 0) 42%),
		linear-gradient(0deg, var(--htv-video-bg) 0%, rgba(20, 20, 20, 0) 22%);
	pointer-events: none;
}

.htv-video__cover-play {
	position: absolute;
	top: 50%;
	left: 58%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	opacity: 0;
	transition: opacity 180ms ease;
}

.htv-video__cover-play .fa {
	margin-left: 5px;
}

.htv-video__cover:hover .htv-video__cover-play,
.htv-video__cover:focus-visible .htv-video__cover-play {
	opacity: 1;
}

.htv-video__cover:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

.htv-video__player {
	display: none;
	width: 100%;
	height: 100%;
	background: #000;
}

.htv-video__info {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 36%;
	min-width: 320px;
	padding: 0 24px 0 56px;
	pointer-events: none;
}

.htv-video__info > * {
	pointer-events: auto;
}

.htv-video__program {
	margin: 0 0 10px;
	font-family: "Lato", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
}

.htv-video__program a {
	color: #fff;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.htv-video__program a:hover,
.htv-video__program a:focus {
	color: #fff;
	border-bottom-color: #fff;
}

.htv-video .htv-video__title {
	margin: 0 0 12px;
	color: #fff;
	font-family: "Lato", sans-serif;
	font-size: clamp(26px, 2.6vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	overflow-wrap: anywhere;
}

.htv-video__meta {
	margin: 0 0 24px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: 1.4;
}

/* Entera, sin recortar: el extracto tiene 200 caracteres como maximo. */
.htv-video__description {
	margin: -8px 0 22px;
	color: rgba(255, 255, 255, 0.86);
	font-size: 16px;
	line-height: 1.5;
}

/* Con descripcion, la separacion con los botones la pone ella. */
.htv-video__meta:has(+ .htv-video__description) {
	margin-bottom: 18px;
}

.htv-video__duration::before {
	content: "\00b7";
	margin: 0 8px;
}

.htv-video__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.htv-video__button,
.htv-video__button:hover,
.htv-video__button:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid rgba(255, 255, 255, 0.7) !important;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.35) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: "Lato", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease;
}

.htv-video__button:hover,
.htv-video__button:focus-visible {
	border-color: #fff !important;
	background: rgba(255, 255, 255, 0.16) !important;
}

.htv-video__button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.htv-video__button--primary,
.htv-video__button--primary:hover,
.htv-video__button--primary:focus {
	border-color: #fff !important;
	background: #fff !important;
	color: #141414 !important;
}

.htv-video__button--primary:hover,
.htv-video__button--primary:focus-visible {
	background: rgba(255, 255, 255, 0.86) !important;
}

/* Reproduciendo: el video ocupa la portada y los datos bajan debajo. */
.htv-video.is-playing .htv-video__stage {
	height: min(56.25vw, calc(100vh - 110px));
	background: #000;
}

.htv-video.is-playing .htv-video__cover {
	display: none;
}

.htv-video.is-playing .htv-video__player {
	display: block;
}

.htv-video.is-playing .htv-video__info {
	position: static;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 24px;
	align-items: center;
	width: auto;
	min-width: 0;
	padding: 18px 15px 6px;
}

.htv-video.is-playing .htv-video__program,
.htv-video.is-playing .htv-video__title,
.htv-video.is-playing .htv-video__meta,
.htv-video.is-playing .htv-video__description {
	grid-column: 1;
}

.htv-video.is-playing .htv-video__description {
	max-width: 900px;
	margin: 8px 0 0;
}

.htv-video.is-playing .htv-video__title {
	margin-bottom: 6px;
	font-size: 24px;
}

.htv-video.is-playing .htv-video__meta {
	margin-bottom: 0;
}

.htv-video.is-playing .htv-video__actions {
	grid-column: 2;
	grid-row: 1 / span 3;
}

.htv-video.is-playing [data-htv-video-play] {
	display: none;
}

/* Filas de debajo. */
.htv-video__body {
	padding: 26px 15px 10px;
}

/* Con menu propio arriba, sobra la franja con la flecha de volver. */
.htv-ott-video #headline {
	display: none;
}

@media (max-width: 991px) {
	.htv-video__info {
		width: 44%;
		min-width: 280px;
		padding-left: 24px;
	}
}

@media (max-width: 767px) {
	.htv-video__stage,
	.htv-video.is-playing .htv-video__stage {
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.htv-video__cover,
	.htv-video__cover:hover,
	.htv-video__cover:focus {
		position: static;
		display: block;
		width: 100%;
		height: 100%;
	}

	.htv-video.is-playing .htv-video__cover {
		display: none;
	}

	.htv-video__cover::after {
		background: none;
	}

	.htv-video__cover-play {
		left: 50%;
		width: 60px;
		height: 60px;
		margin: -30px 0 0 -30px;
		font-size: 22px;
		opacity: 1;
	}

	.htv-video__info,
	.htv-video.is-playing .htv-video__info {
		position: static;
		display: block;
		width: auto;
		min-width: 0;
		padding: 18px 20px 4px;
	}

	.htv-video .htv-video__title,
	.htv-video.is-playing .htv-video__title {
		margin-bottom: 8px;
		font-size: 24px;
	}

	.htv-video__meta,
	.htv-video.is-playing .htv-video__meta {
		margin-bottom: 18px;
	}

	.htv-video__description,
	.htv-video.is-playing .htv-video__description {
		margin: -6px 0 18px;
		font-size: 15px;
	}

	.htv-video__button--primary {
		flex: 1 0 100%;
	}

	.htv-video__actions .htv-video__button:not(.htv-video__button--primary) {
		flex: 1 1 0;
		padding: 0 10px;
	}

	.htv-video__body {
		padding: 22px 0 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.htv-video__cover-play,
	.htv-video__button {
		transition: none;
	}
}
