/* Manta Exit Popup - overlay + dialog, fade עדין */

:root {
	--mep-accent: #8000d7;
	--mep-accent-hover: #6a00b3;
	--mep-text: #1f1f1f;
	--mep-title-size: 24px;
	--mep-title-weight: 600;
	--mep-content-size: 16px;
	--mep-btn-size: 16px;
	--mep-fade: 280ms;
}

.mep-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity var(--mep-fade) ease;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.mep-overlay.mep-visible {
	opacity: 1;
}

.mep-overlay[hidden] {
	display: none;
}

.mep-dialog {
	position: relative;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	background: #fff;
	color: var(--mep-text);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	/* padding עליון מוגדל כדי שכפתור הסגירה לא יעלה על הכותרת */
	padding: 58px 40px 36px;
	text-align: center;
	transform: translateY(8px) scale(0.98);
	transition: transform var(--mep-fade) ease;
}

.mep-overlay.mep-visible .mep-dialog {
	transform: translateY(0) scale(1);
}

.mep-dialog[hidden] {
	display: none;
}

.mep-close {
	position: absolute;
	top: 14px;
	inset-inline-end: 16px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	color: var(--mep-text);
	cursor: pointer;
	transition: background-color 150ms ease;
}

.mep-close:hover {
	background: rgba(0, 0, 0, 0.06);
}

.mep-title {
	margin: 0 0 18px;
	font-size: var(--mep-title-size);
	font-weight: var(--mep-title-weight);
	line-height: 1.35;
	color: var(--mep-text);
}

.mep-content {
	margin: 0 0 28px;
	font-size: var(--mep-content-size);
	line-height: 1.6;
}

.mep-content p {
	margin: 0 0 12px;
}

.mep-content p:last-child {
	margin-bottom: 0;
}

.mep-actions {
	display: flex;
	justify-content: center;
	gap: 24px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.mep-btn {
	min-width: 130px;
	padding: 12px 30px;
	border: 0;
	border-radius: 999px;
	font-size: var(--mep-btn-size);
	font-weight: 600;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
	background: var(--mep-accent);
	color: #fff;
	transition: background-color 150ms ease, box-shadow 150ms ease;
}

.mep-btn:hover,
.mep-btn:focus-visible {
	background: var(--mep-accent-hover);
	color: #fff;
}

.mep-btn:focus-visible {
	outline: 2px solid var(--mep-accent);
	outline-offset: 3px;
}

@media (max-width: 480px) {
	.mep-dialog {
		padding: 56px 20px 26px;
	}

	.mep-title {
		font-size: calc(var(--mep-title-size) * 0.85);
	}

	.mep-actions {
		gap: 14px;
	}

	.mep-btn {
		min-width: 110px;
		padding: 11px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mep-overlay,
	.mep-dialog {
		transition: none;
	}
}
