/* TV series — large player on top; seasons left + episodes right below */

.detail-tv-inline #content .inner-container {
	display: block;
	max-width: min(100%, 1500px);
	width: 100%;
	position: relative;
	z-index: 2;
}

/* Backdrop slideshow: fixed full-viewport layers block browse clicks if left interactive */
.detail-tv-inline #slideshow {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.detail-tv-inline .detail #content .movie-background,
.detail-tv-inline #slideshow .movie-background,
.detail-tv-inline #content .movie-background {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.detail-tv-inline .tv-watch-top {
	width: 100%;
	margin: 0 0 20px;
	background: #12151c;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
	position: relative;
	z-index: 15;
	isolation: isolate;
}

.detail-tv-inline .tv-watch-player--full {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.detail-tv-inline .tv-watch-player-header {
	flex-shrink: 0;
}

.detail-tv-inline .tv-watch-player-body {
	position: relative;
	width: 100%;
	min-height: min(68vh, 720px);
	background: #000;
}

.detail-tv-inline .tv-watch-player .tv-details-episodes-info {
	display: block;
	position: relative;
	width: 100% !important;
	max-width: none;
	padding: 0 !important;
	height: 100%;
	min-height: inherit;
	font-size: 14px;
	box-sizing: border-box;
}

.detail-tv-inline .tv-watch-player .tv-episode-heading {
	font-size: 16px;
	font-weight: 600;
	padding: 12px 18px;
	margin: 0;
	background: rgba(0, 0, 0, 0.4);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	line-height: 1.35;
}

.detail-tv-inline .tv-watch-player .player {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.detail-tv-inline .tv-watch-player .player .trailer,
.detail-tv-inline .tv-watch-player .player .trailer__player {
	height: 100%;
}

.detail-tv-inline .tv-watch-player .player .trailer__player img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.detail-tv-inline .tv-watch-player .play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
}

.detail-tv-inline .tv-watch-player .play-button a {
	font-size: 72px;
	color: #fff;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}

.detail-tv-inline .tv-watch-player .player .synopsis,
.detail-tv-inline .tv-watch-player .player .ep {
	display: none;
}

.detail-tv-inline #inline-tv-frame,
.detail-tv-inline #inline-tv-autoembed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	z-index: 8;
}

.detail-tv-inline #inline-tv-autoembed {
	position: absolute;
	inset: 0;
	z-index: 9;
}

.detail-tv-inline .inline-tv-servers-panel {
	position: absolute;
	inset: 0;
	z-index: 12;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}

.detail-tv-inline .inline-tv-servers-panel.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.detail-tv-inline .inline-tv-servers-panel .inline-selectPlayer {
	width: 100%;
	max-width: 420px;
}

.detail-tv-inline .inline-tv-servers-panel .hostListSelector.singleautoembed {
	display: block;
	width: 100%;
}

/* Seasons left | Episodes right */
.detail-tv-inline .tv-browse-row {
	width: 100%;
	margin: 0 0 28px;
	position: relative;
	z-index: 100;
	pointer-events: auto;
	isolation: isolate;
}

.detail-tv-inline .tv-browse-seasons ol li,
.detail-tv-inline .tv-browse-episodes ol li,
.detail-tv-inline .tv-details-seasons ol li,
.detail-tv-inline .tv-details-episodes ol li {
	position: relative;
	z-index: 2;
	pointer-events: auto !important;
	cursor: pointer;
	touch-action: manipulation;
}

.detail-tv-inline .tv-browse-episodes ol li::before,
.detail-tv-inline .tv-browse-episodes ol li::after,
.detail-tv-inline .tv-details-episodes ol li::before,
.detail-tv-inline .tv-details-episodes ol li::after,
.detail-tv-inline .tv-browse-seasons ol li::before,
.detail-tv-inline .tv-browse-seasons ol li::after {
	pointer-events: none;
}

/* perfectScrollbar rails must not steal taps on season/episode lists */
.detail-tv-inline .tv-browse-row .ps-scrollbar-y-rail,
.detail-tv-inline .tv-browse-row .ps-scrollbar-x-rail {
	pointer-events: none !important;
}

.detail-tv-inline .tv-browse-seasons ol,
.detail-tv-inline .tv-browse-episodes ol {
	overflow-y: auto !important;
}

.detail-tv-inline .tv-browse-grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	background: #1a1f2b;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
	min-height: 380px;
}

.detail-tv-inline .tv-browse-seasons {
	width: 26%;
	min-width: 200px;
	max-width: 280px;
	padding: 18px 16px;
	background: #1e2433;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
	box-sizing: border-box;
}

.detail-tv-inline .tv-browse-seasons .tv-details-seasons {
	width: 100%;
	padding: 0;
	display: block;
}

.detail-tv-inline .tv-browse-seasons h2,
.detail-tv-inline .tv-browse-episodes h2 {
	font-size: 20px;
	font-weight: 600;
	padding-bottom: 14px;
	margin: 0;
}

.detail-tv-inline .tv-browse-seasons ol {
	max-height: 420px;
	overflow-y: auto;
	margin: 0;
	padding: 0 6px 0 0;
}

.detail-tv-inline .tv-browse-episodes {
	flex: 1;
	min-width: 0;
	padding: 18px 20px;
	box-sizing: border-box;
}

.detail-tv-inline .tv-browse-episodes ol {
	display: block !important;
	max-height: 420px;
	overflow-y: auto;
	margin: 0;
	padding: 0 8px 0 0;
}

/* Series poster + info */
.detail-tv-inline .tv-series-bottom {
	display: block;
	position: relative;
	z-index: 10;
	margin-top: 0;
}

.detail-tv-inline .tv-series-bottom-info {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	width: 100%;
}

.detail-tv-inline .tv-series-bottom-info .movie-image {
	width: 18%;
	min-width: 150px;
}

.detail-tv-inline .tv-series-bottom-info .movie-info {
	flex: 1;
	min-width: 260px;
	padding: 0 0 0 28px;
	box-sizing: border-box;
}

.detail-tv-inline .tv-series-bottom-info .movie-actions {
	width: 100%;
	margin-top: 16px;
}

.detail-tv-inline.detail #content .movie-info,
.detail-tv-inline.detail-tvshow #content .movie-info {
	width: auto;
	padding-left: 28px;
}

/* Wider content area on TV pages */
.detail-tv-inline.detail-tvshow #content .inner-container,
.detail-tv-inline.detail.tv #content .inner-container {
	max-width: min(100%, 1500px);
}

@media (max-width: 600px) {
	.detail-tv-inline .inline-tv-servers-panel {
		padding: 8px 10px;
		align-items: flex-start;
		justify-content: flex-start;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.detail-tv-inline .inline-tv-servers-panel .inline-selectPlayer {
		max-width: 100%;
	}
}

@media (max-width: 900px) {
	.detail-tv-inline .tv-watch-player-body {
		min-height: 52vw;
		min-height: min(52vw, 360px);
	}

	.detail-tv-inline .tv-watch-player .play-button a {
		font-size: 56px;
	}

	/* Stack: player → seasons → episodes */
	.detail-tv-inline .tv-browse-grid {
		flex-direction: column;
		min-height: 0;
	}

	.detail-tv-inline .tv-browse-seasons {
		width: 100%;
		max-width: none;
		border-right: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		order: 1;
	}

	.detail-tv-inline .tv-browse-episodes {
		width: 100%;
		order: 2;
	}

	.detail-tv-inline .tv-browse-seasons ol {
		max-height: 200px;
	}

	.detail-tv-inline .tv-browse-episodes ol {
		max-height: 280px;
	}

	.detail-tv-inline .tv-series-bottom-info .movie-image,
	.detail-tv-inline .tv-series-bottom-info .movie-info {
		width: 100%;
		padding: 0;
	}

	.detail-tv-inline .tv-series-bottom-info .movie-image {
		max-width: 220px;
		margin: 0 auto 16px;
	}
}

@media (min-width: 901px) {
	.detail-tv-inline .tv-watch-player-body {
		min-height: max(500px, 56vh);
		aspect-ratio: 16 / 9;
		height: auto;
	}

	.detail-tv-inline .tv-watch-player .tv-details-episodes-info,
	.detail-tv-inline .tv-watch-player .player,
	.detail-tv-inline .tv-watch-player .player .trailer,
	.detail-tv-inline .tv-watch-player .player .trailer__player {
		min-height: 100%;
	}

	.detail-tv-inline .tv-browse-seasons {
		order: 1;
	}

	.detail-tv-inline .tv-browse-episodes {
		order: 2;
	}
}
