/* ==========================================================================
   فرم عضویت خبرنامه - نسخه‌ی نمایشی مدرن
   پس‌زمینه‌ی متحرک با هفت رنگ چرخشی که به‌صورت محو-به-پیدا در هم تبدیل می‌شوند
   ========================================================================== */

.enc-signup-form-wrapper.enc-modern {
	position: relative;
	max-width: 420px;
	margin: 24px auto;
	padding: 2px; /* برای نمایش حاشیه‌ی رنگی متحرک دور کارت */
	border-radius: 22px;
	overflow: hidden;
	isolation: isolate;
	font-family: Tahoma, "Vazirmatn", sans-serif;
	direction: rtl;
}

/* لایه‌ی پس‌زمینه‌ی متحرک: گرادیان هفت‌رنگ که هم می‌چرخد (background-position)
   و هم رنگ‌هایش به‌صورت محو-به-پیدا (fade) در چرخه تغییر می‌کند */
.enc-signup-form-wrapper.enc-modern::before {
	content: "";
	position: absolute;
	inset: -60%;
	z-index: -1;
	background: linear-gradient(
		135deg,
		#ff3b6b 0%,
		#ff8c42 14.28%,
		#ffd93d 28.57%,
		#3ddc84 42.85%,
		#3da9fc 57.14%,
		#8c52ff 71.42%,
		#ff5ac8 85.71%,
		#ff3b6b 100%
	);
	background-size: 400% 400%;
	filter: blur(40px) saturate(160%);
	animation:
		enc-bg-move 18s ease-in-out infinite,
		enc-bg-fade 9s ease-in-out infinite alternate;
}

@keyframes enc-bg-move {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

@keyframes enc-bg-fade {
	0% {
		opacity: 0.55;
	}
	50% {
		opacity: 0.95;
	}
	100% {
		opacity: 0.55;
	}
}

/* کارت شیشه‌ای محتوا، بالای پس‌زمینه‌ی متحرک */
.enc-signup-form-wrapper.enc-modern .enc-signup-content {
	position: relative;
	background: rgba(20, 20, 30, 0.72);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-radius: 20px;
	padding: 32px 28px;
	color: #ffffff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	text-align: center;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-subtitle {
	margin: 0 0 20px;
	font-size: 13px;
	text-align: center;
	color: rgba(255, 255, 255, 0.75);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-message {
	padding: 10px 14px;
	margin-bottom: 16px;
	border-radius: 10px;
	font-size: 13px;
	text-align: center;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-success {
	background: rgba(61, 220, 132, 0.18);
	border: 1px solid rgba(61, 220, 132, 0.5);
	color: #bdfcd6;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-error {
	background: rgba(255, 90, 90, 0.18);
	border: 1px solid rgba(255, 90, 90, 0.5);
	color: #ffd0d0;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	margin-bottom: 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font-size: 14px;
	outline: none;
	transition: border-color 0.25s ease, background 0.25s ease;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form input[type="email"]::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form input[type="email"]:focus {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.14);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form button {
	width: 100%;
	padding: 13px 16px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, #ff3b6b, #8c52ff, #3da9fc);
	background-size: 200% 200%;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	animation: enc-btn-glow 6s ease infinite;
	transition: transform 0.15s ease;
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form button:hover {
	transform: translateY(-1px);
}

.enc-signup-form-wrapper.enc-modern .enc-signup-form button:active {
	transform: translateY(0);
}

@keyframes enc-btn-glow {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

/* کاهش انیمیشن برای کاربرانی که حرکت را کاهش‌داده‌اند (دسترسی‌پذیری) */
@media (prefers-reduced-motion: reduce) {
	.enc-signup-form-wrapper.enc-modern::before,
	.enc-signup-form-wrapper.enc-modern .enc-signup-form button {
		animation: none;
	}
}
