/* Vectory Spin Wheel – BenModel look: black, ivory and bordeaux */
.vsw {
	--vsw-bg: #0f0f10;
	--vsw-ink: #f6f1ec;
	--vsw-muted: #b9b0a8;
	--vsw-line: #34302d;
	--vsw-accent: #8c0c22;
	--vsw-accent-hi: #a8142d;
	--vsw-gold: #d9c9b6;
	--vsw-title-font: var(--wd-title-font, "Cormorant Garamond", Georgia, serif);
	--vsw-text-font: var(--wd-text-font, "Wix Madefor Display", system-ui, sans-serif);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	grid-template-columns: minmax(0, 920px);
	justify-content: center;
	align-items: center;
	padding: 16px;
	font-family: var(--vsw-text-font);
	color: var(--vsw-ink);
}
.vsw[hidden] { display: none; }
.vsw *, .vsw *::before, .vsw *::after, .vsw-fab { box-sizing: border-box; }
html.vsw-lock, html.vsw-lock body { overflow: hidden; }

.vsw-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 6, 6, .72);
	opacity: 0;
	transition: opacity .25s ease;
}
.vsw-dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	width: 100%;
	min-width: 0;
	max-height: calc(100dvh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	padding: 48px 48px 44px;
	background: var(--vsw-bg);
	border: 1px solid var(--vsw-line);
	border-radius: 4px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.vsw-dialog:focus { outline: none; }
.vsw.is-open .vsw-backdrop { opacity: 1; }
.vsw.is-open .vsw-dialog { opacity: 1; transform: none; }

.vsw .vsw-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--vsw-muted);
	cursor: pointer;
}
.vsw .vsw-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.vsw .vsw-close:hover { color: var(--vsw-ink); }

/* wheel */
.vsw-wheel-wrap {
	position: relative;
	width: 100%;
	max-width: 400px;
	aspect-ratio: 1;
	justify-self: center;
}
.vsw-wheel {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	box-shadow: 0 0 0 6px #1b1918, 0 0 0 7px var(--vsw-gold), 0 18px 50px rgba(0, 0, 0, .6);
}
.vsw-rotor { transform-origin: 200px 200px; transform-box: view-box; will-change: transform; }
.vsw-seg-label {
	font-family: var(--vsw-text-font);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.vsw-hub {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 17%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #2a2624, #0b0b0c 70%);
	box-shadow: 0 0 0 3px var(--vsw-gold), 0 4px 14px rgba(0, 0, 0, .6);
}
.vsw-hub::after {
	content: "";
	position: absolute;
	inset: 34%;
	border-radius: 50%;
	background: var(--vsw-accent);
}
.vsw-pointer {
	position: absolute;
	top: -14px;
	left: 50%;
	z-index: 2;
	width: 30px;
	height: 40px;
	transform: translateX(-50%);
	background: var(--vsw-gold);
	clip-path: polygon(50% 100%, 0 0, 100% 0);
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5));
}
.vsw.is-spinning .vsw-pointer { animation: vsw-tick .14s ease-in-out infinite alternate; }
@keyframes vsw-tick { to { transform: translateX(-50%) rotate(-7deg); } }

/* text side */
.vsw-test {
	display: inline-block;
	margin: 0 0 16px;
	padding: 4px 10px;
	border: 1px dashed var(--vsw-gold);
	color: var(--vsw-gold);
	font-size: 12px;
	letter-spacing: .04em;
}
.vsw-kicker {
	margin: 0 0 6px;
	color: var(--vsw-gold);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.vsw-title {
	margin: 0 0 12px;
	color: var(--vsw-ink);
	font-family: var(--vsw-title-font);
	font-size: clamp(30px, 3.6vw, 42px);
	font-weight: 500;
	line-height: 1.05;
	text-transform: uppercase;
	outline: none;
}
.vsw-sub {
	margin: 0 0 24px;
	color: var(--vsw-muted);
	font-size: 15px;
	line-height: 1.55;
}
.vsw-form { display: grid; gap: 12px; }
.vsw-label {
	color: var(--vsw-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.vsw .vsw-input {
	width: 100%;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	background: #191716;
	border: 1px solid var(--vsw-line);
	border-radius: 3px;
	color: var(--vsw-ink);
	font: 16px/1 var(--vsw-text-font);
	box-shadow: none;
}
.vsw .vsw-input::placeholder { color: #6f6862; }
.vsw .vsw-input:focus { border-color: var(--vsw-gold); outline: none; }
.vsw .vsw-hp { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; }
.vsw-check {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 10px;
	align-items: start;
	color: var(--vsw-muted);
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
}
.vsw-check input {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--vsw-accent);
}
.vsw-check a { color: var(--vsw-ink); text-decoration: underline; text-underline-offset: 2px; }
.vsw-error {
	margin: 2px 0 0;
	padding: 10px 12px;
	border-left: 3px solid #e2475f;
	background: rgba(226, 71, 95, .1);
	color: #ffd9de;
	font-size: 14px;
	line-height: 1.4;
}
.vsw-error.is-info { border-color: var(--vsw-gold); background: rgba(217, 201, 182, .1); color: var(--vsw-ink); }
.vsw-error[hidden] { display: none; }

.vsw .vsw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	margin-top: 6px;
	padding: 0 28px;
	background: var(--vsw-accent);
	border: 0;
	border-radius: 3px;
	color: #fff;
	font: 600 14px/1 var(--vsw-text-font);
	letter-spacing: .14em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .2s ease, transform .1s ease;
}
.vsw .vsw-btn:hover { background: var(--vsw-accent-hi); color: #fff; }
.vsw .vsw-btn:active { transform: translateY(1px); }
.vsw .vsw-btn:disabled { opacity: .55; cursor: progress; }
.vsw .vsw-btn[hidden] { display: none; }
.vsw button:focus-visible, .vsw a:focus-visible, .vsw input:focus-visible {
	outline: 2px solid var(--vsw-gold);
	outline-offset: 2px;
}

/* result */
.vsw-code-box {
	display: flex;
	align-items: stretch;
	margin: 8px 0 14px;
	border: 1px dashed var(--vsw-gold);
	border-radius: 3px;
}
.vsw-code-box[hidden] { display: none; }
.vsw-code {
	flex: 1;
	padding: 16px 18px;
	font: 700 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .12em;
	user-select: all;
}
.vsw .vsw-copy {
	padding: 0 18px;
	background: none;
	border: 0;
	border-left: 1px dashed var(--vsw-gold);
	color: var(--vsw-gold);
	font: 600 12px/1 var(--vsw-text-font);
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
}
.vsw-note { margin: 0 0 10px; color: var(--vsw-muted); font-size: 14px; line-height: 1.55; }

/* floating button */
button#vsw-fab.vsw-fab {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 9990;
	width: 54px;
	height: 54px;
	display: grid;
	place-items: center;
	padding: 0;
	background: var(--vsw-accent, #8c0c22);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .3), 0 0 0 3px rgba(255, 255, 255, .9);
	color: #fff;
	cursor: pointer;
	animation: vsw-pop .5s 1s both cubic-bezier(.2, .9, .3, 1.3);
}
button#vsw-fab[hidden] { display: none; }
#vsw-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button#vsw-fab:hover { background: #a8142d; color: #fff; }
@keyframes vsw-pop { from { transform: scale(0); } }

@media (max-width: 760px) {
	.vsw { padding: 10px; align-items: end; }
	.vsw-dialog {
		grid-template-columns: 1fr;
		gap: 22px;
		max-height: calc(100dvh - 20px);
		padding: 34px 20px 22px;
	}
	.vsw-wheel-wrap { max-width: min(250px, 64vw); margin-top: 10px; }
	.vsw-title { font-size: 30px; }
	.vsw-sub { margin-bottom: 18px; font-size: 14px; }
	.vsw-code { font-size: 20px; padding: 14px; }
	.vsw .vsw-btn { width: 100%; }
}
@media (max-width: 1024px) {
	/* hide the button while the mobile menu is open */
	body:has(.mobile-nav.wd-opened) button#vsw-fab { display: none; }
	/* WoodMart's bottom toolbar on phones */
	body:has(.wd-toolbar) button#vsw-fab { bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
	.vsw-dialog, .vsw-backdrop { transition: none; }
	button#vsw-fab { animation: none; }
	.vsw.is-spinning .vsw-pointer { animation: none; }
}
