/* گردونه شانس - استایل نمایش عمومی */
.lwp-overlay,
.lwp-overlay * {
	box-sizing: border-box;
}

.lwp-overlay {
	position: fixed;
	inset: 0;
	background: rgba(5, 8, 20, 0.72);
	backdrop-filter: blur(4px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: lwp-fade-in .3s ease;
	font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}
@keyframes lwp-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lwp-modal {
	border-radius: 26px;
	max-width: 440px;
	width: 92%;
	padding: 32px 22px 26px;
	position: relative;
	text-align: center;
	animation: lwp-pop-in .45s cubic-bezier(.34,1.56,.64,1);
	overflow: hidden;
	/* پس‌زمینه پیش‌فرض (تم تیره) مستقیماً همینجا تعریف شده، نه فقط زیرِ کلاس جاوااسکریپتی،
	   تا حتی در کسری از ثانیه‌ی قبل از اجرای اسکریپت هم پاپ‌آپ سفید/خالی دیده نشود. */
	background:
		radial-gradient(circle at 50% -10%, rgba(240,195,77,.28) 0%, rgba(240,195,77,0) 45%),
		linear-gradient(160deg, #132b6b 0%, #0c1c4a 55%, #071230 100%);
	box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255, 214, 120, .35) inset, 0 0 40px rgba(240,195,77,.15);
}
@keyframes lwp-pop-in { from { transform: scale(.78); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lwp-pos-bottom-right { position: fixed; bottom: 20px; left: 20px; margin: 0; }
.lwp-pos-bottom-left { position: fixed; bottom: 20px; right: 20px; margin: 0; }

.lwp-confetti-canvas {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.lwp-close-btn {
	position: absolute;
	top: 14px;
	left: 16px;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 15px;
	cursor: pointer;
	line-height: 1;
	z-index: 6;
	transition: transform .15s ease, background .15s ease;
	background: rgba(255,255,255,.12);
	color: #ffe9a8;
}
.lwp-close-btn:hover { transform: scale(1.08); background: rgba(255,255,255,.22); }

.lwp-modal-inner { position: relative; z-index: 2; }

.lwp-title {
	margin: 4px 0 4px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.2px;
	color: #ffdf80;
	text-shadow: 0 2px 10px rgba(255,204,0,.35);
}
.lwp-subtitle { margin: 0 0 20px; font-size: 14px; font-weight: 500; color: #cdd6f5; }

.lwp-wheel-wrap {
	position: relative;
	width: fit-content;
	margin: 6px auto 24px;
}
.lwp-wheel-wrap.lwp-spinning #lwp-wheel-canvas {
	filter: drop-shadow(0 0 20px rgba(240, 185, 11, .55));
}

.lwp-lights-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 1;
}
.lwp-light-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	margin: -4.5px 0 0 -4.5px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fffbe0, #ffce4d 60%, #c98d0e 100%);
	box-shadow: 0 0 7px 2px rgba(255, 200, 80, .85);
	animation: lwp-blink 1.1s infinite ease-in-out;
}
.lwp-light-b { animation-direction: reverse; }
@keyframes lwp-blink {
	0%, 100% { opacity: .4; transform: scale(.78); }
	50% { opacity: 1; transform: scale(1.18); }
}

.lwp-pointer {
	position: absolute;
	top: -16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	filter: drop-shadow(0 3px 5px rgba(0,0,0,.45));
	transition: transform .12s ease;
}
.lwp-pointer.lwp-pointer-hit { animation: lwp-pointer-bounce .45s ease; }
@keyframes lwp-pointer-bounce {
	0% { transform: translateX(-50%) rotate(0deg); }
	25% { transform: translateX(-50%) rotate(-18deg); }
	55% { transform: translateX(-50%) rotate(12deg); }
	80% { transform: translateX(-50%) rotate(-6deg); }
	100% { transform: translateX(-50%) rotate(0deg); }
}

#lwp-wheel-canvas {
	display: block;
	border-radius: 50%;
	position: relative;
	z-index: 2;
	will-change: transform;
	/* حلقه فلزی طلایی چندلایه دور گردونه */
	box-shadow:
		0 0 0 5px #fff8e1,
		0 0 0 9px #d9a520,
		0 0 0 12px #f7dd8a,
		0 0 0 16px #a8720c,
		0 0 0 18px #ecc766,
		0 18px 44px rgba(0,0,0,.5);
}

.lwp-email-gate { margin-bottom: 16px; text-align: right; }
.lwp-email-gate label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; color: #ffe9a8; }
.lwp-email-gate input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid rgba(255,255,255,.18);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	letter-spacing: .5px;
	transition: border-color .15s ease;
	background: rgba(255,255,255,.08);
	color: #fff;
}
.lwp-email-gate input::placeholder { color: rgba(255,255,255,.45); }
.lwp-email-gate input:focus { outline: none; border-color: #f0c34d; background: rgba(255,255,255,.13); }
.lwp-error { color: #ff6b81; font-size: 12.5px; margin: 7px 0 0; font-weight: 700; }

.lwp-spin-btn {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #fff3c4 0%, #f0c34d 35%, #e0a318 70%, #b9820e 100%);
	color: #3a2607;
	border: none;
	padding: 16px 26px;
	border-radius: 999px;
	font-size: 17px;
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	width: 100%;
	box-shadow: 0 12px 26px -6px rgba(224, 163, 24, .65), inset 0 1px 0 rgba(255,255,255,.8);
	transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.lwp-spin-btn::after {
	content: "";
	position: absolute;
	top: 0; left: -60%;
	width: 40%; height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255,255,255,.75), transparent);
	transform: skewX(-20deg);
	animation: lwp-shine 2.6s ease-in-out infinite;
}
@keyframes lwp-shine {
	0% { left: -60%; }
	45%, 100% { left: 130%; }
}
.lwp-spin-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -6px rgba(224, 163, 24, .75), inset 0 1px 0 rgba(255,255,255,.8); }
.lwp-spin-btn:active { transform: translateY(0); }
.lwp-spin-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.lwp-spin-btn.lwp-btn-loading::before {
	content: "";
	position: absolute; inset: 0;
	background: rgba(255,255,255,.25);
}

.lwp-result { margin-top: 6px; }
.lwp-result.lwp-pop { animation: lwp-result-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes lwp-result-pop {
	0% { opacity: 0; transform: scale(.6) translateY(10px); }
	100% { opacity: 1; transform: scale(1) translateY(0); }
}

.lwp-result-icon {
	font-size: 48px;
	margin-bottom: 8px;
	animation: lwp-icon-bounce .6s ease .1s both;
}
@keyframes lwp-icon-bounce {
	0% { transform: scale(0); }
	60% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

.lwp-result-label { font-size: 20px; font-weight: 800; margin: 0 0 14px; color: #fff; }

.lwp-coupon-box { display: flex; gap: 8px; margin-bottom: 16px; }
.lwp-coupon-box input {
	flex: 1;
	text-align: center;
	letter-spacing: 1.5px;
	font-weight: 800;
	font-family: inherit;
	padding: 12px;
	border: 2px dashed #e0a318;
	border-radius: 10px;
	background: rgba(240, 195, 77, .12);
	color: #ffe9a8;
}
.lwp-coupon-box button {
	background: linear-gradient(135deg, #f0c34d, #b9820e);
	color: #3a2607;
	border: none;
	border-radius: 10px;
	padding: 0 18px;
	cursor: pointer;
	font-weight: 700;
	font-family: inherit;
	white-space: nowrap;
}

.lwp-min-purchase-note {
	font-size: 12.5px;
	color: #ffe9a8;
	background: rgba(255,255,255,.08);
	border: 1px dashed rgba(255, 214, 120, .4);
	border-radius: 8px;
	padding: 7px 10px;
	margin: -6px 0 14px;
	line-height: 1.7;
}

.lwp-result-close {
	border: none;
	padding: 11px 24px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 700;
	font-family: inherit;
	transition: background .15s ease, transform .15s ease;
	background: rgba(255,255,255,.1);
	color: #fff;
}
.lwp-result-close:hover { transform: translateY(-1px); background: rgba(255,255,255,.18); }

.lwp-closed-text { font-size: 14px; margin-top: 12px; font-weight: 600; color: #cdd6f5; }

/* ============ تم تیره: از همان استایل‌های پیش‌فرض بالا استفاده می‌شود (نیازی به کلاس اضافه نیست) ============ */

/* ============ تم روشن ============ */
.lwp-theme-light .lwp-modal {
	background: linear-gradient(180deg, #ffffff 0%, #fbf7fa 100%);
	box-shadow: 0 25px 70px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.04) inset;
}
.lwp-theme-light .lwp-modal::before {
	content: "";
	position: absolute;
	top: -40%; left: 50%;
	width: 300px; height: 300px;
	transform: translateX(-50%);
	background: radial-gradient(circle, var(--lwp-primary-light, #f8ecc9) 0%, rgba(255,255,255,0) 70%);
	opacity: .6;
	pointer-events: none;
	z-index: 0;
}
.lwp-theme-light .lwp-close-btn { background: rgba(0,0,0,.05); color: #888; }
.lwp-theme-light .lwp-close-btn:hover { background: rgba(0,0,0,.1); color: #222; }
.lwp-theme-light .lwp-title { color: #221a2b; }
.lwp-theme-light .lwp-subtitle { color: #726c7a; }
.lwp-theme-light .lwp-email-gate label { color: #4a4552; }
.lwp-theme-light .lwp-email-gate input { background: #fbfafc; color: #221a2b; border-color: #e5e0e8; }
.lwp-theme-light .lwp-email-gate input:focus { outline: none; border-color: var(--lwp-primary, #e0a318); background: #fff; }
.lwp-theme-light .lwp-result-label { color: #221a2b; }
.lwp-theme-light .lwp-coupon-box input { color: #221a2b; }
.lwp-theme-light .lwp-result-close { background: #f2eef2; color: #4a4552; }
.lwp-theme-light .lwp-result-close:hover { background: #e6e0e6; }
.lwp-theme-light .lwp-closed-text { color: #726c7a; }
.lwp-theme-light .lwp-min-purchase-note { color: #7a5a12; background: rgba(224,163,24,.08); border-color: rgba(224,163,24,.35); }

@media (max-width: 480px) {
	.lwp-modal { padding: 26px 16px 20px; }
	.lwp-title { font-size: 21px; }
}
