/* VidThic: etalase, detail kelas, lembar checkout, ruang belajar */

:root {
	--vs-page: #f2f3f5;
	--vs-card: #ffffff;
	--vs-ink: #16181d;
	--vs-mu: #5d6470;
	--vs-ln: #e2e5ea;
	--vs-soft: #f6f7f9;
	--vs-r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

.vs-body {
	margin: 0;
	background: var(--vs-page);
	color: var(--vs-ink);
	font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.vs-body a { color: inherit; }
.vs-body :focus-visible { outline: 3px solid var(--vs-accent); outline-offset: 2px; border-radius: 6px; }
.vs-noscroll, .vs-noscroll body { overflow: hidden; }

/* ---------- Kepala halaman ---------- */

.vs-top {
	max-width: 1160px;
	margin: 0 auto;
	padding: 18px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.vs-brand { font-weight: 700; text-decoration: none; }
.vs-nav { display: flex; gap: 18px; font-size: 14px; }
.vs-nav a { color: var(--vs-mu); text-decoration: none; font-weight: 600; }
.vs-nav a:hover { color: var(--vs-ink); }

.vs-foot { text-align: center; font-size: 13px; color: var(--vs-mu); padding: 8px 20px 36px; }

/* ---------- Tombol ---------- */

.vs-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 12px 18px;
	border: 0;
	border-radius: 11px;
	background: var(--vs-accent);
	color: var(--vs-on);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s ease, filter .12s ease;
}

.vs-body a.vs-btn { color: var(--vs-on); }
.vs-btn:hover { filter: brightness(.93); }
.vs-btn:active { transform: scale(.985); }

.vs-btn-ghost,
.vs-body a.vs-btn-ghost {
	background: transparent;
	color: var(--vs-ink);
	box-shadow: inset 0 0 0 1.5px var(--vs-ln);
}

.vs-btn-ghost:hover { filter: none; box-shadow: inset 0 0 0 1.5px var(--vs-ink); }
.vs-btn.is-off { background: var(--vs-ln); color: var(--vs-mu); cursor: not-allowed; }

/* ---------- Strip bagian ---------- */

.vs-strip { display: flex; gap: 3px; height: 5px; }

.vs-strip span {
	position: relative;
	flex-basis: 0;
	min-width: 6px;
	background: var(--vs-ln);
	overflow: hidden;
}

.vs-strip span i {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--vs-accent);
}

.vs-strip:not(.is-owned) span { background: color-mix(in srgb, var(--vs-accent) 28%, var(--vs-card)); }

/* ---------- Etalase ---------- */

.vs-wrap { max-width: 1160px; margin: 0 auto; padding: 4px 20px 56px; }

.vs-head { max-width: 640px; margin: 10px 0 30px; }

.vs-head h1 {
	margin: 0 0 8px;
	font-size: clamp(30px, 4.6vw, 46px);
	line-height: 1.08;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.vs-head p { margin: 0; font-size: 17px; color: var(--vs-mu); }

.vs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px 22px;
}

.vs-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--vs-card);
	border-radius: var(--vs-r);
	box-shadow: 0 1px 2px rgba(22, 24, 29, .06);
	overflow: hidden;
}

.vs-cv { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--vs-soft); text-decoration: none; }
.vs-cv img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vs-ph {
	display: flex;
	align-items: flex-end;
	width: 100%;
	height: 100%;
	padding: 18px;
	background: var(--vs-accent);
	color: var(--vs-on);
}

.vs-ph span { font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }

.vs-flag {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #fff;
	color: var(--vs-ink);
	font-size: 12px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}

.vs-flag.is-free { color: #15803d; }
.vs-flag.is-owned { background: var(--vs-ink); color: #fff; }

.vs-cb { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }

.vs-ct { margin: 0 0 10px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.vs-ct a { text-decoration: none; }
.vs-ct a:hover { color: var(--vs-accent); }

.vs-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }

.vs-facts li {
	padding: 2px 9px;
	border-radius: 6px;
	background: var(--vs-soft);
	color: var(--vs-mu);
	font-size: 12.5px;
	font-weight: 600;
}

.vs-price { margin: auto 0 12px; font-variant-numeric: tabular-nums; }
.vs-price b { font-size: 19px; }
.vs-price s { color: var(--vs-mu); font-size: 14px; margin-right: 4px; }
.vs-price .is-free { color: #15803d; }
.vs-price.is-large { margin: 0; }
.vs-price.is-large b { font-size: 32px; letter-spacing: -.02em; }

.vs-progress { margin: auto 0 12px; font-size: 14px; color: var(--vs-mu); }

.vs-empty {
	padding: 48px 20px;
	border: 1.5px dashed var(--vs-ln);
	border-radius: var(--vs-r);
	text-align: center;
	color: var(--vs-mu);
}

.vs-empty p { margin: 0 0 4px; }
.vs-empty b { color: var(--vs-ink); }
.vs-body .vs-link { color: var(--vs-accent); font-weight: 700; }

/* ---------- Detail kelas ---------- */

.vs-detail {
	max-width: 1160px;
	margin: 0 auto;
	padding: 4px 20px 56px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 350px;
	gap: 36px;
	align-items: start;
}

.vs-hero { border-radius: 18px; overflow: hidden; background: var(--vs-card); margin-bottom: 26px; }
.vs-hero-cv { aspect-ratio: 16 / 9; background: var(--vs-soft); }
.vs-hero-cv img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-hero-cv .vs-ph span { font-size: clamp(24px, 4vw, 40px); }
.vs-hero .vs-strip { height: 8px; }

.vs-detail h1 {
	margin: 0 0 12px;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.12;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.vs-detail .vs-facts { margin-bottom: 22px; }
.vs-detail .vs-facts li { background: var(--vs-card); }

.vs-desc { max-width: 66ch; font-size: 16.5px; }
.vs-desc p { margin: 0 0 14px; }
.vs-desc img { max-width: 100%; height: auto; }

.vs-h2 { margin: 34px 0 12px; font-size: 21px; letter-spacing: -.01em; }

.vs-syllabus { background: var(--vs-card); border-radius: var(--vs-r); overflow: hidden; }

.vs-sec + .vs-sec { border-top: 1px solid var(--vs-ln); }

.vs-sec summary,
.vs-sec-flat {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 15px 18px;
	list-style: none;
	cursor: pointer;
}

.vs-sec summary::-webkit-details-marker { display: none; }
.vs-sec-flat { cursor: default; }

.vs-sec-n {
	flex: 0 0 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: color-mix(in srgb, var(--vs-accent) 12%, var(--vs-card));
	color: var(--vs-accent);
	font-size: 13px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.vs-sec-t { flex: 1; font-weight: 700; }
.vs-sec-c { font-size: 13px; color: var(--vs-mu); white-space: nowrap; }

.vs-vids { margin: 0; padding: 0 18px 12px 56px; list-style: none; }

.vs-vids li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid var(--vs-soft);
	font-size: 15px;
}

.vs-vid {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
}

button.vs-vid { cursor: pointer; }
button.vs-vid:hover .vs-vid-t { color: var(--vs-accent); text-decoration: underline; text-underline-offset: 3px; }

.vs-tag {
	flex-shrink: 0;
	padding: 1px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--vs-accent) 12%, var(--vs-card));
	color: var(--vs-accent);
	font-size: 12px;
	font-weight: 700;
}

.vs-dur { font-size: 13px; color: var(--vs-mu); font-variant-numeric: tabular-nums; }

.vs-side { position: sticky; top: 20px; }

.vs-buy {
	padding: 22px;
	background: var(--vs-card);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(22, 24, 29, .06), 0 18px 40px -28px rgba(22, 24, 29, .35);
}

.vs-save {
	display: inline-block;
	margin: 0 0 8px;
	padding: 2px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--vs-accent) 16%, var(--vs-card));
	color: color-mix(in srgb, var(--vs-accent) 70%, var(--vs-ink));
	font-size: 12.5px;
	font-weight: 700;
}

.vs-suffix { margin: 2px 0 16px; font-size: 14px; color: var(--vs-mu); }
.vs-proof { margin: 12px 0 0; font-size: 13.5px; font-weight: 600; text-align: center; }

.vs-trust {
	display: grid;
	gap: 8px;
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--vs-ln);
	list-style: none;
	font-size: 14px;
	color: var(--vs-mu);
}

.vs-trust li { display: flex; gap: 10px; align-items: baseline; }

.vs-trust li::before {
	content: "";
	flex-shrink: 0;
	width: 9px;
	height: 5px;
	border-left: 2px solid var(--vs-accent);
	border-bottom: 2px solid var(--vs-accent);
	transform: translateY(-3px) rotate(-45deg);
}

.vs-note { margin: 12px 0 0; font-size: 13.5px; color: var(--vs-mu); }
.vs-note a { color: var(--vs-accent); font-weight: 600; }

.vs-owned-t { margin: 0 0 12px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }

.vs-meter { height: 8px; border-radius: 99px; background: var(--vs-soft); overflow: hidden; }
.vs-meter span { display: block; height: 100%; background: var(--vs-accent); }
.vs-buy .vs-meter + .vs-note { margin-bottom: 16px; }

/* ---------- Lembar checkout dan cuplikan ---------- */

.vs-sheet { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: flex-end; justify-content: center; }
.vs-sheet[hidden] { display: none; }

.vs-sheet-bg { position: absolute; inset: 0; background: rgba(16, 18, 24, .58); }

.vs-sheet-box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 92vh;
	height: 92dvh;
	background: var(--vs-card);
	border-radius: 20px 20px 0 0;
	overflow: hidden;
	animation: vs-up .24s ease-out;
}

@keyframes vs-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.vs-sheet-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px 12px 20px;
	border-bottom: 1px solid var(--vs-ln);
}

.vs-sheet-head p { flex: 1; margin: 0; font-weight: 700; line-height: 1.3; }

.vs-x {
	flex: 0 0 38px;
	height: 38px;
	border: 0;
	border-radius: 10px;
	background: var(--vs-soft);
	color: var(--vs-ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.vs-sheet-body { position: relative; flex: 1; min-height: 0; }
.vs-sheet-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }

.vs-sheet-load {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--vs-mu);
	font-size: 14px;
	background: var(--vs-card);
	z-index: 1;
	pointer-events: none;
}

.vs-sheet-load[hidden] { display: none; }

.vs-sheet-alt { margin: 0; padding: 10px 16px; border-top: 1px solid var(--vs-ln); text-align: center; font-size: 13px; color: var(--vs-mu); }
.vs-sheet-alt a { color: var(--vs-accent); font-weight: 600; }

.vs-sheet-video .vs-sheet-box { height: auto; background: #101216; color: #fff; }
.vs-sheet-video .vs-sheet-head { border-color: rgba(255, 255, 255, .1); }
.vs-sheet-video .vs-x { background: rgba(255, 255, 255, .1); color: #fff; }

.vs-preview-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vs-preview-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vs-preview-msg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 20px;
	text-align: center;
	color: rgba(255, 255, 255, .78);
	font-size: 14px;
}

.vs-pill {
	position: fixed;
	left: 50%;
	bottom: 18px;
	z-index: 9999;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--vs-ink);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transform: translateX(-50%);
	box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
}

.vs-pill[hidden] { display: none; }
.vs-pill span { width: 8px; height: 8px; border-radius: 50%; background: #f5b400; }

@media (min-width: 720px) {
	.vs-sheet { align-items: center; padding: 24px; }
	.vs-sheet-box { width: 580px; height: min(86vh, 860px); border-radius: 20px; }
	.vs-sheet-video .vs-sheet-box { width: min(920px, 100%); height: auto; }
}

/* ---------- Ruang belajar ---------- */

.vs-room-body { min-height: 100vh; }

.vs-app { display: grid; grid-template-columns: 80px minmax(0, 1fr); min-height: 100vh; }

.vs-rail {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 10px;
	background: var(--vs-rail);
	color: var(--vs-rail-on);
	border-radius: 0 26px 0 0;
}

.vs-body .vs-rail-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-bottom: 18px;
	border-radius: 13px;
	background: #fff;
	color: var(--vs-rail);
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
	overflow: hidden;
}

.vs-rail-mark img { width: 34px; height: 34px; object-fit: contain; }

.vs-body .vs-rail-i {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 60px;
	padding: 10px 4px 8px;
	border-radius: 13px;
	color: inherit;
	text-decoration: none;
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	opacity: .78;
}

.vs-rail-i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vs-rail-i:hover, .vs-rail-i.is-on { opacity: 1; background: rgba(255, 255, 255, .16); }

.vs-room { min-width: 0; padding: 16px 26px 40px; }

.vs-room-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	padding: 10px 14px 10px 18px;
	background: var(--vs-card);
	border-radius: var(--vs-r);
}

.vs-room-title { min-width: 0; }
.vs-room-title a { display: block; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vs-me { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.vs-me img { width: 36px; height: 36px; border-radius: 50%; }

.vidthic.is-classroom {
	--vt-gold: var(--vs-accent);
	--vt-ink: var(--vs-ink);
	--vt-dim: var(--vs-mu);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 370px;
	gap: 22px;
	align-items: start;
	margin: 0;
	font-size: 14px;
}

.is-classroom .vidthic-stage-wrap { margin: 0; border-radius: 18px; }
.is-classroom .vidthic-collapse { display: none; }
.is-classroom .vidthic-now { padding: 14px 18px; }
.is-classroom .vidthic-now-title { font-size: 15px; }

.vs-stage-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	padding: 20px;
	border-radius: 18px;
	background: #14161b;
	color: rgba(255, 255, 255, .7);
	text-align: center;
}

.vs-curr {
	position: sticky;
	top: 16px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 16px 16px 8px;
	background: var(--vs-card);
	border-radius: 18px;
}

.vs-curr-head { padding: 2px 4px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--vs-ln); }
.vs-curr-t { margin: 0 0 10px; font-weight: 800; }
.vs-curr-head .vs-strip { height: 7px; margin-bottom: 10px; }
.vs-curr-head .vidthic-bar { display: none; }
.vs-curr-head .vidthic-bar-note { margin: 0; font-size: 12.5px; color: var(--vs-mu); }

.is-classroom .vidthic-body { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.is-classroom .vidthic-section + .vidthic-section { border-top-color: var(--vs-ln); }
.is-classroom .vidthic-section-toggle { padding: 12px 4px; font-size: 14px; color: var(--vs-ink); }
.is-classroom .vidthic-item-btn { font-size: 14px; color: var(--vs-ink); }
.is-classroom .vidthic-item-btn:hover:not([disabled]) { background: var(--vs-soft); }
.is-classroom .vidthic-item.is-active .vidthic-item-btn { background: color-mix(in srgb, var(--vs-accent) 10%, var(--vs-card)); }
.is-classroom .vidthic-done-btn:hover { background: var(--vs-soft); }
.is-classroom .vidthic-quiz { background: var(--vs-soft); border-color: var(--vs-ln); }
.is-classroom .vidthic-quiz.is-exam { background: color-mix(in srgb, var(--vs-accent) 6%, var(--vs-card)); }
.is-classroom .vidthic-quiz-badge { background: var(--vs-ln); color: var(--vs-ink); }
.is-classroom .vidthic-opt { border-color: var(--vs-ln); }
.is-classroom .vidthic-opt input { accent-color: var(--vs-accent); }
.is-classroom .vidthic-quiz-submit:hover { background: var(--vs-accent); filter: brightness(.92); }

.vs-about { margin-top: 18px; padding: 20px 22px 8px; background: var(--vs-card); border-radius: 18px; }
.vs-about h2 { margin: 0 0 10px; font-size: 17px; }
.vs-about .vs-desc { font-size: 15px; color: var(--vs-mu); }

/* ---------- Menu samping bisa disembunyikan ---------- */

.vs-app.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.vs-app.is-collapsed .vs-rail { display: none; }

.vs-collapse {
	flex: 0 0 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 4px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--vs-soft);
	color: var(--vs-ink);
	cursor: pointer;
}

.vs-collapse:hover { background: var(--vs-ln); }
.vs-collapse svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.vs-app.is-collapsed .vs-collapse { background: var(--vs-ink); color: #fff; }

.vs-room-top { justify-content: flex-start; }
.vs-room-title { flex: 1; }
.vs-room-title span { display: block; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Kelas saya di dalam kerangka ---------- */

.vs-mine-note { margin: 4px 2px 18px; color: var(--vs-mu); font-size: 15px; }
.vs-mine .vs-flag.is-owned { display: none; }
.vs-mine .vs-empty { background: var(--vs-card); border-style: solid; border-color: transparent; }
.vs-mine .vs-empty p + p { margin-top: 6px; }

@media (max-width: 1280px) {
	.vs-mine .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1281px) {
	.vs-app.is-collapsed .vs-mine .vs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Layar kecil ---------- */

@media (max-width: 1080px) {
	.vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vidthic.is-classroom { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 900px) {
	.vs-detail { grid-template-columns: 1fr; gap: 0; }
	.vs-side { position: static; order: -1; margin: 0 0 26px; }
	.vs-main { display: contents; }
	.vs-hero { order: -3; }
	.vs-detail h1 { order: -2; }
	.vs-detail > .vs-main > .vs-facts { order: -2; }

	.vidthic.is-classroom { grid-template-columns: 1fr; }
	.vs-curr { position: static; max-height: none; }
}

@media (max-width: 640px) {
	.vs-grid { grid-template-columns: 1fr; }
	.vs-top { padding: 14px 16px; }
	.vs-wrap, .vs-detail { padding-left: 16px; padding-right: 16px; }
	.vs-vids { padding-left: 18px; }

	.vs-app { grid-template-columns: 1fr; }

	.vs-rail {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 50;
		top: auto;
		height: auto;
		flex-direction: row;
		justify-content: space-around;
		padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
		border-radius: 18px 18px 0 0;
	}

	.vs-body .vs-rail-mark { display: none; }
	.vs-collapse { display: none; }
	.vs-app.is-collapsed .vs-rail { display: flex; }
	.vs-mine .vs-grid { grid-template-columns: 1fr; }
	.vs-room { padding: 12px 12px 96px; }
	.vs-room-top { padding: 8px 10px 8px 14px; }
	.vs-me span { display: none; }
	.is-classroom .vidthic-stage-wrap { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.vs-sheet-box { animation: none; }
	.vs-btn { transition: none; }
}
