.mpth-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mpth-overlay.mpth-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.mpth-modal {
	position: relative;
	width: 100%;
	max-width: min(var(--mpth-max-width, 650px), 94vw);
	max-height: 90vh;
	background: var(--mpth-bg, #ffffff);
	border-radius: var(--mpth-radius, 12px);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
	transform: scale(0.94) translateY(10px);
	transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
}

.mpth-overlay.mpth-open .mpth-modal {
	transform: scale(1) translateY(0);
}

.mpth-mode-banner .mpth-modal {
	background: transparent;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.mpth-close-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	background: rgba(15, 23, 42, 0.78);
	backdrop-filter: blur(4px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
	transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mpth-close-btn svg {
	display: block;
	width: 16px;
	height: 16px;
	pointer-events: none;
}

.mpth-close-btn:hover {
	background: #ef4444;
	border-color: #ffffff;
	transform: scale(1.08);
}

.mpth-close-btn.mpth-close-locked {
	cursor: not-allowed;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	opacity: 0.92;
}

.mpth-close-btn.mpth-close-locked:hover {
	background: rgba(15, 23, 42, 0.78);
	border-color: rgba(255, 255, 255, 0.85);
	transform: none;
}

.mpth-mode-donation .mpth-close-btn.mpth-close-locked:hover {
	background: rgba(15, 23, 42, 0.35);
	border-color: rgba(255, 255, 255, 0.55);
}

.mpth-modal-body {
	overflow: auto;
	border-radius: var(--mpth-radius, 12px);
}

.mpth-mode-banner .mpth-modal-body {
	overflow: hidden;
	line-height: 0;
}

.mpth-banner-link {
	display: block;
	line-height: 0;
}

.mpth-banner-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 86vh;
	object-fit: contain;
	border-radius: var(--mpth-radius, 12px);
}

.mpth-mode-editor .mpth-modal-body {
	padding: 28px 26px;
	color: #1e293b;
	line-height: 1.6;
}

.mpth-editor-content > :first-child {
	margin-top: 0;
}

.mpth-editor-content > :last-child {
	margin-bottom: 0;
}

.mpth-editor-content img {
	max-width: 100%;
	height: auto;
}

/* Custom Popup Donasi (QRIS) */
.mpth-mode-donation .mpth-modal {
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 28px 60px rgba(15, 23, 42, 0.35);
}

.mpth-mode-donation .mpth-modal-body {
	padding: 0;
	overflow-y: auto;
}

.mpth-mode-donation .mpth-close-btn {
	background: rgba(15, 23, 42, 0.35);
	border-color: rgba(255, 255, 255, 0.55);
}

.mpth-mode-donation .mpth-close-btn:hover {
	background: rgba(239, 68, 68, 0.92);
	border-color: #ffffff;
}

.mpth-donation-card {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	text-align: center;
	color: #1e293b;
}

.mpth-donation-header {
	background: linear-gradient(135deg, var(--mpth-accent, #2563eb) 0%, #0f172a 100%);
	color: #ffffff;
	padding: 28px 26px 24px;
	position: relative;
}

.mpth-donation-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(6px);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.mpth-donation-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.mpth-donation-subtitle {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
}

.mpth-donation-body {
	padding: 22px 24px 24px;
	background: #ffffff;
}

.mpth-qris-box {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 14px;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
	margin-bottom: 16px;
	max-width: 100%;
}

.mpth-qris-badge {
	display: inline-block;
	margin-bottom: 10px;
	padding: 3px 12px;
	border-radius: 999px;
	background: #eff6ff;
	color: var(--mpth-accent, #2563eb);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.mpth-qris-img {
	display: block;
	width: 220px;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	object-fit: contain;
}

.mpth-qris-placeholder {
	padding: 24px 16px;
	margin-bottom: 16px;
	background: #f8fafc;
	border: 1.5px dashed #cbd5e1;
	border-radius: 12px;
	color: #64748b;
	font-size: 13px;
}

.mpth-qris-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	max-width: 260px;
	padding: 11px 20px;
	margin: 0 auto 18px;
	border-radius: 10px;
	background: var(--mpth-accent, #2563eb);
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	cursor: pointer;
}

.mpth-qris-download-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
	color: #ffffff !important;
}

.mpth-qris-download-btn:active {
	transform: translateY(0);
}

.mpth-donation-footer {
	padding: 14px 16px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}

.mpth-donation-payment-note {
	margin: 0 0 6px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #475569;
}

.mpth-donation-thanks {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
}

@media (max-width: 600px) {
	.mpth-donation-header {
		padding: 24px 18px 20px;
	}

	.mpth-donation-title {
		font-size: 18px;
	}

	.mpth-donation-body {
		padding: 18px 16px 20px;
	}

	.mpth-qris-img {
		width: 190px;
	}
}

@media (max-width: 600px) {
	.mpth-overlay {
		padding: 12px;
	}

	.mpth-close-btn {
		top: 10px;
		right: 10px;
		width: 30px;
		height: 30px;
	}

	.mpth-close-btn svg {
		width: 14px;
		height: 14px;
	}

	.mpth-mode-editor .mpth-modal-body {
		padding: 20px 18px;
	}
}
