/* Jack.com wager wheel – [spinlife_wager_wheel] */

.sww {
	--sww-orange: #ec6608;
	--sww-orange-light: #ff9a1f;
	--sww-ink: #2b2f36;
	--sww-muted: #8a8f98;
	--sww-seg: #c5cad3;
	/* Almost white at the top, fading to light grey */
	--sww-panel: linear-gradient(180deg, #fcfcfd 0%, #f2f3f5 40%, #e7e9ed 100%);

	position: relative;
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 0 60px;
	font-family: Kanit, sans-serif;
	color: var(--sww-ink);
}

.sww *,
.sww *::before,
.sww *::after {
	box-sizing: border-box;
}

.sww .sww-title {
	margin: 0 0 24px;
	font-family: Kanit, sans-serif;
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: 1px;
	text-align: center;
	text-transform: uppercase;
	color: var(--sww-ink);
}

.sww .sww-title span {
	color: var(--sww-orange);
}

/* ---------- Layout ---------- */

.sww-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	grid-template-areas:
		"board main"
		"board steps";
	gap: 8px 24px;
	padding: 24px;
	border-radius: 12px;
	background: var(--sww-panel);
}

.sww-board { grid-area: board; }
.sww-main  { grid-area: main; position: relative; }
/* Bottom edge lines up with the last row of the board */
.sww-steps { grid-area: steps; align-self: end; }

/* ---------- Board ---------- */

.sww-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px 18px;
	margin-bottom: 14px;
	font-size: 11px;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--sww-muted);
}

.sww-meta__item {
	display: flex;
	align-items: center;
	gap: 5px;
}

.sww-meta__item strong {
	font-weight: 600;
}

.sww-meta__item img {
	width: 16px;
	height: 16px;
}

.sww-board__head,
.sww-row {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) 64px 46px;
	align-items: center;
	padding: 0 12px;
}

.sww-board__head {
	padding-bottom: 4px;
	font-size: 11px;
	font-style: italic;
	color: var(--sww-orange);
}

.sww-board__head span:last-child,
.sww-row__pct {
	text-align: right;
}

.sww .sww-rows {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* More than 20 players: the list keeps the height of 20 rows and scrolls */
.sww .sww-rows--scroll {
	position: relative;
	max-height: calc(20 * 26px + 19 * 6px + 6px);
	overflow-y: auto;
	margin: 0 -4px;
	padding: 3px 4px;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.sww-rows--scroll .sww-row {
	flex-shrink: 0;
}

/* Three-digit ranks */
.sww-rows--scroll .sww-row__rank {
	font-size: 14px;
}

.sww-row {
	height: 26px;
	border-radius: 7px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(20, 25, 35, .08);
	font-size: 12px;
	font-style: italic;
	font-weight: 700;
	white-space: nowrap;
	transition: background .3s, color .3s;
}

.sww-row__rank {
	font-size: 17px;
	font-weight: 600;
	color: #b9bec7;
}

.sww-row__user {
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: .5px;
}

.sww-row--empty {
	color: var(--sww-muted);
	font-weight: 400;
}

.sww-row--winner {
	background: linear-gradient(180deg, var(--sww-orange-light), var(--sww-orange));
	color: #fff;
}

.sww-row--winner .sww-row__rank {
	color: #fff;
}

/* ---------- Latest winners ---------- */

/* Top-right corner, next to the wheel (static on small screens) */
.sww-winners {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	isolation: isolate;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 6px;
	width: 320px;
}

/* Light band behind the pentagons */
.sww-winners::before {
	content: "";
	position: absolute;
	top: 22px;
	right: -24px;
	left: 0;
	z-index: -1;
	height: 34px;
	background: linear-gradient(90deg, rgba(220, 223, 229, 0) 0%, #dcdfe5 30%, #d3d7de 100%);
}

.sww-winners__label {
	margin-right: 4px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

.sww-winners__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 78px;
	aspect-ratio: 480 / 458;
	padding-bottom: 10px;
	background: center / 100% 100% no-repeat;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25));
	color: #fff;
	text-align: center;
}

.sww-winners__user {
	max-width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 10px;
	font-style: italic;
	font-weight: 600;
	line-height: 1.1;
	white-space: nowrap;
}

.sww-winners__prize {
	font-size: 17px;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
	color: #ffd21f;
}

.sww .sww-winners__terms {
	flex-basis: 100%;
	max-width: 260px;
	margin: 4px 0 0 auto;
	font-size: 8.5px;
	font-style: italic;
	line-height: 1.3;
	text-align: right;
	color: var(--sww-muted);
}

/* ---------- Wheel ---------- */

/* Gap = how far the pointer sticks out (36px) + ~22px to the button, as in the sketch */
.sww-stage {
	display: flex;
	align-items: center;
	gap: 58px;
	margin: 24px 0 28px;
}

.sww-wheel {
	position: relative;
	flex: 0 1 500px;
	min-width: 0;
}

.sww-wheel__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	filter: drop-shadow(0 8px 14px rgba(30, 35, 45, .18));
}

.sww-wheel__rim {
	fill: #fff;
	stroke: #dde0e5;
	stroke-width: 1;
}

.sww-wheel__rotor {
	transform-box: fill-box;
	transform-origin: center;
}

.sww-seg {
	fill: url(#sww-grey);
	stroke: #fff;
	stroke-width: 3;
	stroke-linejoin: round;
}

.sww-seg--top {
	fill: url(#sww-orange);
}

/* After a spin: fade the other slices so the winning one stands out */
.sww-slice {
	transition: opacity .5s;
}

.has-winner .sww-slice:not(.is-winner) {
	opacity: .35;
}

.sww-label {
	font-family: Kanit, sans-serif;
	font-style: italic;
	font-weight: 700;
	fill: #fff;
	filter: drop-shadow(0 1px 1.5px rgba(40, 45, 55, .45));
}

.sww-label--top {
	filter: drop-shadow(0 1px 1.5px rgba(120, 40, 0, .5));
}

.sww-label__rank {
	font-weight: 800;
}

.sww-label--pct {
	font-weight: 500;
}

.sww-label--empty {
	font-size: 22px;
}

/* Hub: white ring around a light grey disc with the outlined JA/CK logo */
.sww-hub {
	fill: #fff;
	stroke: #d3d7dd;
	stroke-width: 1.5;
	filter: drop-shadow(0 2px 4px rgba(30, 35, 45, .18));
}

.sww-hub__inner {
	fill: url(#sww-hub);
	stroke: #c6cbd3;
	stroke-width: 1;
}

/* Grey logo with a light edge, slightly pressed into the disc as in the sketch */
.sww-hub__logo {
	fill: url(#sww-logo);
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 2px;
	stroke-linejoin: round;
	filter: drop-shadow(0 1px 1px rgba(60, 68, 80, .35));
}

/* Orange triangle at 3 o'clock, just off the rim, pointing left into the wheel */
.sww-wheel__pointer {
	position: absolute;
	top: 50%;
	/* Tip rests on the white rim, pointing straight at a slice */
	right: -36px;
	z-index: 1;
	width: 44px;
	height: 48px;
	margin-top: -24px;
	filter: drop-shadow(3px 4px 4px rgba(0, 0, 0, .3));
}

.sww-wheel__pointer svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}


/* Only the button counts for centring, so it lines up with the pointer */
.sww-controls {
	position: relative;
	display: flex;
	justify-content: center;
	width: 150px;
	/* The button's 3px bottom edge makes it look low next to the pointer */
	margin-top: -3px;
}

.sww-controls__note {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	left: 0;
	font-size: 11px;
	line-height: 1.3;
	text-align: center;
	color: var(--sww-muted);
}

/* ---------- How it works ---------- */

.sww-how {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 460px;
	margin-left: auto;
	padding: 6px 14px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(20, 25, 35, .08);
}

.sww-how__title {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.sww-how__title svg {
	flex-shrink: 0;
}

.sww .sww-how p {
	margin: 0;
	font-size: 11px;
	line-height: 1.4;
}

.sww-how em {
	font-weight: 600;
}

/* ---------- Steps ---------- */

.sww-steps__row {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 14px 18px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(20, 25, 35, .08);
}

.sww .sww-steps__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: center;
	gap: 14px;
	flex: 1;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: sww-step;
}

/* Number and text centred against each other, whatever the text's height */
.sww-steps__list li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	line-height: 1.3;
	counter-increment: sww-step;
}

.sww-steps__list li::before {
	content: counter(sww-step) ".";
	flex: none;
	min-width: 22px;
	font-size: 24px;
	line-height: 1;
	font-style: italic;
	font-weight: 700;
	color: var(--sww-orange);
}

.sww-steps__list a {
	color: inherit;
}

.sww-steps__list a:hover {
	color: var(--sww-orange);
}

.sww-steps__list strong {
	font-weight: 600;
}

/* ---------- Buttons ---------- */

.sww .sww-btn {
	display: inline-block;
	min-width: 130px;
	padding: 4px 18px 3px;
	border: 0;
	border-radius: 8px;
	background: linear-gradient(180deg, #ffb126 0%, #ff8c00 55%, #f07000 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 #c95300, 0 5px 6px rgba(0, 0, 0, .2);
	font-family: Kanit, sans-serif;
	font-size: 21px;
	font-style: italic;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	text-shadow: 0 1px 0 #b34a00, 0 0 2px rgba(150, 60, 0, .6);
	cursor: pointer;
	transition: filter .15s, transform .15s;
}

/* Keep the theme's button styles (BuddyBoss/Elementor) off our buttons. The
   button.sww-btn selectors outrank the site's inline
   [type="button"]:not(.sc-nav, …) rule, which would otherwise win at rest. */
.sww .sww-btn,
.sww .sww-btn:hover,
.sww .sww-btn:focus,
.sww .sww-btn:active,
.sww button.sww-btn,
.sww button.sww-btn:hover,
.sww button.sww-btn:focus,
.sww button.sww-btn:active {
	height: auto !important;
	min-height: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: linear-gradient(180deg, #ffb126 0%, #ff8c00 55%, #f07000 100%) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 #c95300, 0 5px 6px rgba(0, 0, 0, .2) !important;
	font-family: Kanit, sans-serif !important;
	font-style: italic !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	text-transform: uppercase !important;
	text-shadow: 0 1px 0 #b34a00, 0 0 2px rgba(150, 60, 0, .6) !important;
	color: #fff !important;
	opacity: 1 !important;
	outline: none;
}

.sww .sww-btn:hover,
.sww .sww-btn:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.sww .sww-btn:focus-visible {
	outline: 2px solid var(--sww-orange);
	outline-offset: 3px;
}

.sww .sww-btn:active,
.sww button.sww-btn:active {
	transform: translateY(1px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 0 #c95300, 0 2px 3px rgba(0, 0, 0, .2) !important;
}

/* While the wheel is spinning */
.sww .sww-btn[aria-disabled="true"] {
	cursor: default;
}

.sww .sww-spin {
	min-width: 150px;
	font-size: 26px;
}

.sww .sww-btn--small {
	min-width: 0;
	font-size: 15px;
}

/* Text-link buttons. The theme and Elementor style every <button> as a filled
   button, hence the !important resets. */
.sww button.sww-link,
.sww button.sww-link:hover,
.sww button.sww-link:focus {
	display: inline !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font: inherit !important;
	letter-spacing: inherit !important;
	text-transform: none !important;
	text-shadow: none !important;
	text-decoration: underline !important;
	color: var(--sww-orange) !important;
	vertical-align: baseline !important;
	cursor: pointer;
}

.sww button.sww-link:hover {
	text-decoration-thickness: 2px !important;
}

.sww button.sww-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---------- Modals ---------- */

body.sww-modal-open {
	overflow: hidden;
}

.sww-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(18, 20, 26, .78);
	animation: sww-fade .25s ease-out;
}

.sww-modal[hidden] {
	display: none;
}

.sww-modal > :focus {
	outline: none;
}

@keyframes sww-fade {
	from { opacity: 0; }
}

@keyframes sww-pop {
	from { opacity: 0; transform: scale(.7); }
}

/* Winner – big gold pentagon */
/* Everything is sized from --w (the pentagon's width) – percentages would be
   relative to the full-screen overlay instead. */
.sww .sww-winner__box {
	--w: min(420px, calc(100vw - 32px));

	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	width: var(--w);
	max-width: var(--w);
	height: calc(var(--w) * 458 / 480);
	margin: 0;
	padding: calc(var(--w) * .09) calc(var(--w) * .12) 0;
	background: center / 100% 100% no-repeat;
	filter: drop-shadow(0 0 30px rgba(255, 210, 31, .35));
	color: #fff;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	animation: sww-pop .45s cubic-bezier(.2, 1.4, .4, 1);
}

.sww-winner__box > span {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sww-winner__title {
	font-size: calc(var(--w) * 0.11);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.sww-winner__user {
	margin-top: calc(var(--w) * 0.02);
	font-size: calc(var(--w) * 0.075);
	font-style: italic;
	line-height: 1.1;
	text-transform: uppercase;
	color: #ffd21f;
}

.sww-winner__box > .sww-winner__pct {
	width: 70%;
	margin-top: calc(var(--w) * 0.02);
	font-size: calc(var(--w) * 0.042);
	display: flex;
	align-items: center;
	gap: calc(var(--w) * 0.03);
}

.sww-winner__pct::before,
.sww-winner__pct::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(255, 255, 255, .35);
}

.sww-winner__prize {
	font-size: calc(var(--w) * 0.18);
	font-style: italic;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.5px;
	background: linear-gradient(180deg, #fff27a 20%, #ffc400 60%, #f59e00 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 3px 0 #3a2a05);
}

.sww-winner__label {
	font-size: calc(var(--w) * 0.046);
	font-style: italic;
	font-weight: 700;
	text-transform: uppercase;
}

.sww-winner__date {
	margin-top: calc(var(--w) * 0.015);
	font-size: calc(var(--w) * 0.036);
	font-style: italic;
	color: rgba(255, 255, 255, .7);
}

.sww .sww-winner button.sww-link {
	margin-top: calc(var(--w) * 0.025);
	font-size: calc(var(--w) * 0.034) !important;
	color: rgba(255, 255, 255, .75) !important;
}

/* Provably fair panel */
.sww-fair__box {
	position: relative;
	width: min(640px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 26px 28px;
	border-radius: 12px;
	background: #fff;
	font-size: 13px;
	line-height: 1.5;
	animation: sww-pop .3s ease-out;
}

.sww .sww-fair__box h2,
.sww .sww-fair__box h3 {
	margin: 0 0 10px;
	font-family: Kanit, sans-serif;
	text-transform: uppercase;
	color: var(--sww-ink);
}

.sww .sww-fair__box h2 { font-size: 22px; }
.sww .sww-fair__box h3 { margin-top: 18px; font-size: 15px; }

.sww .sww-fair__box pre {
	margin: 10px 0;
	padding: 10px 12px;
	border-radius: 6px;
	background: #f2f3f5;
	font-size: 12px;
	white-space: pre-wrap;
}

.sww .sww-fair__steps {
	margin: 0 0 12px;
	padding-left: 20px;
}

.sww-fair__steps li {
	margin: 0 0 4px;
}

/* Formula and technical values – folded away */
.sww-fair__more {
	margin: 0 0 14px;
}

.sww-fair__more summary {
	font-weight: 600;
	color: var(--sww-muted);
	cursor: pointer;
}

.sww-fair__more[open] summary {
	margin-bottom: 8px;
}

.sww-fair__more p {
	margin: 0;
}

.sww-fair__list {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr);
	gap: 4px 12px;
	margin: 0 0 14px;
}

.sww-fair__list dt {
	font-weight: 600;
}

.sww-fair__list dd {
	display: flex;
	gap: 8px;
	align-items: baseline;
	min-width: 0;
	margin: 0;
}

/* One line each – Copy gives the whole value */
.sww-fair__list code {
	min-width: 0;
	overflow: hidden;
	font-size: 11px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sww .sww-fair__list .sww-copy {
	flex: none;
	font-size: 12px;
}

/* The picked spin: name, winner and Verify on one row */
.sww-fair__pick {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 8px;
}

.sww .sww-fair__pick h3 {
	margin: 0;
}

/* Every spin – a click shows its details below */
.sww .sww-fair__history {
	max-height: 140px;
	overflow-y: auto;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	border: 1px solid #e3e5e9;
	border-radius: 6px;
}

.sww-fair__history li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 12px;
	margin: 0;
	padding: 4px 10px;
}

.sww-fair__history li:nth-child(odd) { background: #f7f8fa; }
.sww-fair__history li.is-selected { background: #fdebdc; }
.sww-fair__history li span:last-child { text-align: right; }

.sww .sww-fair__history button.sww-link {
	justify-self: start;
	font-weight: 600;
}

.sww-fair__result {
	margin: 0 0 10px;
	font-weight: 600;
}

.sww-fair__result .is-ok  { color: #1e9e4a; }
.sww-fair__result .is-bad { color: #d12b2b; }

.sww button.sww-modal__close,
.sww button.sww-modal__close:hover,
.sww button.sww-modal__close:focus {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px !important;
	height: 36px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: none !important;
	box-shadow: none !important;
	font: 400 28px/1 Kanit, sans-serif !important;
	color: var(--sww-muted) !important;
	cursor: pointer;
}

.sww button.sww-modal__close:hover {
	background: #f2f3f5 !important;
	color: var(--sww-ink) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.sww-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"main"
			"board"
			"steps";
		gap: 16px;
		padding: 16px;
	}

	.sww-winners,
	.sww-how {
		max-width: none;
		margin: 0;
	}

	.sww-winners {
		position: relative;
		justify-content: center;
		width: auto;
		margin-bottom: 16px;
	}

	.sww-winners::before {
		right: 0;
		background: linear-gradient(90deg, rgba(220, 223, 229, 0), #d6dae1 25%, #d6dae1 75%, rgba(220, 223, 229, 0));
	}

	.sww .sww-winners__terms {
		max-width: none;
		margin-left: 0;
		text-align: center;
	}

	.sww-stage {
		flex-direction: column;
		gap: 16px;
	}

	/* Room for the note under the button */
	.sww-controls {
		margin-bottom: 20px;
	}

	.sww-wheel {
		flex: none;
		width: calc(100% - 36px);
		max-width: 460px;
		margin-right: 36px;
	}

	.sww-wheel__pointer {
		right: -28px;
		width: 34px;
		height: 37px;
		margin-top: -18.5px;
	}

	.sww-steps__row {
		flex-direction: column;
		align-items: stretch;
	}

	.sww .sww-steps__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.sww-steps .sww-btn {
		align-self: center;
	}
}

@media (max-width: 600px) {
	.sww {
		padding: 24px 0 32px;
	}

	.sww-layout {
		padding: 12px;
		border-radius: 8px;
	}

	.sww-how {
		flex-direction: column;
		align-items: flex-start;
	}

	.sww-fair__box {
		padding: 22px 16px;
	}

	.sww-fair__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.sww-fair__list dd {
		margin-bottom: 6px;
	}

	/* "Next spin hash" stays on one row */
	.sww-fair__list--next {
		grid-template-columns: auto minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sww-modal,
	.sww-winner__box,
	.sww-fair__box {
		animation: none;
	}
}
