.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-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;
}

@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;
	}
}
