/* Scratch & Win Popup Styles — full screen with festive gold confetti */
.sdmw-scratch-container {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10001;
}
.sdmw-scratch-container[aria-hidden="false"] {
	display: flex;
}

/* Legacy overlay div is no longer the dimming layer — the modal itself is
   the full-screen surface. Hide it so it can't interfere with flex layout. */
.sdmw-scratch-overlay {
	display: none;
}

/* The modal itself is the full-screen surface. */
.sdmw-scratch-modal {
	position: fixed;
	inset: 0;
	z-index: 1;
	width: 100vw;
	height: 100vh;
	max-width: none;
	border-radius: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;

	/* Navy base gradient (matches theme #1a2533) */
	background-color: #0f1a26;
	background-image:
		linear-gradient(135deg, #0f1a26 0%, #1a2533 55%, #0f1a26 100%);

	/* Festive gold confetti dots + brighter sparkles (pure CSS, no image) */
	background-attachment: fixed;
	background-repeat: no-repeat;
}

/* Confetti layer drawn over the navy base via a pseudo-element so the
   gradient and the dots don't fight each other in one background shorthand. */
.sdmw-scratch-modal::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(circle at 8% 14%, rgba(245, 197, 66, 0.9) 0 3px, transparent 4px),
		radial-gradient(circle at 22% 78%, rgba(245, 197, 66, 0.75) 0 4px, transparent 5px),
		radial-gradient(circle at 35% 22%, rgba(255, 215, 120, 1) 0 2px, transparent 3px),
		radial-gradient(circle at 47% 88%, rgba(245, 197, 66, 0.6) 0 5px, transparent 6px),
		radial-gradient(circle at 58% 12%, rgba(245, 197, 66, 0.85) 0 3px, transparent 4px),
		radial-gradient(circle at 68% 64%, rgba(255, 215, 120, 0.9) 0 4px, transparent 5px),
		radial-gradient(circle at 78% 30%, rgba(245, 197, 66, 0.7) 0 2px, transparent 3px),
		radial-gradient(circle at 88% 72%, rgba(245, 197, 66, 0.8) 0 4px, transparent 5px),
		radial-gradient(circle at 14% 52%, rgba(255, 215, 120, 0.8) 0 3px, transparent 4px),
		radial-gradient(circle at 92% 18%, rgba(245, 197, 66, 0.65) 0 3px, transparent 4px),
		radial-gradient(circle at 42% 46%, rgba(245, 197, 66, 0.5) 0 2px, transparent 3px),
		radial-gradient(circle at 72% 92%, rgba(255, 215, 120, 0.7) 0 3px, transparent 4px),
		radial-gradient(circle at 5% 90%, rgba(245, 197, 66, 0.7) 0 4px, transparent 5px),
		radial-gradient(circle at 95% 50%, rgba(245, 197, 66, 0.55) 0 2px, transparent 3px),
		radial-gradient(circle at 30% 60%, rgba(255, 215, 120, 0.55) 0 2px, transparent 3px),
		radial-gradient(circle at 64% 40%, rgba(245, 197, 66, 0.5) 0 3px, transparent 4px),
		radial-gradient(circle at 50% 5%, rgba(255, 215, 120, 0.85) 0 3px, transparent 4px),
		radial-gradient(circle at 82% 85%, rgba(245, 197, 66, 0.6) 0 4px, transparent 5px),
		radial-gradient(circle at 18% 34%, rgba(245, 197, 66, 0.45) 0 2px, transparent 3px),
		radial-gradient(circle at 54% 72%, rgba(255, 215, 120, 0.6) 0 3px, transparent 4px);
	background-repeat: no-repeat;
}

/* Soft vignette to focus attention toward the center. */
.sdmw-scratch-modal::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

.sdmw-scratch-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: 64px 24px 32px;
	text-align: center;
}

.sdmw-scratch-title {
	margin: 0 0 8px;
	font-size: 2.1rem;
	font-weight: 800;
	color: #ffffff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
	letter-spacing: 0.3px;
}
.sdmw-scratch-subtitle {
	margin: 0 0 22px;
	color: #d1d5db;
	font-size: 1.02rem;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.sdmw-scratch-card {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	height: 320px;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	user-select: none;
	-webkit-user-select: none;
}
.sdmw-scratch-reveal {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #fff7e6, #ffe9c2);
	color: #1a2533;
}
.sdmw-scratch-hint {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 0 20px;
}
.sdmw-scratch-hint-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a2533;
	color: #fff;
	font-size: 1.9rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sdmw-scratch-hint-text {
	font-weight: 700;
	font-size: 1.02rem;
}
.sdmw-scratch-prize {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 0 20px;
}
.sdmw-scratch-prize-label {
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: 0.8rem;
	color: #6b7280;
}
.sdmw-scratch-prize-name {
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1.1;
	color: #b45309;
}
.sdmw-scratch-code-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	justify-content: center;
	flex-wrap: wrap;
}
.sdmw-scratch-code {
	padding: 9px 13px;
	background: #1a2533;
	color: #fff;
	border-radius: 6px;
	font-weight: 800;
	letter-spacing: 0.5px;
}
.sdmw-scratch-copy {
	padding: 9px 13px;
	border: 1px solid #1a2533;
	background: #fff;
	color: #1a2533;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
}
.sdmw-scratch-copy:hover {
	background: #f8fafc;
}
.sdmw-scratch-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: pointer;
}
.sdmw-scratch-instruction {
	margin: 16px 0 0;
	color: #9ca3af;
	font-size: 0.9rem;
}
.sdmw-scratch-note {
	margin: 12px 0 0;
	color: #f5d97a;
	font-size: 0.98rem;
	font-weight: 600;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Close button pinned to the top-right of the SCREEN (not the modal corner). */
.sdmw-scratch-close {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #ffffff;
	color: #1a2533;
	font-size: 24px;
	line-height: 1;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.15s ease;
}
.sdmw-scratch-close:hover {
	background: #f5d97a;
	transform: scale(1.06);
}
.sdmw-scratch-close:focus-visible {
	outline: 3px solid #f5d97a;
	outline-offset: 2px;
}

/* Tablet */
@media (max-width: 768px) {
	.sdmw-scratch-card {
		max-width: 420px;
		height: 270px;
	}
	.sdmw-scratch-title {
		font-size: 1.8rem;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.sdmw-scratch-content {
		padding: 56px 16px 24px;
	}
	.sdmw-scratch-title {
		font-size: 1.5rem;
	}
	.sdmw-scratch-subtitle {
		font-size: 0.92rem;
	}
	.sdmw-scratch-card {
		max-width: 340px;
		height: 230px;
	}
	.sdmw-scratch-hint-icon {
		width: 48px;
		height: 48px;
		font-size: 1.6rem;
	}
	.sdmw-scratch-prize-name {
		font-size: 1.5rem;
	}
	.sdmw-scratch-close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 22px;
	}
}
