/**
 * افکت پس‌زمینه منو — فقط CSS محلی (بدون CDN)
 */

.wpcrm-nav__panel {
	position: relative;
	overflow: visible;
}

.wpcrm-nav__bg-effect {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	border-radius: inherit;
	overflow: hidden;
}

.wpcrm-nav__bg-effect-canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
	opacity: 0.92;
}

.wpcrm-nav__panel > .wpcrm-nav__list,
.wpcrm-nav__panel .wpcrm-nav__list--root {
	position: relative;
	z-index: 2;
}

/* —— باران —— */
.wpcrm-nav__bg-effect--rain::before,
.wpcrm-nav__bg-effect--rain::after {
	content: "";
	position: absolute;
	inset: -40% 0 0;
	background-image: repeating-linear-gradient(
		183deg,
		transparent 0,
		transparent 14px,
		rgba(255, 255, 255, 0.35) 14px,
		rgba(255, 255, 255, 0.35) 15px
	);
	animation: wpcrm-fx-rain 0.65s linear infinite;
	opacity: 0.55;
}

.wpcrm-nav__bg-effect--rain::after {
	animation-duration: 0.9s;
	animation-delay: -0.35s;
	opacity: 0.35;
	transform: translateX(12px);
}

@keyframes wpcrm-fx-rain {
	to {
		transform: translateY(55%);
	}
}

/* —— برف —— */
.wpcrm-nav__bg-effect--snow::before {
	content: "";
	position: absolute;
	inset: -20% -10%;
	background-image:
		radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),
		radial-gradient(2px 2px at 80px 120px, rgba(255, 255, 255, 0.75), transparent),
		radial-gradient(1.5px 1.5px at 150px 60px, rgba(255, 255, 255, 0.8), transparent),
		radial-gradient(2px 2px at 220px 180px, rgba(255, 255, 255, 0.7), transparent),
		radial-gradient(1.5px 1.5px at 40px 200px, rgba(255, 255, 255, 0.85), transparent);
	background-size: 260px 260px;
	animation: wpcrm-fx-snow 14s linear infinite;
	opacity: 0.75;
}

@keyframes wpcrm-fx-snow {
	to {
		transform: translateY(28%);
	}
}

/* —— شفق —— */
.wpcrm-nav__bg-effect--aurora {
	background: linear-gradient(
		125deg,
		transparent 0%,
		rgba(34, 211, 238, 0.2) 25%,
		rgba(167, 139, 250, 0.28) 50%,
		rgba(52, 211, 153, 0.22) 75%,
		transparent 100%
	);
	background-size: 240% 240%;
	animation: wpcrm-fx-aurora 16s ease-in-out infinite;
	opacity: 0.85;
	mix-blend-mode: screen;
}

@keyframes wpcrm-fx-aurora {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

/* —— حباب —— */
.wpcrm-nav__bg-effect--bubbles::before,
.wpcrm-nav__bg-effect--bubbles::after {
	content: "";
	position: absolute;
	bottom: -20%;
	left: 15%;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.45);
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 70%);
	animation: wpcrm-fx-bubble 7s ease-in infinite;
}

.wpcrm-nav__bg-effect--bubbles::after {
	left: 62%;
	width: 10px;
	height: 10px;
	animation-duration: 9s;
	animation-delay: -3s;
}

@keyframes wpcrm-fx-bubble {
	0% {
		transform: translateY(0) scale(0.6);
		opacity: 0;
	}
	15% {
		opacity: 0.7;
	}
	100% {
		transform: translateY(-220%) scale(1.1);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcrm-nav__bg-effect--rain::before,
	.wpcrm-nav__bg-effect--rain::after,
	.wpcrm-nav__bg-effect--snow::before,
	.wpcrm-nav__bg-effect--aurora,
	.wpcrm-nav__bg-effect--bubbles::before,
	.wpcrm-nav__bg-effect--bubbles::after {
		animation: none !important;
	}
}

@media (max-width: 782px) {
	.wpcrm-nav__bg-effect--rain::before,
	.wpcrm-nav__bg-effect--rain::after,
	.wpcrm-nav__bg-effect--snow::before,
	.wpcrm-nav__bg-effect--aurora,
	.wpcrm-nav__bg-effect--bubbles::before,
	.wpcrm-nav__bg-effect--bubbles::after {
		animation: none !important;
	}
}
