.mweb-spin-wrapper {
	display: flex;
	width: 100%;
	box-sizing: border-box;
}
.mweb-spin-app {
	width: 100%;
	position: relative;
	text-align: center;
	font-family: inherit;
	box-sizing: border-box;
}
.mweb-spin-app * { box-sizing: border-box; }

.mweb-spin-title {
	font-size: var(--mweb-spin-title-size, clamp(20px, 4vw, 30px));
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 48px;
	color: var(--mweb-spin-title-color, #212121);
	text-shadow: var(--mweb-spin-title-shadow, none);
}
.mweb-spin-highlight { color: var(--mweb-spin-title-highlight, #e0a800); }

.mweb-spin-wheel-stage {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 auto 24px;
}

.mweb-spin-pointer {
	position: absolute;
	top: 13%;
	left: 50%;
	width: 11.5%;
	transform: translate(-50%, -100%);
	z-index: 6;
	filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
}
.mweb-spin-pointer-flap {
	transform-origin: 50% 8%;
	will-change: transform;
}
.mweb-spin-pointer-flap svg {
	display: block;
	width: 100%;
	height: auto;
}

.mweb-spin-wheel-outer {
	position: absolute;
	inset: 6%;
	border-radius: 50%;
	background: #fff;
	border: 14px solid var(--mweb-spin-border, #2e7d32);
	box-shadow:
		0 12px 34px rgba(0,0,0,.28),
		inset 0 0 0 6px #fff,
		inset 0 2px 4px rgba(255,255,255,.5),
		inset 0 -3px 6px rgba(0,0,0,.12);
	background-image: linear-gradient(135deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 30%);
	/* This whole element — border, colors and pegs — spins as one piece,
	   like the face of a real wheel-of-fortune. Only the pointer and the
	   center hub (both siblings, outside this element) stay fixed. */
	transform: rotate(0deg);
	will-change: transform;
}

/* Separate inner layer purely so the conic-gradient color slices clip to
   a neat circle — kept apart from .mweb-spin-wheel-outer itself so the
   peg dots (which intentionally sit ON/overlapping the border ring) are
   never clipped off. */
.mweb-spin-wheel-clip {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
}
.mweb-spin-wheel-colors {
	position: absolute;
	inset: 0;
	border-radius: 50%;
}
.mweb-spin-labels {
	position: absolute;
	inset: 0;
}

.mweb-spin-wheel-pegs {
	position: absolute;
	inset: -14px;
	border-radius: 50%;
	pointer-events: none;
	z-index: 4;
}
.mweb-spin-peg {
	position: absolute;
	width: 3.2%;
	aspect-ratio: 1/1;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle at 35% 30%, #444 0%, #111 70%);
	border: 2px solid rgba(255,255,255,.85);
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.mweb-spin-slice-label {
	position: absolute;
	width: 30%;
	text-align: center;
	transform: translate(-50%, -50%);
	font-weight: 700;
	font-size: var(--mweb-spin-label-font-size, clamp(10px, 2vw, 15px));
	line-height: 1.2;
	pointer-events: none;
}
.mweb-spin-slice-label .mweb-spin-icon {
	width: var(--mweb-spin-icon-size, 22px);
	height: var(--mweb-spin-icon-size, 22px);
	display: block;
	margin: 0 auto 4px;
}
.mweb-spin-slice-label img {
	width: var(--mweb-spin-icon-size, 22px);
	height: var(--mweb-spin-icon-size, 22px);
	object-fit: contain;
	display: block;
	margin: 0 auto 4px;
}

.mweb-spin-hub {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 13%;
	aspect-ratio: 1/1;
	transform: translate(-50%, -50%);
	background:
		radial-gradient(circle at 35% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%),
		var(--mweb-spin-hub, #2e7d32);
	border-radius: 50%;
	border: 5px solid #fff;
	box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 -3px 5px rgba(0,0,0,.2);
	z-index: 7;
}

.mweb-spin-button {
	appearance: none;
	border: none;
	cursor: pointer;
	padding: 14px 48px;
	font-size: 18px;
	font-weight: 800;
	border-radius: 999px;
	color: var(--mweb-spin-btn-text, #1b5e20);
	background: linear-gradient(180deg, var(--mweb-spin-btn-start, #ffd54f), var(--mweb-spin-btn-end, #ffb300));
	box-shadow: 0 6px 16px rgba(0,0,0,.2);
	transition: transform .15s ease, box-shadow .15s ease;
}
.mweb-spin-button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.25); }
.mweb-spin-button:active { transform: translateY(0); }
.mweb-spin-button[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* Blur + fully obscure the wheel while the lead-capture popup is open. */
.mweb-spin-app.mweb-spin-is-blurred .mweb-spin-wheel-stage {
	filter: blur(16px);
	transition: filter .4s ease;
	pointer-events: none;
}
.mweb-spin-app.mweb-spin-is-blurred .mweb-spin-button {
	filter: blur(6px);
	transition: filter .4s ease;
	pointer-events: none;
}
/* Belt-and-suspenders: hide the actual text/icon nodes outright (not just
   blur them) so nothing is readable even if a browser under-applies the
   CSS blur filter or a viewer disables it via devtools. */
.mweb-spin-app.mweb-spin-is-blurred .mweb-spin-labels {
	opacity: 0;
	transition: opacity .3s ease;
}
/* Extra tinted, blurred shade layered on top of the wheel — uses
   backdrop-filter (blurs what's BEHIND it) as a second, independent
   layer of obscuring in browsers that support it. */
.mweb-spin-wheel-shade {
	position: absolute;
	inset: 6%;
	border-radius: 50%;
	z-index: 8;
	opacity: 0;
	pointer-events: none;
	background: rgba(255,255,255,.45);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	transition: opacity .35s ease;
}
.mweb-spin-app.mweb-spin-is-blurred .mweb-spin-wheel-shade {
	opacity: 1;
}

.mweb-spin-popup,
.mweb-spin-result {
	display: none;
}
.mweb-spin-popup:not([hidden]),
.mweb-spin-result:not([hidden]) {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--mweb-spin-overlay, rgba(0,0,0,.6));
	z-index: 99999;
	padding: 16px;
	animation: mwebSpinFadeIn .25s ease both;
}
.mweb-spin-popup-card,
.mweb-spin-result-card {
	background: var(--mweb-spin-popup-bg, #fff);
	color: var(--mweb-spin-popup-text, #212121);
	border-radius: 16px;
	padding: 28px 26px;
	max-width: 380px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	animation: mwebSpinPopIn .35s cubic-bezier(.22,1.4,.36,1) both;
	position: relative;
}
.mweb-spin-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: none;
	background: rgba(0,0,0,.06);
	color: inherit;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
}
.mweb-spin-popup-close:hover { background: rgba(0,0,0,.12); }
.mweb-spin-popup-title,
.mweb-spin-result-heading { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.mweb-spin-popup-desc { margin: 0 0 18px; opacity: .8; font-size: 14px; }
.mweb-spin-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.mweb-spin-form label { font-size: 13px; font-weight: 600; display: block; }
.mweb-spin-form input {
	width: 100%;
	margin-top: 4px;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	font-size: 14px;
}
.mweb-spin-form input:focus { outline: 2px solid #90caf9; border-color: #90caf9; }
.mweb-spin-recaptcha { margin-top: 4px; display: flex; justify-content: center; transform: scale(0.93); transform-origin: center; }
.mweb-spin-form-error { color: #c62828; font-size: 13px; min-height: 16px; margin: 0; text-align: left; }
.mweb-spin-submit-btn,
.mweb-spin-result-close {
	appearance: none;
	border: none;
	cursor: pointer;
	margin-top: 6px;
	padding: 12px 20px;
	font-weight: 700;
	font-size: 15px;
	border-radius: var(--mweb-spin-form-btn-radius, 10px);
	background: var(--mweb-spin-form-btn-bg, #2e7d32);
	color: var(--mweb-spin-form-btn-text, #fff);
	transition: transform .15s ease;
}
.mweb-spin-submit-btn:hover,
.mweb-spin-result-close:hover { transform: translateY(-1px); }
.mweb-spin-submit-btn[disabled] { opacity: .6; cursor: not-allowed; }

.mweb-spin-result-icon { width: 64px; height: 64px; margin: 0 auto 10px; color: #2e7d32; }
.mweb-spin-result-icon svg { width: 100%; height: 100%; }
.mweb-spin-result-icon img { width: 100%; height: 100%; object-fit: contain; }
.mweb-spin-result-message { font-size: 15px; margin: 0 0 18px; }

.mweb-spin-loading {
	display: none;
}
.mweb-spin-loading:not([hidden]) {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.5);
	z-index: 6;
}
.mweb-spin-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 4px solid rgba(46,125,50,.25);
	border-top-color: #2e7d32;
	animation: mwebSpinRotate 0.8s linear infinite;
}

.mweb-spin-admin-notice { padding: 12px; background: #fff3cd; border: 1px solid #ffe69c; border-radius: 6px; }

/* Lightweight confetti pieces, spawned + removed by JS. */
.mweb-spin-confetti-piece {
	position: fixed;
	top: -10px;
	width: 8px;
	height: 14px;
	z-index: 100000;
	opacity: .95;
	animation: mwebSpinConfettiFall linear forwards;
}

@keyframes mwebSpinFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mwebSpinPopIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes mwebSpinRotate { to { transform: rotate(360deg); } }
@keyframes mwebSpinConfettiFall {
	to { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.mweb-spin-wheel-outer { transition: none !important; }
	.mweb-spin-confetti-piece { display: none; }
}
