/**
 * ZENOS -- Segment Player. Prefix .zsd-sp-*.
 * Aksen progres dari token tema storefront (--zsd-sp-aksen, dipasang JS); tidak ada
 * warna merek. Hanya netral hitam/putih untuk kontrol di atas video.
 */
.zsd-sp {
	--zsd-sp-aksen: #ffffff;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	container-type: inline-size;
	container-name: zsd-sp;
	color: #fff;
	font-family: inherit;
	user-select: none;
	-webkit-user-select: none;
}
.zsd-sp *,
.zsd-sp *::before,
.zsd-sp *::after {
	box-sizing: border-box;
}
.zsd-sp [hidden] {
	display: none !important;
}
.zsd-sp-media {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.zsd-sp-media iframe,
.zsd-sp-media > div {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
/* Penangkap klik di atas iframe: klik video = putar/jeda, hover tidak memunculkan UI provider. */
.zsd-sp-shield {
	position: absolute;
	inset: 0;
	z-index: 2;
	cursor: pointer;
}
.zsd-sp-native .zsd-sp-shield,
.zsd-sp-native .zsd-sp-kontrol,
.zsd-sp-native .zsd-sp-besar {
	display: none;
}
.zsd-sp-tidak-valid .zsd-sp-shield,
.zsd-sp-memuat .zsd-sp-shield {
	cursor: default;
}
.zsd-sp .zsd-sp-besar {
	appearance: none;
	position: absolute;
	z-index: 3;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	cursor: pointer;
}
.zsd-sp .zsd-sp-besar svg {
	width: 28px;
	height: 28px;
	margin-left: 3px;
}
.zsd-sp .zsd-sp-besar:hover {
	background: rgba(0, 0, 0, 0.72);
}
.zsd-sp-pesan {
	position: absolute;
	z-index: 4;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 16px 56px;
	text-align: center;
	font-size: 14px;
	line-height: 1.45;
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
}
.zsd-sp-memuat::after {
	content: '';
	position: absolute;
	z-index: 3;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: zsd-sp-putar 0.9s linear infinite;
}
.zsd-sp-ada-pesan.zsd-sp-memuat::after {
	display: none;
}
@keyframes zsd-sp-putar {
	to {
		transform: rotate(360deg);
	}
}

/* Bar kontrol: di dalam pemutar, bawah (sama seperti referensi). End Screen (z 5) tidak menutupinya. */
.zsd-sp-kontrol {
	position: absolute;
	z-index: 7;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
}
.zsd-sp-solid .zsd-sp-kontrol {
	background: #000;
}

/* Auto-hide saat diputar dan tidak ada aktivitas (diatur JS: kelas zsd-sp-idle). */
.zsd-sp-kontrol {
	transition: opacity 0.25s ease;
}
.zsd-sp.zsd-sp-idle .zsd-sp-kontrol {
	opacity: 0;
	pointer-events: none;
}
.zsd-sp.zsd-sp-idle,
.zsd-sp.zsd-sp-idle .zsd-sp-shield {
	cursor: none;
}
@media (prefers-reduced-motion: reduce) {
	.zsd-sp-kontrol {
		transition: none;
	}
}
.zsd-sp .zsd-sp-btn {
	appearance: none;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.zsd-sp .zsd-sp-btn:hover {
	background: rgba(255, 255, 255, 0.16);
}
.zsd-sp .zsd-sp-btn:focus-visible,
.zsd-sp .zsd-sp-besar:focus-visible,
.zsd-sp .zsd-sp-bar:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.zsd-sp-waktu {
	flex: 0 0 auto;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: #fff;
	min-width: 38px;
}
.zsd-sp-waktu-grup {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
.zsd-sp-waktu {
	min-width: 0;
}
.zsd-sp-waktu-sep {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}
.zsd-sp-volgrup {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
}
.zsd-sp-volgrup .zsd-sp-vol {
	flex: 0 0 0;
	width: 0;
	opacity: 0;
	margin: 0;
	transition: width 0.15s ease, opacity 0.15s ease, margin 0.15s ease;
}
.zsd-sp-volgrup:hover .zsd-sp-vol,
.zsd-sp-volgrup:focus-within .zsd-sp-vol {
	flex-basis: 64px;
	width: 64px;
	opacity: 1;
	margin: 0 6px 0 2px;
}
.zsd-sp-bar {
	position: relative;
	flex: 1 1 auto;
	min-width: 40px;
	height: 28px;
	cursor: pointer;
	touch-action: none;
}
.zsd-sp-bar[aria-disabled='true'] {
	cursor: default;
	opacity: 0.6;
}
.zsd-sp-track {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 4px;
	margin-top: -2px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
	overflow: hidden;
}
.zsd-sp-isi {
	width: 0;
	height: 100%;
	background: var(--zsd-sp-aksen);
}
.zsd-sp-kenop {
	position: absolute;
	top: 50%;
	left: 0;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: var(--zsd-sp-aksen);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
	pointer-events: none;
}
.zsd-sp-vol {
	flex: 0 0 64px;
	width: 64px;
	height: 4px;
	accent-color: var(--zsd-sp-aksen);
	cursor: pointer;
}
@media (pointer: coarse) {
	.zsd-sp-vol {
		display: none;
	}
}
@container zsd-sp (max-width: 460px) {
	.zsd-sp-vol {
		display: none;
	}
	.zsd-sp-kontrol {
		gap: 6px;
		padding: 0 8px;
	}
	.zsd-sp-waktu {
		font-size: 12px;
		min-width: 34px;
	}
	.zsd-sp .zsd-sp-besar {
		width: 52px;
		height: 52px;
		margin: -26px 0 0 -26px;
	}
}
.zsd-sp:fullscreen {
	aspect-ratio: auto;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	border-radius: 0;
}
.zsd-sp:fullscreen .zsd-sp-kontrol {
	height: 60px;
	padding: 0 20px;
}

/* End Screen di dalam pemutar: sisakan ruang untuk bar kontrol (tidak bertabrakan). */
.zsd-sp .zsd-es {
	padding-bottom: 56px;
}
.zsd-sp-native .zsd-es {
	padding-bottom: 12px;
}
@media (prefers-reduced-motion: reduce) {
	.zsd-sp-memuat::after {
		animation: none;
	}
}

/* Penanda loncat maju/mundur (ketuk dua kali di sisi video). */
.zsd-sp .zsd-sp-loncat {
	position: absolute;
	z-index: 6;
	top: 50%;
	transform: translateY(-50%);
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	pointer-events: none;
}
.zsd-sp .zsd-sp-loncat-kiri { left: 12%; }
.zsd-sp .zsd-sp-loncat-kanan { right: 12%; }

/* Tombol CC: redup saat subtitle YouTube mati, terang saat nyala. */
.zsd-sp-btn-cc[aria-pressed="false"] { opacity: .6; }
.zsd-sp-btn-cc[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 -2px 0 currentColor; }

/* Slider volume: kebal terhadap style input bawaan tema (padding/tinggi/border) yang membuatnya sempit dan tidak bisa mentok. */
.zsd-sp .zsd-sp-vol {
	-webkit-appearance: auto !important;
	appearance: auto !important;
	box-sizing: content-box !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: 20px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline-offset: 2px;
	margin: 0;
}
.zsd-sp .zsd-sp-volgrup .zsd-sp-vol { flex: 0 0 0; width: 0 !important; opacity: 0; }
.zsd-sp .zsd-sp-volgrup:hover .zsd-sp-vol,
.zsd-sp .zsd-sp-volgrup:focus-within .zsd-sp-vol,
.zsd-sp .zsd-sp-volgrup.zsd-sp-vol-seret .zsd-sp-vol {
	flex-basis: 80px;
	width: 80px !important;
	opacity: 1;
	margin: 0 8px 0 4px;
}

/* ===== Gaya KARTU (preview): sama dengan kartu pemutar audio + kecepatan, mundur/maju 10 dtk, CC ===== */
.zsd-sp.zsd-sp-kartu {
	--zsd-sp-aksen: var(--cp-aksen, var(--zsd-pd-coklat, #773b19));
	--ks-teks: #111827;
	--ks-redup: #6b7280;
	aspect-ratio: auto;
	height: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
	border: 1px solid #e5e7eb;
	border-radius: 22px;
	color: var(--ks-teks);
	background:
		radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--zsd-sp-aksen) 16%, #fff) 0, transparent 60%),
		linear-gradient(135deg, color-mix(in srgb, var(--zsd-sp-aksen) 9%, #fff), #fff 70%);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
	user-select: auto;
	-webkit-user-select: auto;
}
.zsd-sp-kartu .zsd-sp-kepala { display: flex; align-items: center; gap: 14px; min-width: 0; }
.zsd-sp-kartu .zsd-sp-sampul { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, 0.9); color: var(--zsd-sp-aksen); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); }
.zsd-sp-kartu .zsd-sp-kepala-teks { min-width: 0; }
.zsd-sp-kartu .zsd-sp-info { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--ks-redup); }
.zsd-sp-kartu .zsd-sp-judul { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--ks-teks); overflow-wrap: anywhere; }
.zsd-sp-kartu .zsd-sp-desk { margin: 2px 0 0; font-size: 13px; color: #374151; }
.zsd-sp-layar { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; }
.zsd-sp-kartu.zsd-sp-memuat::after { display: none; }
.zsd-sp-kartu.zsd-sp-memuat .zsd-sp-layar::after { content: ''; position: absolute; z-index: 3; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: zsd-sp-putar 0.9s linear infinite; }
.zsd-sp-kartu.zsd-sp-ada-pesan.zsd-sp-memuat .zsd-sp-layar::after { display: none; }
.zsd-sp-kartu .zsd-sp-pesan { padding-bottom: 16px; }
.zsd-sp-kartu .zsd-es { padding-bottom: 12px; }

.zsd-sp-kartu .zsd-sp-kontrol { position: static; height: auto; display: grid; gap: 10px; padding: 0; background: none; }
.zsd-sp-kartu:not(:fullscreen) .zsd-sp-kontrol { opacity: 1 !important; pointer-events: auto !important; }
.zsd-sp-kartu.zsd-sp-idle:not(:fullscreen), .zsd-sp-kartu.zsd-sp-idle:not(:fullscreen) .zsd-sp-shield { cursor: auto; }
.zsd-sp-kartu .zsd-sp-transport { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3cqw, 26px); }
.zsd-sp-kartu .zsd-sp-btn { width: 44px; height: 44px; border-radius: 50%; color: var(--ks-teks); }
.zsd-sp-kartu .zsd-sp-btn:hover { background: rgba(255, 255, 255, 0.75); color: var(--zsd-sp-aksen); }
.zsd-sp-kartu .zsd-sp-btn:focus-visible { outline-color: var(--zsd-sp-aksen); }
.zsd-sp-kartu .zsd-sp-btn svg { width: 26px; height: 26px; }
.zsd-sp-kartu .zsd-sp-btn-kec { width: auto; min-width: 52px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; }
.zsd-sp-kartu .zsd-sp-btn-cc svg { width: 24px; height: 24px; }
.zsd-sp-kartu .zsd-sp-btn-cc[hidden] { display: inline-flex !important; visibility: hidden; }
.zsd-sp-kartu .zsd-sp-btn-cc[aria-pressed='true'] { color: var(--zsd-sp-aksen); box-shadow: none; background: color-mix(in srgb, var(--zsd-sp-aksen) 14%, #fff); }
.zsd-sp-kartu .zsd-sp-btn-play { width: 72px; height: 72px; background: var(--zsd-sp-aksen); color: #fff; box-shadow: 0 0 0 8px color-mix(in srgb, var(--zsd-sp-aksen) 16%, transparent), 0 8px 20px color-mix(in srgb, var(--zsd-sp-aksen) 35%, transparent); transition: transform 0.15s; }
.zsd-sp-kartu .zsd-sp-btn-play svg { width: 30px; height: 30px; }
.zsd-sp-kartu .zsd-sp-btn-play:hover { background: var(--zsd-sp-aksen); color: #fff; filter: brightness(0.92); transform: scale(1.04); }

.zsd-sp-kartu .zsd-sp-progres { display: flex; align-items: center; gap: 10px; }
.zsd-sp-kartu .zsd-sp-progres .zsd-sp-btn { width: 36px; height: 36px; }
.zsd-sp-kartu .zsd-sp-progres .zsd-sp-btn svg { width: 20px; height: 20px; }
.zsd-sp-kartu .zsd-sp-waktu { min-width: 38px; font-size: 13px; font-weight: 500; color: #1f2937; }
.zsd-sp-kartu .zsd-sp-track { height: 6px; margin-top: -3px; background: rgba(17, 24, 39, 0.16); }
.zsd-sp-kartu .zsd-sp-kenop { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #fff; border: 2px solid var(--zsd-sp-aksen); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.zsd-sp-kartu .zsd-sp-bar:focus-visible { outline-color: var(--zsd-sp-aksen); }
.zsd-sp-kartu .zsd-sp-loncat { top: 50%; }

@container zsd-sp (max-width: 460px) {
	.zsd-sp.zsd-sp-kartu .zsd-sp-kontrol { gap: 8px; padding: 0; }
	.zsd-sp-kartu .zsd-sp-btn { width: 40px; height: 40px; }
	.zsd-sp-kartu .zsd-sp-btn-kec { width: auto; min-width: 44px; padding: 0 8px; font-size: 13px; }
	.zsd-sp-kartu .zsd-sp-btn-play { width: 64px; height: 64px; }
}

/* Layar penuh: video memenuhi layar; kontrol melayang di dalam video dan bersembunyi saat diam (kelas zsd-sp-idle) */
.zsd-sp-kartu:fullscreen { display: block; width: 100vw; height: 100dvh; padding: 0; border: 0; border-radius: 0; background: #000; --ks-teks: #fff; --ks-redup: #cbd5e1; }
.zsd-sp-kartu:fullscreen .zsd-sp-kepala { display: none; }
.zsd-sp-kartu:fullscreen .zsd-sp-layar { position: absolute; inset: 0; width: 100%; aspect-ratio: auto; border-radius: 0; }
.zsd-sp-kartu:fullscreen .zsd-sp-kontrol { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; height: auto; padding: 48px 24px 16px; background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); }
.zsd-sp-kartu:fullscreen.zsd-sp-idle .zsd-sp-kontrol { opacity: 0; pointer-events: none; }
.zsd-sp-kartu:fullscreen.zsd-sp-idle, .zsd-sp-kartu:fullscreen.zsd-sp-idle .zsd-sp-shield { cursor: none; }
.zsd-sp-kartu:fullscreen .zsd-sp-waktu { color: #fff; }
.zsd-sp-kartu:fullscreen .zsd-sp-track { background: rgba(255, 255, 255, 0.35); }
.zsd-sp-kartu:fullscreen .zsd-sp-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.zsd-sp-kartu:fullscreen .zsd-sp-btn-cc[aria-pressed='true'] { color: #fff; background: rgba(255, 255, 255, 0.22); }
@media (prefers-reduced-motion: reduce) { .zsd-sp-kartu .zsd-sp-btn-play { transition: none; } }

/* Gaya kartu: sampul menutup tombol play bawaan YouTube; tombol tengah dihapus (tombol play besar ada di bawah). */
.zsd-sp-kartu .zsd-sp-besar { display: none !important; }
.zsd-sp-poster { position: absolute; inset: 0; z-index: 1; background: #000 center / cover no-repeat; }

.zsd-sp .zsd-sp-btn svg, .zsd-sp .zsd-sp-besar svg { pointer-events: none; }

/* Tombol putar layar: hanya saat layar penuh di perangkat sentuh */
.zsd-sp-btn-rot { display: none; }
.zsd-sp-fs .zsd-sp-btn-rot:not([hidden]) { display: inline-flex; }
@media (pointer: fine) { .zsd-sp-fs .zsd-sp-btn-rot { display: none; } }

/* Desktop, layar penuh: lepas pemotongan (overflow+radius) dan containment dari elemen layar penuh.
   Di beberapa Chrome Mac, iframe YouTube di dalam elemen yang dipotong sudut membulat + container-type bisa tidak tergambar (hitam, suara jalan). */
@media (min-width: 700px) {
	.zsd-sp:fullscreen { container-type: normal; overflow: visible; border-radius: 0; contain: none; clip-path: none; }
	.zsd-sp:fullscreen .zsd-sp-layar { overflow: visible; border-radius: 0; }
}

/* Layar penuh desktop (mode akar): halaman yang layar penuh, pemutar menutupi layar. Lihat course-segment-player.js (modeAkar). */
@media (pointer: fine) {
	html:has(.zsd-sp-fsr) { overflow: hidden; }
	.zsd-sp.zsd-sp-kartu.zsd-sp-fsr {
		position: fixed !important; inset: 0 !important; z-index: 2147483000 !important;
		width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none !important; margin: 0 !important;
		aspect-ratio: auto !important; display: block !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
		overflow: hidden !important; container-type: normal !important; background: #000 !important; box-shadow: none !important;
		--ks-teks: #fff; --ks-redup: #cbd5e1;
	}
	.zsd-sp-fsr .zsd-sp-kepala { display: none !important; }
	.zsd-sp-fsr .zsd-sp-layar { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; aspect-ratio: auto !important; border-radius: 0 !important; }
	.zsd-sp-fsr .zsd-sp-kontrol { position: absolute !important; z-index: 7; left: 0; right: 0; bottom: 0; height: auto !important; padding: 48px 24px 16px !important; background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)) !important; }
	.zsd-sp-kartu.zsd-sp-fsr.zsd-sp-idle .zsd-sp-kontrol { opacity: 0 !important; pointer-events: none !important; }
	.zsd-sp-kartu.zsd-sp-fsr.zsd-sp-idle, .zsd-sp-kartu.zsd-sp-fsr.zsd-sp-idle .zsd-sp-shield { cursor: none !important; }
	.zsd-sp-fsr .zsd-sp-waktu { color: #fff; }
	.zsd-sp-fsr .zsd-sp-track { background: rgba(255, 255, 255, 0.35); }
	.zsd-sp-fsr .zsd-sp-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
	.zsd-sp-fsr .zsd-sp-btn-cc[aria-pressed='true'] { color: #fff; background: rgba(255, 255, 255, 0.22); }
}
