/**
 * Videospire player, watch page, video cards and Discover.
 * Colours follow the theme variables so dark and light layouts both work.
 */

.vs-watch,
.vs-discover,
.vs-videos,
.vs-continue,
.vs-archive-grid {
	--vs-accent: var(--ms-primary-color, #ff0065);
	--vs-surface: rgba(127, 127, 127, 0.1);
	--vs-surface-strong: rgba(127, 127, 127, 0.18);
	--vs-border: rgba(127, 127, 127, 0.3);
	--vs-radius: 8px;
}

/* ---------------- Player ---------------- */

.vs-player {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: var(--vs-radius, 8px);
	overflow: hidden;
	color: #fff;
}

.vs-player-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

@supports not (aspect-ratio: 16 / 9) {
	.vs-player-stage { height: 0; padding-top: 56.25%; }
}

.vs-player-media {
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
	display: block;
}

.vs-player-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.3;
}

.vs-player-message {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(0, 0, 0, 0.78);
	text-align: center;
	z-index: 2;
}

.vs-player-message[hidden],
.vs-player-toast[hidden] {
	display: none !important;
}

.vs-player-message-inner {
	max-width: 520px;
}

.vs-player-message-title {
	margin: 0 0 8px;
	font-size: clamp(17px, 2.4vw, 22px);
	font-weight: 600;
	color: #fff;
	line-height: 1.35;
}

.vs-player-message p {
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 12px;
}

.vs-player-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 14px 0 6px;
}

.vs-player .ms-btn {
	cursor: pointer;
	border: 0;
}

.vs-player .ms-btn-outline,
.vs-watch .ms-btn-outline {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.7);
	color: #fff;
}

/* Locked / unavailable state: let the message decide the height on small screens. */
.vs-player-locked .vs-player-stage {
	aspect-ratio: auto;
	min-height: min(56.25vw, 640px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs-player-locked .vs-player-message-static {
	position: relative;
	inset: auto;
	width: 100%;
	min-height: inherit;
	background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 575px) {
	.vs-player-locked .vs-player-stage { min-height: 260px; }
}

.vs-lock {
	display: inline-block;
	width: 44px;
	height: 44px;
	margin-bottom: 10px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 5a3 3 0 1 1 6 0v3H9V7zm3 7a2 2 0 0 1 1 3.73V19h-2v-1.27A2 2 0 0 1 12 14z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 5a3 3 0 1 1 6 0v3H9V7zm3 7a2 2 0 0 1 1 3.73V19h-2v-1.27A2 2 0 0 1 12 14z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.vs-player-toast {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	max-width: 460px;
	padding: 8px 12px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	z-index: 3;
}

.vs-link-btn {
	background: none;
	border: 0;
	padding: 0;
	color: var(--vs-accent, #ff0065);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

.vs-player-noscript {
	position: absolute;
	inset: auto 0 0;
	margin: 0;
	padding: 10px;
	background: rgba(0, 0, 0, 0.8);
	text-align: center;
}

/* ---------------- Watch page ---------------- */

.vs-watch {
	padding: 40px 0 30px;
}

.vs-watch-player-only {
	padding-bottom: 40px;
}

.vs-watch .container {
	display: grid;
	gap: 28px;
}

@media (min-width: 1200px) {
	.vs-watch .container:has(.vs-episodes) {
		grid-template-columns: minmax(0, 1fr) 340px;
		align-items: start;
	}
}

.vs-watch-main {
	min-width: 0;
}

.vs-watch-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-top: 18px;
}

.vs-watch-heading {
	min-width: 0;
}

.vs-watch-series {
	margin: 0 0 2px;
	font-size: 14px;
	opacity: 0.8;
}

.vs-watch-series a {
	color: var(--vs-accent);
}

.vs-watch-title {
	margin: 0;
	font-size: clamp(20px, 3vw, 28px);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.vs-sources {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.vs-sources-label {
	font-size: 14px;
	opacity: 0.8;
}

.vs-source-btn {
	min-height: 36px;
	padding: 6px 14px;
	border: 1px solid var(--vs-border);
	border-radius: 18px;
	background: transparent;
	color: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.vs-source-btn:hover {
	border-color: var(--vs-accent);
}

.vs-source-btn[aria-pressed="true"] {
	background: var(--vs-accent);
	border-color: var(--vs-accent);
	color: #fff;
}

.vs-sources-hint {
	flex-basis: 100%;
	margin: 0;
	font-size: 13px;
	opacity: 0.7;
}

.vs-watch-description {
	margin-top: 20px;
	line-height: 1.7;
}

.vs-watch-description > :last-child {
	margin-bottom: 0;
}

.vs-watch-meta {
	display: grid;
	gap: 8px;
	margin: 20px 0 0;
	padding: 16px 18px;
	border-radius: var(--vs-radius);
	background: var(--vs-surface);
}

.vs-watch-meta > div {
	display: grid;
	grid-template-columns: minmax(110px, 160px) 1fr;
	gap: 12px;
}

.vs-watch-meta dt {
	font-weight: 600;
}

.vs-watch-meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.vs-watch-meta a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--vs-border);
}

@media (max-width: 575px) {
	.vs-watch { padding-top: 20px; }
	.vs-watch .container { padding-left: 12px; padding-right: 12px; }
	.vs-player { border-radius: 0; margin-left: -12px; margin-right: -12px; width: calc(100% + 24px); }
	.vs-watch-meta > div { grid-template-columns: 1fr; gap: 2px; }
}

.vs-episode-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 18px;
}

.vs-episode-nav a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
	border: 1px solid var(--vs-border);
	border-radius: var(--vs-radius);
	color: inherit;
	min-width: 0;
}

.vs-episode-nav a:hover {
	border-color: var(--vs-accent);
}

.vs-episode-next {
	text-align: right;
	grid-column: 2;
}

.vs-nav-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.vs-nav-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vs-episodes-title {
	margin: 0 0 12px;
	font-size: 20px;
}

.vs-episode-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
	max-height: 70vh;
	overflow-y: auto;
}

@media (max-width: 1199px) {
	.vs-episode-list {
		max-height: none;
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	}
}

.vs-episode a {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 8px;
	border: 1px solid transparent;
	border-radius: var(--vs-radius);
	background: var(--vs-surface);
	color: inherit;
}

.vs-episode a:hover,
.vs-episode.is-current a {
	border-color: var(--vs-accent);
}

.vs-episode-thumb {
	position: relative;
	flex: 0 0 120px;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
	overflow: hidden;
	background: var(--vs-surface-strong);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs-episode-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vs-episode-thumb .vs-lock {
	position: relative;
	width: 26px;
	height: 26px;
	margin: 0;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.vs-episode-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.vs-episode-number {
	font-size: 12px;
	opacity: 0.7;
}

.vs-episode-name {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------------- Cards and grids ---------------- */

.vs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 20px 16px;
}

@media (min-width: 768px) {
	.vs-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 24px; }
}

.vs-card {
	position: relative;
	min-width: 0;
}

.vs-card-media {
	position: relative;
}

.vs-card-link {
	display: block;
	color: inherit;
}

.vs-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 630 / 446;
	border-radius: var(--vs-radius, 8px);
	overflow: hidden;
	background: var(--vs-surface-strong, rgba(127, 127, 127, 0.18));
}

.vs-card-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.vs-card-link:hover .vs-card-thumb img,
.vs-card-link:focus-visible .vs-card-thumb img {
	transform: scale(1.05);
}

.vs-thumb-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(127, 127, 127, 0.25), rgba(127, 127, 127, 0.08));
}

.vs-thumb-placeholder::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border-radius: 50%;
	background: rgba(127, 127, 127, 0.35);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 60% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 60% no-repeat;
}

.vs-card-badges {
	position: absolute;
	top: 8px;
	left: 8px;
	right: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}

.vs-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.vs-badge-premium {
	background: var(--vs-accent, #ff0065);
}

.vs-card-play {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--vs-accent, #ff0065);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	z-index: 1;
}

.vs-card-play::before {
	content: "";
	width: 0;
	height: 0;
	margin-left: 3px;
	border-style: solid;
	border-width: 8px 0 8px 13px;
	border-color: transparent transparent transparent currentColor;
}

.vs-card-title {
	display: block;
	margin: 10px 0 0;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.vs-card-title a {
	color: inherit;
}

.vs-card-title a:hover {
	color: var(--vs-accent, #ff0065);
}

.vs-card-sub {
	display: block;
	margin: 2px 0 0;
	font-size: 13px;
	opacity: 0.75;
}

.vs-card-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: rgba(255, 255, 255, 0.3);
}

.vs-card-progress > span {
	display: block;
	height: 100%;
	background: var(--vs-accent, #ff0065);
}

/* ---------------- Sections, Discover, archives ---------------- */

.vs-videos,
.vs-continue {
	padding: 30px 0;
}

.vs-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 20px;
}

.vs-section-head .heading {
	margin: 0;
}

.vs-view-all {
	color: var(--vs-accent);
	font-weight: 600;
}

.vs-discover {
	padding: 40px 0;
}

.vs-discover-form {
	display: grid;
	grid-template-columns: minmax(200px, 2fr) repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	align-items: end;
	margin-bottom: 18px;
	padding: 16px;
	border-radius: var(--vs-radius);
	background: var(--vs-surface);
}

.vs-field label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
}

.vs-field input,
.vs-field select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--vs-border);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.vs-field select option {
	color: #222;
}

.vs-discover-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.vs-discover-actions .ms-btn {
	min-height: 44px;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}

.vs-discover-reset {
	color: inherit;
	opacity: 0.8;
	text-decoration: underline;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.vs-discover-form { grid-template-columns: 1fr 1fr; }
	.vs-discover-form .vs-field-search,
	.vs-discover-actions { grid-column: 1 / -1; }
}

.vs-genre-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.vs-genre-chips a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 4px 14px 4px 4px;
	border: 1px solid var(--vs-border);
	border-radius: 18px;
	color: inherit;
	font-size: 14px;
}

.vs-genre-chips a.no-image {
	padding-left: 14px;
}

.vs-genre-chips img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.vs-genre-chips a[aria-current="true"],
.vs-genre-chips a:hover {
	border-color: var(--vs-accent);
	color: var(--vs-accent);
}

.vs-results-count {
	margin: 0 0 16px;
	opacity: 0.8;
}

.vs-empty {
	padding: 40px 20px;
	text-align: center;
	border: 1px dashed var(--vs-border);
	border-radius: var(--vs-radius);
}

.vs-empty h3 {
	margin: 0 0 8px;
}

.vs-pagination {
	margin-top: 30px;
}

.vs-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-pagination a,
.vs-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--vs-border);
	border-radius: 6px;
	color: inherit;
}

.vs-pagination .current {
	background: var(--vs-accent);
	border-color: var(--vs-accent);
	color: #fff;
}

.vs-archive-grid {
	padding: 40px 0;
}

/* ---------------- Focus and motion ---------------- */

.vs-watch a:focus-visible,
.vs-watch button:focus-visible,
.vs-player button:focus-visible,
.vs-card-link:focus-visible,
.vs-discover a:focus-visible,
.vs-discover button:focus-visible,
.vs-discover input:focus-visible,
.vs-discover select:focus-visible,
.vs-videos a:focus-visible,
.vs-pagination a:focus-visible {
	outline: 2px solid var(--vs-accent, #ff0065);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.vs-card-thumb img,
	.vs-source-btn {
		transition: none;
	}
	.vs-card-link:hover .vs-card-thumb img {
		transform: none;
	}
}

.screen-reader-text:not(:focus) {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* ================= OTT streaming watch page ================= */

.vs-ott {
	--vs-accent: var(--ms-primary-color, #ff0065);
	--vs-surface: rgba(127, 127, 127, 0.1);
	--vs-surface-strong: rgba(127, 127, 127, 0.18);
	--vs-border: rgba(127, 127, 127, 0.3);
	--vs-radius: 8px;
	padding-bottom: 40px;
}

/* Cinema area: always dark, with the poster blurred behind the player. */
.vs-ott-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #07080b;
	color: #fff;
	padding: 28px 0 34px;
}

.vs-ott-hero::before {
	content: "";
	position: absolute;
	inset: -40px;
	z-index: -2;
	background: var(--vs-backdrop, none) center / cover no-repeat;
	filter: blur(36px) brightness(0.45) saturate(1.2);
}

.vs-ott-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(7, 8, 11, 0.35) 0%, rgba(7, 8, 11, 0.75) 60%, #07080b 100%);
}

.vs-ott-stage {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px;
}

.vs-ott-stage .vs-player {
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.vs-ott-info {
	display: grid;
	gap: 28px;
	max-width: 1248px;
	margin: 26px auto 0;
}

@media (min-width: 992px) {
	.vs-ott-info { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}

.vs-ott-series {
	margin: 0 0 4px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.75);
}

.vs-ott-series a {
	color: var(--vs-accent);
	font-weight: 700;
}

.vs-ott-epno {
	margin-left: 8px;
}

.vs-ott-title {
	margin: 0 0 10px;
	color: #fff;
	font-size: clamp(24px, 4vw, 42px);
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.vs-ott-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
}

.vs-ott-facts li + li::before {
	content: "\2022";
	margin-right: 14px;
	opacity: 0.5;
}

.vs-ott-facts a {
	color: #fff;
}

.vs-ott-rating span {
	color: #ffc107;
}

.vs-ott-desc {
	color: rgba(255, 255, 255, 0.88);
	line-height: 1.7;
	max-width: 760px;
}

.vs-ott-desc > :last-child {
	margin-bottom: 0;
}

.vs-ott-desc.is-clamped {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vs-ott-more {
	margin-top: 6px;
	font-weight: 600;
}

.vs-ott-actions {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 20px;
}

.vs-ott .vs-source-btn {
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

.vs-ott .vs-sources-label,
.vs-ott .vs-sources-hint {
	color: rgba(255, 255, 255, 0.75);
}

.vs-ott .vs-episode-nav {
	margin-top: 0;
	max-width: 620px;
}

.vs-ott .vs-episode-nav a {
	border-color: rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.vs-ott-credits .vs-watch-meta {
	margin: 0;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
}

.vs-ott-credits .vs-watch-meta > div {
	grid-template-columns: 110px 1fr;
}

.vs-ott-credits .vs-watch-meta dt {
	color: rgba(255, 255, 255, 0.6);
	font-weight: 500;
}

.vs-ott-credits .vs-watch-meta a {
	color: #fff;
}

/* Rows */
.vs-ott-rails {
	padding-top: 10px;
}

.vs-rail {
	margin-top: 30px;
}

.vs-rail-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.vs-rail-title {
	margin: 0;
	font-size: clamp(18px, 2.2vw, 24px);
	flex: 1 1 auto;
	min-width: 0;
}

.vs-rail-nav {
	display: flex;
	gap: 6px;
}

.vs-rail-btn {
	width: 36px;
	height: 36px;
	border: 1px solid var(--vs-border);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.vs-rail-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.vs-rail-btn:not(:disabled):hover {
	border-color: var(--vs-accent);
	color: var(--vs-accent);
}

.vs-rail-btn[hidden] {
	display: none;
}

.vs-rail-track {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 4px 2px 10px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 2px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.vs-rail-item {
	flex: 0 0 clamp(165px, 22vw, 270px);
	scroll-snap-align: start;
	min-width: 0;
}

.vs-rail-episodes .vs-rail-item {
	flex-basis: clamp(200px, 26vw, 320px);
}

.vs-card.is-current .vs-card-thumb {
	outline: 3px solid var(--vs-accent);
	outline-offset: -3px;
}

.vs-badge-now {
	background: var(--vs-accent);
}

.vs-ott a:focus-visible,
.vs-ott button:focus-visible {
	outline: 2px solid var(--vs-accent);
	outline-offset: 2px;
}

@media (max-width: 575px) {
	.vs-ott-hero { padding-top: 0; }
	.vs-ott-stage { padding: 0; }
	.vs-ott-stage .vs-player { border-radius: 0; box-shadow: none; }
	.vs-ott-info { margin-top: 18px; }
	.vs-rail-nav { display: none; }
	.vs-ott-credits .vs-watch-meta > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.vs-rail-track { scroll-behavior: auto; }
}

/* ================= Classic playlist watch page (theme gallery layout + modern player) ================= */

.vs-watch-playlist {
	--vs-accent: var(--ms-primary-color, #ff0065);
	--vs-border: rgba(127, 127, 127, 0.3);
	--vs-radius: 0;
}

.vs-watch-playlist .gallery-container {
	cursor: default;
	align-items: flex-start;
}

/* The theme fixes the jPlayer box at 790px; the new player keeps the video's 16:9 ratio. */
.vs-watch-playlist .gallery-main .ms-gallery-main-img {
	height: auto;
}

.vs-watch-playlist .gallery-main .ms-gallery-main-img video.vs-player-media,
.vs-watch-playlist .gallery-main .ms-gallery-main-img iframe.vs-player-media {
	height: 100% !important;
	width: 100% !important;
	object-fit: contain;
}

.vs-watch-playlist .vs-player {
	border-radius: 0;
}

.vs-playlist-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
	color: var(--ms-white-color, #fff);
}

.vs-playlist-bar:empty {
	display: none;
}

/* No playlist: the player uses the full width. */
.vs-watch-playlist .vs-no-playlist .gallery-main {
	width: 100%;
	padding-right: 0;
}

/*
 * Player and playlist side by side. The playlist is exactly as tall as the
 * player (top and bottom edges line up) and scrolls on its own; the source
 * buttons sit under the player only.
 */
@media (min-width: 576px) {
	.vs-watch-playlist .container-fluid {
		padding-left: 30px;
		padding-right: 30px;
	}
	.vs-watch-playlist .vs-has-playlist {
		display: grid;
		grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
		column-gap: 20px;
		align-items: start;
	}
	.vs-watch-playlist .vs-has-playlist .gallery-main {
		display: contents;
	}
	.vs-watch-playlist .vs-has-playlist .ms-gallery-main-img {
		grid-column: 1;
		grid-row: 1;
	}
	.vs-watch-playlist .vs-has-playlist .vs-playlist-bar {
		grid-column: 1;
		grid-row: 2;
	}
	.vs-watch-playlist .vs-has-playlist .gallery-thumbs {
		grid-column: 2;
		grid-row: 1;
		align-self: stretch;
		position: relative;
		width: auto;
		max-height: none;
		overflow: hidden;
	}
	.vs-watch-playlist .gallery-thumbs > .jp-type-playlist {
		position: absolute;
		inset: 0;
		padding-right: 8px;
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: var(--vs-accent) transparent;
	}
	.vs-watch-playlist .gallery-thumbs > .jp-type-playlist::-webkit-scrollbar {
		width: 4px;
	}
	.vs-watch-playlist .gallery-thumbs > .jp-type-playlist::-webkit-scrollbar-thumb {
		background: var(--vs-accent);
		border-radius: 4px;
	}
	.vs-watch-playlist .jp-playlist ul {
		margin: 0;
	}
}

@media (min-width: 576px) and (max-width: 1199px) {
	.vs-watch-playlist .vs-has-playlist {
		grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
	}
}

@media (min-width: 576px) and (max-width: 992px) {
	.vs-watch-playlist .vs-has-playlist {
		grid-template-columns: minmax(0, 13fr) minmax(0, 7fr);
		column-gap: 15px;
	}
	.vs-watch-playlist .container-fluid {
		padding-left: 15px;
		padding-right: 15px;
	}
}

@media (max-width: 575px) {
	.vs-watch-playlist .container-fluid {
		padding-left: 12px;
		padding-right: 12px;
	}
	.vs-watch-playlist .gallery-container {
		margin-bottom: 40px;
	}
	.vs-watch-playlist .gallery-thumbs {
		max-height: 70vh;
	}
}

.vs-watch-playlist .jp-playlist a.jp-playlist-item {
	display: block;
	font-size: 16px;
	line-height: 1.35;
}

.vs-watch-playlist .ms-player-paylist {
	display: block;
	overflow: hidden;
}

.vs-watch-playlist .ms-player-paylist > img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 630 / 446;
	object-fit: cover;
}

.vs-watch-playlist .ms-player-paylist .vs-thumb-placeholder {
	position: relative;
	display: block;
	aspect-ratio: 630 / 446;
}

.vs-watch-playlist .ms-player-ovrly-icon {
	display: block;
}

.vs-watch-playlist .vs-playlist-epno {
	color: var(--vs-accent);
	font-weight: 700;
}

.vs-playlist-lock {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs-playlist-lock .vs-lock {
	width: 18px;
	height: 18px;
	margin: 0;
}

.vs-watch-playlist .jp-playlist a:focus-visible {
	outline: 2px solid var(--vs-accent);
	outline-offset: 2px;
}

/* ================= Play next automatically ================= */

.vs-upnext {
	position: absolute;
	right: 16px;
	bottom: 70px;
	z-index: 4;
	display: flex;
	gap: 14px;
	align-items: center;
	width: min(440px, calc(100% - 32px));
	padding: 12px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.88);
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.vs-upnext-thumb {
	flex: 0 0 120px;
	width: 120px;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 4px;
}

.vs-upnext-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.vs-upnext-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ms-primary-color, #ff0065);
	font-weight: 700;
}

.vs-upnext-title {
	font-size: 16px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vs-upnext-count {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
}

.vs-upnext-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.vs-upnext-actions .ms-btn {
	min-height: 34px;
	padding: 0 14px;
	line-height: 34px;
	border: 0;
	cursor: pointer;
}

.vs-upnext-actions .ms-btn-outline {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.6);
	color: #fff;
}

.vs-unmute {
	position: absolute;
	left: 16px;
	top: 16px;
	z-index: 3;
	padding: 8px 14px;
	border: 0;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

.vs-upnext button:focus-visible,
.vs-unmute:focus-visible {
	outline: 2px solid var(--ms-primary-color, #ff0065);
	outline-offset: 2px;
}

@media (max-width: 575px) {
	.vs-upnext {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
	}
	.vs-upnext-thumb {
		display: none;
	}
}

/* Premium badge on title pages */
.vs-premium-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: 10px;
	padding: 3px 10px;
	border-radius: 4px;
	background: var(--ms-primary-color, #ff0065);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	vertical-align: middle;
}
