/* Vertical video stream — TikTok style */

body.ilyt-video-stream-open {
	overflow: hidden;
}

.ilyt-video-stream {
	position: fixed;
	inset: 0;
	z-index: 10060;
	display: flex;
	flex-direction: column;
	--ilyt-video-stream-bg: #000;
	background: var(--ilyt-video-stream-bg);
	color: #fff;
}

.ilyt-video-stream--page {
	position: relative;
	inset: auto;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	min-height: 100vh;
	min-height: 100dvh;
}

.ilyt-video-stream[hidden]:not(.ilyt-video-stream--page) {
	display: none !important;
}

.ilyt-video-stream__header {
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	background: rgb(0 0 0 / 85%);
	backdrop-filter: blur(10px);
	flex-shrink: 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.ilyt-video-stream__close {
	flex: 0 0 auto;
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	width: auto;
	height: auto;
	border-radius: 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	padding: 0;
	box-shadow: none;
}

.ilyt-video-stream__close:hover,
.ilyt-video-stream__close:focus-visible {
	color: var(--ilyt-accent, #f97316);
	outline: none;
}

.ilyt-video-stream__viewport {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	position: relative;
}

.ilyt-video-stream__track {
	min-height: 100%;
}

.ilyt-video-stream__slide {
	height: 100%;
	min-height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
}

.ilyt-video-stream__slide-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 100%;
}

.ilyt-video-stream__player {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: rgb(0 0 0 / 95%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ilyt-video-stream__player--vertical {
	max-width: 480px;
	margin: 0 auto;
	width: 100%;
}

.ilyt-video-stream__missing {
	margin: 0 1rem 0.75rem;
	color: rgb(255 255 255 / 85%);
	text-align: center;
}

.ilyt-video-stream__poster {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	width: 100%;
	height: auto;
	max-height: 100%;
	transform: translateY(-50%);
	object-fit: contain;
	object-position: center;
	background: transparent;
	pointer-events: none;
	z-index: 0;
}

.ilyt-video-stream__slide.is-playing .ilyt-video-stream__poster {
	opacity: 0;
}

.ilyt-video-stream__iframe {
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	max-height: 100%;
	border: 0;
	background: transparent;
	flex-shrink: 0;
}

.ilyt-video-stream__slide--vertical .ilyt-video-stream__iframe {
	aspect-ratio: 9 / 16;
	max-width: 100%;
}

.ilyt-video-stream__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: 4rem;
	height: 4rem;
	border: 0;
	border-radius: 999px;
	background: rgb(0 0 0 / 55%);
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
}

.ilyt-video-stream__footer {
	flex: 0 0 auto;
	padding: 1rem 1rem 1.25rem;
	background: linear-gradient(180deg, transparent, rgb(0 0 0 / 88%) 24%);
}

.ilyt-video-stream__text {
	margin: 0 0 0.65rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: rgb(255 255 255 / 88%);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ilyt-video-stream__read {
	display: inline-block;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ilyt-accent, #f97316);
	text-decoration: none;
}

.ilyt-video-stream__read:hover,
.ilyt-video-stream__read:focus-visible {
	text-decoration: underline;
}

.ilyt-video-stream__status {
	position: absolute;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%);
	margin: 0;
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	background: rgb(0 0 0 / 65%);
	color: #fff;
	font-size: 0.85rem;
}

.ilyt-mobile-shell [data-ilyt-video-stream],
.ilyt-mobile-nav__item[data-ilyt-video-stream] {
	appearance: none;
	border: 0;
	background: transparent;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.ilyt-video-stream--page .ilyt-footer,
.ilyt-video-stream--page .ilyt-mobile-shell {
	display: none;
}

body.category-video .ilyt-header {
	display: none;
}

body.category-video {
	overflow: hidden;
}
