/* Forced Video Player (VPF) styles */

.vpf-container {
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Warna default (bisa dioverride lewat atribut shortcode color / progress_color) */
	--vpf-color: #2ecc71;
	--vpf-color-rgb: 46, 204, 113;
	--vpf-progress-color: #2ecc71;
	--vpf-progress-color-rgb: 46, 204, 113;
}

.vpf-glow-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	overflow: hidden;
	background: #000;
	box-shadow:
		0 0 0 1px rgba(var(--vpf-color-rgb), 0.35),
		0 0 40px 6px rgba(var(--vpf-color-rgb), 0.35),
		0 0 90px 20px rgba(var(--vpf-color-rgb), 0.18);
	transition: box-shadow 0.4s ease;
}

.vpf-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #000;
	/* mencegah interaksi langsung (klik/tap) memicu native play/pause toggle */
	pointer-events: none;
}

/* === Spinner buffering / loading === */
.vpf-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border: 4px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--vpf-color);
	border-radius: 50%;
	animation: vpf-spin 0.8s linear infinite;
	display: none;
	z-index: 5;
}

.vpf-container.vpf-buffering .vpf-spinner {
	display: block;
}

@keyframes vpf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* === Tombol play awal === */
.vpf-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: rgba(var(--vpf-color-rgb), 0.9);
	border: 3px solid #fff;
	color: #fff;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 6;
	transition: transform 0.15s ease, background 0.15s ease;
}

.vpf-play-btn:hover {
	transform: translate(-50%, -50%) scale(1.06);
	background: rgba(var(--vpf-color-rgb), 1);
}

.vpf-play-icon {
	margin-left: 4px;
}

.vpf-container.vpf-hide-play .vpf-play-btn {
	display: none;
}

/* Pastikan atribut HTML "hidden" selalu menang atas display:flex di bawah */
.vpf-overlay[hidden] {
	display: none !important;
}

/* === Overlay umum (resume & finished) === */
.vpf-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, #04140a 0%, #06210f 100%);
	border: 1px solid rgba(var(--vpf-color-rgb), 0.6);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	z-index: 7;
}

.vpf-overlay-title {
	color: #fff;
	font-size: clamp(16px, 2.4vw, 22px);
	font-weight: 700;
	margin: 0 0 20px;
	text-shadow: 0 0 12px rgba(var(--vpf-color-rgb), 0.6);
}

.vpf-overlay-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	justify-content: center;
}

.vpf-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 4px;
}

.vpf-btn-icon {
	width: 34px;
	height: 34px;
	flex: none;
	border-radius: 50%;
	border: 2px solid #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
}

.vpf-btn:hover .vpf-btn-icon {
	background: rgba(255, 255, 255, 0.15);
}

/* === Progress bar === */
.vpf-progress-track {
	width: 100%;
	height: 6px;
	background: rgba(var(--vpf-progress-color-rgb), 0.15);
	border-radius: 0 0 12px 12px;
	overflow: hidden;
	margin-top: 2px;
}

.vpf-progress-fill {
	height: 100%;
	width: 0%;
	background: var(--vpf-progress-color);
	box-shadow: 0 0 8px 1px rgba(var(--vpf-progress-color-rgb), 0.8);
	transition: width 0.2s linear;
}
