/* mm-vtabs-video
   Desktop: 4/8 split. Left column = vertical tab list, right column = single
   active video. Below 768: single column, tab strip stacks above the video.
   Square edges. No rounded corners. */

.mm-vtabs {
	display: grid;
	grid-template-columns: 4fr 8fr;
	gap: 30px;
	width: 100%;
	align-items: start;
}
@media (max-width: 767px) {
	.mm-vtabs { grid-template-columns: 1fr; gap: 20px; }
}

/* Desktop only: pin the video column while the tabs on the left scroll.
   Sticky is defeated by overflow:hidden on any ancestor. Guard against that
   by forcing overflow:visible on our own wrappers. Parent .container /
   .row / .mm-case-section may need overflow:visible too - handled below. */
@media (min-width: 768px) {
	/* .page has overflow:hidden site-wide which kills sticky for every
	   descendant. Force overflow:visible on the entire ancestor chain,
	   scoped only to pages that render a .mm-vtabs component. */
	.page:has(.mm-vtabs),
	.page:has(.mm-vtabs) .mm-case-section,
	.page:has(.mm-vtabs) .mm-case-section .container,
	.page:has(.mm-vtabs) .mm-case-section .row,
	.mm-vtabs,
	.mm-vtabs > * {
		overflow: visible !important;
	}
	.mm-vtabs__player {
		position: -webkit-sticky;
		position: sticky;
		top: 105px;
		align-self: start;
	}
}

/* ---------- Left column: tab list ---------- */
.mm-vtabs__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: transparent;
}
@media (max-width: 767px) {
	/* Wrap the horizontally-scrolling strip so we can layer a fade cue on the right. */
	.mm-vtabs__list {
		flex-direction: row;
		overflow-x: auto;
		scrollbar-width: none;
		gap: 8px;
		scroll-snap-type: x mandatory;
		padding-right: 40%; /* Peek zone: force ~40% of the next tab into view */
		position: relative;
	}
	.mm-vtabs__list::-webkit-scrollbar { display: none; }
}
/* Fade-out gradient on the right edge as a "more content" cue on mobile. */
@media (max-width: 767px) {
	.mm-vtabs__scroller {
		position: relative;
		overflow: hidden;
	}
	.mm-vtabs__scroller::after {
		content: '';
		position: absolute;
		top: 0; right: 0; bottom: 0;
		width: 60px;
		background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.85));
		pointer-events: none;
		z-index: 2;
	}
	/* Chevron nudge over the fade */
	.mm-vtabs__scroller::before {
		content: '\203A';
		position: absolute;
		top: 50%; right: 12px;
		transform: translateY(-50%);
		color: rgba(255,255,255,.7);
		font-size: 28px;
		line-height: 1;
		pointer-events: none;
		z-index: 3;
		animation: mmVtabsNudge 1.8s ease-in-out infinite;
	}
	@keyframes mmVtabsNudge {
		0%, 100% { transform: translate(0, -50%); opacity: .55; }
		50%      { transform: translate(6px, -50%); opacity: 1; }
	}
	/* Hide both cues once the user has scrolled past the start */
	.mm-vtabs__scroller.is-scrolled::before,
	.mm-vtabs__scroller.is-scrolled::after { opacity: 0; transition: opacity 250ms ease; }
}

.mm-vtabs__tab {
	display: block;
	width: 100%;
	text-align: left;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
	padding: 18px 22px;
	font-family: inherit;
	cursor: pointer;
	transition: background 150ms ease, border-color 150ms ease;
}
.mm-vtabs__tab:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.2);
}
.mm-vtabs__tab.is-active {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--mm-accent);
	position: relative;
}
.mm-vtabs__tab.is-active::after {
	content: '';
	position: absolute;
	right: -1px; top: 0; bottom: 0;
	width: 3px;
	background: var(--mm-accent);
}
@media (max-width: 767px) {
	.mm-vtabs__tab {
		flex: 0 0 60vw;
		max-width: 60vw;
		padding: 14px 16px;
		scroll-snap-align: start;
	}
	.mm-vtabs__tab.is-active::after {
		right: 0; top: auto; bottom: -1px; left: 0;
		width: auto; height: 3px;
	}
}

.mm-vtabs__tab-num {
	display: block;
	font-family: var(--mm-mono, monospace);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--mm-accent);
	margin-bottom: 4px;
}
.mm-vtabs__tab-title {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}
.mm-vtabs__tab-desc {
	display: block;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 6px;
}
@media (max-width: 767px) {
	.mm-vtabs__tab-desc { display: none; }
	.mm-vtabs__tab-title { font-size: 14px; }
}

/* Per-tab accent color for eyebrow + active border, cycles through palette */
.mm-vtabs__tab:nth-child(9n+1) .mm-vtabs__tab-num { color: #00B4FF; }
.mm-vtabs__tab:nth-child(9n+2) .mm-vtabs__tab-num { color: #4ade80; }
.mm-vtabs__tab:nth-child(9n+3) .mm-vtabs__tab-num { color: #f4b942; }
.mm-vtabs__tab:nth-child(9n+4) .mm-vtabs__tab-num { color: #a78bfa; }
.mm-vtabs__tab:nth-child(9n+5) .mm-vtabs__tab-num { color: #ff6b6b; }
.mm-vtabs__tab:nth-child(9n+6) .mm-vtabs__tab-num { color: #22d3ee; }
.mm-vtabs__tab:nth-child(9n+7) .mm-vtabs__tab-num { color: #ff5aa8; }
.mm-vtabs__tab:nth-child(9n+8) .mm-vtabs__tab-num { color: #d64bff; }
.mm-vtabs__tab:nth-child(9n+9) .mm-vtabs__tab-num { color: #9a6bff; }

/* ---------- Right column: video ---------- */
.mm-vtabs__viewport {
	position: relative;
	width: 100%;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.1);
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.mm-vtabs__video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	display: block;
	object-fit: contain;
	background: #000;
	opacity: 0;
	transition: opacity 200ms ease;
}
.mm-vtabs__video.is-active { opacity: 1; }

.mm-vtabs__caption {
	margin-top: 14px;
	padding: 14px 18px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-left: 3px solid var(--mm-accent);
}
.mm-vtabs__caption-title {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 6px;
}
.mm-vtabs__caption-desc {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
}
