html,
body {
	height: 100%;
	margin: 0;
	background: #000;
}

.pl-historia-video {
	overflow: hidden;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Imagen de la historia desenfocada detrás del marco, como el fondo de las historias AMP en desktop. */
.pl-historia-video__fondo {
	position: fixed;
	inset: -40px;
	z-index: 0;
	background-position: center;
	background-size: cover;
	filter: blur(28px) brightness(0.55);
}

/* Mismo marco vertical que las historias AMP: pantalla completa en móvil y centrado en desktop. */
.pl-historia-video__marco {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	margin: 0 auto;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	background: #000;
}

.pl-historia-video__titulo {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.pl-historia-video__progreso {
	display: flex;
	flex: 0 0 auto;
	gap: 4px;
	margin: 8px 8px 0;
}

.pl-historia-video__segmento {
	flex: 1;
	height: 2px;
	overflow: hidden;
	border-radius: 1px;
	background: rgba(255, 255, 255, 0.4);
}

.pl-historia-video__segmento--visto {
	background: #fff;
}

.pl-historia-video__avance {
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
	transition: width 0.25s linear;
}

.pl-historia-video__controles {
	display: flex;
	flex: 0 0 auto;
	justify-content: flex-end;
	gap: 4px;
	padding: 4px 4px 0;
}

.pl-historia-video__boton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.pl-historia-video__boton:focus-visible,
.pl-historia-video__lateral:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.pl-historia-video__video {
	flex: 1 1 auto;
	min-height: 0;
}

.pl-historia-video__video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.pl-historia-video__aviso {
	position: absolute;
	top: 64px;
	left: 50%;
	margin: 0;
	padding: 8px 14px;
	border-radius: 16px;
	background: rgba(0, 0, 0, 0.75);
	font-size: 14px;
	transform: translateX(-50%);
}

.pl-historia-video__aviso[hidden] {
	display: none;
}

/* En móvil se navega con los íconos de arriba; las flechas laterales son de desktop, como en las historias AMP. */
.pl-historia-video__lateral {
	display: none;
}

@media (min-width: 1024px) {
	.pl-historia-video__marco {
		width: calc(100vh * 9 / 16);
		width: calc(100dvh * 9 / 16);
		max-width: 100%;
		box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
	}

	.pl-historia-video__lateral {
		position: fixed;
		top: 50%;
		z-index: 2;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 64px;
		height: 64px;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.9);
		color: #333;
		transform: translateY(-50%);
	}

	.pl-historia-video__lateral--anterior {
		right: calc(50% + (100dvh * 9 / 32) + 32px);
	}

	.pl-historia-video__lateral--siguiente {
		left: calc(50% + (100dvh * 9 / 32) + 32px);
	}
}
