/* ===== پاپ‌آپ جذب لید | وب‌کد - نسخه ۲ (طراحی مدرن) ===== */

.lpw-container {
	--lpw-overlay-color: #000000;
	--lpw-overlay-opacity: 0.6;
	--lpw-bg: #ffffff;
	--lpw-title-color: #1a1a2e;
	--lpw-text-color: #666677;
	--lpw-accent: #6c5ce7;
	--lpw-accent-dark: #4834d4;
	--lpw-btn-bg: #6c5ce7;
	--lpw-btn-text: #ffffff;
	--lpw-btn-hover: #5849c4;
	--lpw-radius: 24px;
	--lpw-width: 420px;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	padding: 16px;
}

.lpw-container.lpw-visible {
	display: flex;
}

.lpw-overlay {
	position: absolute;
	inset: 0;
	background: var(--lpw-overlay-color);
	opacity: var(--lpw-overlay-opacity);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.lpw-popup {
	position: relative;
	width: min(94vw, var(--lpw-width));
	max-height: 92vh;
	overflow: hidden;
	background: var(--lpw-bg);
	border-radius: var(--lpw-radius);
	box-shadow:
		0 35px 90px -25px color-mix(in srgb, var(--lpw-accent) 55%, transparent),
		0 12px 35px rgba(0, 0, 0, 0.18);
	text-align: center;
	direction: rtl;
	font-family: inherit;
	display: flex;
	flex-direction: column;
}

/* --- انیمیشن‌های ورود --- */
.lpw-anim-scale { animation: lpwScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes lpwScaleIn {
	from { opacity: 0; transform: scale(0.8); }
	to   { opacity: 1; transform: scale(1); }
}
.lpw-anim-fade { animation: lpwFadeIn 0.45s ease; }
@keyframes lpwFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
.lpw-anim-slide-up { animation: lpwSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes lpwSlideUp {
	from { opacity: 0; transform: translateY(70px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ===== هدر گرادیانی تزئینی ===== */
.lpw-popup-header {
	position: relative;
	padding: 42px 24px 56px;
	background: linear-gradient(135deg, var(--lpw-accent), color-mix(in srgb, var(--lpw-accent) 55%, #1a1a2e 45%));
	overflow: hidden;
	flex-shrink: 0;
}
.lpw-popup-header::before,
.lpw-popup-header::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	filter: blur(2px);
}
.lpw-popup-header::before {
	width: 140px;
	height: 140px;
	top: -60px;
	right: -40px;
}
.lpw-popup-header::after {
	width: 100px;
	height: 100px;
	bottom: -50px;
	left: -30px;
	background: rgba(255, 255, 255, 0.12);
}

.lpw-close {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 34px;
	height: 34px;
	border: none;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 5;
	backdrop-filter: blur(4px);
}
.lpw-close:hover {
	background: rgba(255, 255, 255, 0.35);
	transform: rotate(90deg);
}

.lpw-icon-badge {
	position: relative;
	z-index: 2;
	width: 82px;
	height: 82px;
	margin: 0 auto;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	border: 3px solid rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
	animation: lpwFloat 3s ease-in-out infinite;
	overflow: hidden;
}
.lpw-icon-badge img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
@keyframes lpwFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-7px); }
}

/* ===== بدنه‌ی روکش‌شونده روی هدر ===== */
.lpw-popup-body {
	position: relative;
	z-index: 3;
	margin-top: -32px;
	background: var(--lpw-bg);
	border-radius: 26px 26px 0 0;
	padding: 30px 26px 26px;
	text-align: center;
	overflow-y: auto;
}

.lpw-popup-title {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 800;
	color: var(--lpw-title-color);
	line-height: 1.55;
}

.lpw-popup-desc {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--lpw-text-color);
}

.lpw-form-row {
	margin-bottom: 12px;
}

.lpw-input {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 18px;
	border-radius: 14px;
	border: 1.5px solid #ececf3;
	font-size: 14px;
	font-family: inherit;
	text-align: right;
	background: #f8f8fc;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	outline: none;
}
.lpw-input:focus {
	border-color: var(--lpw-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--lpw-accent) 16%, transparent);
	background: #fff;
}
.lpw-input::placeholder {
	color: #a8a8b8;
}

.lpw-honeypot {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

.lpw-submit-btn {
	position: relative;
	overflow: hidden;
	width: 100%;
	padding: 15px 18px;
	border: none;
	border-radius: 50px;
	background: linear-gradient(135deg, var(--lpw-btn-bg), color-mix(in srgb, var(--lpw-btn-bg) 70%, #000 20%));
	color: var(--lpw-btn-text);
	font-size: 15.5px;
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	margin-top: 8px;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--lpw-btn-bg) 65%, transparent);
	letter-spacing: 0.2px;
}
.lpw-submit-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 45%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
	transform: skewX(-20deg);
}
.lpw-submit-btn:hover::before {
	animation: lpwShine 0.9s forwards;
}
@keyframes lpwShine {
	from { left: -75%; }
	to { left: 130%; }
}
.lpw-submit-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 32px -8px color-mix(in srgb, var(--lpw-btn-bg) 75%, transparent);
}
.lpw-submit-btn:active {
	transform: translateY(-1px);
}
.lpw-submit-btn[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.lpw-privacy {
	margin: 14px 0 0;
	font-size: 11.5px;
	color: #aaaab8;
}

.lpw-success {
	text-align: center;
	padding: 10px 0 4px;
}
.lpw-success-icon {
	width: 64px;
	height: 64px;
	line-height: 64px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--lpw-accent) 15%, transparent);
	color: var(--lpw-accent);
	font-size: 30px;
	margin: 0 auto 16px;
	animation: lpwPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lpwPop {
	0% { transform: scale(0); }
	70% { transform: scale(1.15); }
	100% { transform: scale(1); }
}
.lpw-success p {
	color: var(--lpw-title-color);
	font-weight: 700;
	font-size: 15px;
	margin: 0;
	line-height: 1.8;
}

@media (max-width: 480px) {
	.lpw-popup-header { padding: 34px 20px 48px; }
	.lpw-icon-badge { width: 70px; height: 70px; font-size: 32px; }
	.lpw-popup-body { padding: 24px 20px 22px; }
	.lpw-popup-title { font-size: 18.5px; }
}

.lpw-hide-mobile {
	display: none !important;
}
@media (min-width: 769px) {
	.lpw-hide-mobile {
		display: flex !important;
	}
}

/* ===== استایل پیش‌نمایش در پنل مدیریت ===== */
.lpw-preview-frame {
	position: relative;
	min-height: 560px;
	border-radius: 16px;
	overflow: hidden;
	background: linear-gradient(135deg, #f0f0f5, #e4e4ee);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.lpw-preview-frame .lpw-overlay {
	position: absolute;
}
.lpw-preview-frame .lpw-popup {
	position: relative;
	width: 100%;
	max-width: 340px;
}
