/* Prize wheel. Colours come from custom properties set per site in the wheel
   admin (Appearance and branding); the values here are neutral fallbacks. */
body .hat-prize-wheel, body .hat-prize-wheel * { box-sizing: border-box; }
body .hat-prize-wheel {
	--hat-accent: #1f5f8b; --hat-stage: #0b1b2e; --hat-pointer: #f2c14e;
	--hat-slice-1: #12344f; --hat-slice-2: #1b4f63; --hat-slice-3: #2a3f66;
	--hat-ink: #14202e; --hat-muted: #48566a; --hat-line: #d5dce5; --hat-speed: 0;
	max-width: 1040px; margin: 32px auto; padding: 0; border: 1px solid var(--hat-line); border-radius: 14px;
	background: #fff; color: var(--hat-ink); font-family: inherit; font-size: 16px; line-height: 1.5;
	box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 12px 32px rgba(16,24,40,.08); overflow: hidden;
}
body .hat-prize-wheel__header { padding: 28px 32px 20px; border-bottom: 1px solid var(--hat-line); }
body .hat-prize-wheel__eyebrow { margin: 0 0 6px; color: var(--hat-accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
body .hat-prize-wheel h2 { margin: 0 0 8px; color: var(--hat-ink) !important; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
body .hat-prize-wheel p { margin: 0 0 8px; color: var(--hat-muted); }
body .hat-prize-wheel a { color: var(--hat-accent); text-decoration: underline; text-underline-offset: 2px; }
body .hat-prize-wheel__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 0 0 !important; font-weight: 600; }
body .hat-prize-wheel__layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
body .hat-prize-wheel:not(:has(.hat-prize-wheel__stage)) .hat-prize-wheel__layout { grid-template-columns: 1fr; }

/* Stage */
body .hat-prize-wheel__stage {
	position: relative; display: grid; place-items: center; padding: 40px 28px 34px; overflow: hidden; isolation: isolate;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.10), transparent 60%),
		linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 100% 28px,
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 100%,
		var(--hat-stage);
}
body .hat-prize-wheel__halo {
	position: absolute; z-index: -1; width: min(118%, 620px); aspect-ratio: 1; border-radius: 50%;
	background: conic-gradient(from 0deg, transparent 0 8%, color-mix(in srgb, var(--hat-accent) 85%, #fff) 22%, transparent 38% 55%, color-mix(in srgb, var(--hat-pointer) 70%, transparent) 68%, transparent 82%);
	filter: blur(46px); opacity: calc(.34 + var(--hat-speed) * .5);
	animation: hat-wheel-halo 26s linear infinite; animation-duration: calc(26s - var(--hat-speed) * 22s);
}
body .hat-prize-wheel__graphic { position: relative; width: min(100%, 460px); aspect-ratio: 1; filter: drop-shadow(0 26px 34px rgba(0,0,0,.5)); }
body .hat-prize-wheel__rim, body .hat-prize-wheel__disc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body .hat-prize-wheel__disc { transform: rotate(var(--hat-angle, 0deg)); will-change: transform; filter: blur(calc(var(--hat-speed) * 1.6px)); }
body .hat-prize-wheel__wedge { stroke: rgba(255,255,255,.22); stroke-width: 1.2; }
body .hat-prize-wheel__slice--0 .hat-prize-wheel__wedge { fill: var(--hat-slice-1); }
body .hat-prize-wheel__slice--1 .hat-prize-wheel__wedge { fill: var(--hat-slice-2); }
body .hat-prize-wheel__slice--2 .hat-prize-wheel__wedge { fill: var(--hat-slice-3); }
body .hat-prize-wheel__medallion-ring { fill: #fff; }
body .hat-prize-wheel__medallion-blank { fill: #eef2f6; }
body .hat-prize-wheel__monogram { fill: var(--hat-slice-1); font-weight: 700; text-anchor: middle; }
body .hat-prize-wheel__slice-label { fill: #fff; font-weight: 600; text-anchor: middle; letter-spacing: .01em; paint-order: stroke; stroke: rgba(4,12,22,.55); stroke-width: 2.4px; }
body .hat-prize-wheel__peg { fill: #f4f7fa; stroke: #0b1b2e; stroke-width: 1; }
body .hat-prize-wheel__slice { transition: opacity .7s ease, filter .7s ease; }
body .hat-prize-wheel.has-result .hat-prize-wheel__slice:not(.is-winner) { opacity: .28; filter: saturate(.3); }
body .hat-prize-wheel.has-result .hat-prize-wheel__slice.is-winner .hat-prize-wheel__wedge { stroke: var(--hat-pointer); stroke-width: 4; }
body .hat-prize-wheel.has-result .hat-prize-wheel__slice.is-winner .hat-prize-wheel__medallion-ring { fill: var(--hat-pointer); }
body .hat-prize-wheel.has-result .hat-prize-wheel__halo { animation: hat-wheel-halo 26s linear infinite, hat-wheel-pulse 2.4s ease-out 1; }
body .hat-prize-wheel__pointer { position: absolute; z-index: 2; top: -4.5%; left: 50%; width: 9%; margin-left: -4.5%; transform-origin: 50% 30%; filter: drop-shadow(0 4px 5px rgba(0,0,0,.45)); }
body .hat-prize-wheel__pointer svg { display: block; width: 100%; height: auto; }
@keyframes hat-wheel-halo { to { transform: rotate(360deg); } }
@keyframes hat-wheel-pulse { 0% { opacity: 1; filter: blur(30px); } 100% { opacity: .34; filter: blur(46px); } }

/* Controls */
body .hat-prize-wheel__controls { padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
body .hat-prize-wheel__steps { display: flex; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: hat-step; font-size: 13px; font-weight: 600; color: var(--hat-muted); }
body .hat-prize-wheel__steps li { counter-increment: hat-step; flex: 1; margin: 0; padding: 8px 0 0; border-top: 3px solid var(--hat-line); }
body .hat-prize-wheel__steps li::before { content: counter(hat-step) ". "; }
body .hat-prize-wheel__steps li.is-current, body .hat-prize-wheel__steps li.is-done { border-top-color: var(--hat-accent); color: var(--hat-ink); }
body .hat-prize-wheel__controls form { display: grid; gap: 14px; margin: 0 0 14px; }
body .hat-prize-wheel__controls label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--hat-ink); }
body .hat-prize-wheel__controls input, body .hat-prize-wheel__controls select { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #7d8a9b; border-radius: 6px; background: #fff; color: var(--hat-ink); font: inherit; font-weight: 400; }
body .hat-prize-wheel__controls button { width: 100%; min-height: 48px; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--hat-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: filter .15s ease; }
body .hat-prize-wheel__controls button:hover { filter: brightness(1.1); }
body .hat-prize-wheel__controls button:disabled { opacity: .6; cursor: wait; }
body .hat-prize-wheel__controls .hat-prize-wheel__spin { min-height: 56px; font-size: 18px; letter-spacing: .02em; }
body .hat-prize-wheel :focus-visible { outline: 3px solid var(--hat-ink); outline-offset: 2px; box-shadow: 0 0 0 5px #fff; }
body .hat-prize-wheel__message { min-height: 1.5em; margin: 0 !important; font-weight: 600; color: var(--hat-ink) !important; }
body .hat-prize-wheel__result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; margin-top: 12px; padding: 16px; border: 1px solid var(--hat-line); border-left: 5px solid var(--hat-accent); border-radius: 8px; background: #f6f8fb; animation: hat-wheel-rise .6s cubic-bezier(.2,.8,.2,1) both; }
body .hat-prize-wheel__result img, body .hat-prize-wheel__result .hat-prize-wheel__thumb-blank { grid-row: 1 / span 4; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hat-line); background: #fff; }
body .hat-prize-wheel__result > :not(img):not(.hat-prize-wheel__thumb-blank) { grid-column: 2; min-width: 0; }
body .hat-prize-wheel__result small { color: var(--hat-accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
body .hat-prize-wheel__result strong { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
body .hat-prize-wheel__result p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
body .hat-prize-wheel__result code { justify-self: start; padding: 6px 10px; border: 1px dashed #7d8a9b; border-radius: 6px; background: #fff; color: var(--hat-ink); font-size: 16px; user-select: all; overflow-wrap: anywhere; }
@keyframes hat-wheel-rise { from { opacity: 0; transform: translateY(14px); } }

/* Prize table and notices */
body .hat-prize-wheel__prizes { padding: 24px 32px 8px; border-top: 1px solid var(--hat-line); }
body .hat-prize-wheel__prizes table { width: 100%; margin: 0; border-collapse: collapse; border: 0; font-size: 15px; }
body .hat-prize-wheel__prizes caption { padding: 0 0 10px; text-align: left; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hat-muted); }
body .hat-prize-wheel__prizes th, body .hat-prize-wheel__prizes td { padding: 9px 8px 9px 0; border: 0; border-bottom: 1px solid var(--hat-line); background: none; color: var(--hat-ink); text-align: left; vertical-align: middle; font-weight: 500; }
body .hat-prize-wheel__prizes thead th { font-size: 13px; font-weight: 600; color: var(--hat-muted); }
body .hat-prize-wheel__prizes td, body .hat-prize-wheel__prizes thead th:nth-child(2) { width: 9.5em; text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
body .hat-prize-wheel__prizes tbody th { display: flex; align-items: center; gap: 12px; min-width: 0; }
body .hat-prize-wheel__prizes tbody th span:last-child { min-width: 0; overflow-wrap: anywhere; }
body .hat-prize-wheel__prizes img, body .hat-prize-wheel__thumb-blank { flex: none; width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--hat-line); background: #fff; }
body .hat-prize-wheel__thumb-blank { display: inline-grid; place-items: center; background: #eef2f6; color: var(--hat-muted); font-weight: 700; }
body .hat-prize-wheel__fine { margin: 12px 0 0 !important; font-size: 13px; }
body .hat-prize-wheel__notice { margin: 16px 32px 28px !important; padding: 12px 14px; border: 1px solid var(--hat-line); border-radius: 8px; background: #f6f8fb; color: var(--hat-ink) !important; font-size: 14px; }
body .hat-prize-wheel [hidden] { display: none !important; }

@media (max-width: 760px) {
	body .hat-prize-wheel { margin: 20px auto; border-radius: 10px; }
	body .hat-prize-wheel__layout { grid-template-columns: 1fr; }
	/* With many slices on a small wheel the labels are too small to read; the images stay and the table below names every prize. */
	body .hat-prize-wheel.is-dense .hat-prize-wheel__slice-label { display: none; }
	body .hat-prize-wheel__header, body .hat-prize-wheel__controls { padding: 20px 18px; }
	body .hat-prize-wheel__stage { padding: 34px 14px 26px; }
	body .hat-prize-wheel__prizes { padding: 20px 18px 6px; }
	body .hat-prize-wheel__notice { margin: 14px 18px 20px !important; }
	body .hat-prize-wheel__prizes td, body .hat-prize-wheel__prizes thead th:nth-child(2) { width: 6.5em; white-space: normal; }
	body .hat-prize-wheel__result img, body .hat-prize-wheel__result .hat-prize-wheel__thumb-blank { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
	body .hat-prize-wheel__halo, body .hat-prize-wheel__result { animation: none !important; }
	body .hat-prize-wheel__disc { filter: none; }
	body .hat-prize-wheel__slice { transition: none; }
}
@media (forced-colors: active) {
	body .hat-prize-wheel__controls button { border: 2px solid ButtonText; }
	body .hat-prize-wheel__halo { display: none; }
}

/* Account and checkout reward wallet. */
body .hat-prize-wheel__account-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border-radius: 6px; background: #173f5f; color: #fff; font-weight: 700; text-decoration: none; }
body .hat-prize-wheel__account-link:hover { background: #0f304a; color: #fff; }
body .hat-prize-wheel__review-rules { margin: 0 24px 24px; }
body .hat-prize-wheel__rules {
	width: min(36rem, calc(100% - 2rem));
	max-height: calc(100% - 2rem);
	box-sizing: border-box;
	overflow: auto;
	padding: clamp(1rem, 4vw, 2rem);
	border: 1px solid #64748b;
	border-radius: 12px;
	background: #fff;
	color: #172435;
}
body .hat-prize-wheel__rules::backdrop { background: rgb(8 15 25 / 78%); }
body .hat-prize-wheel__rules h2 { margin-top: 0; color: inherit; }
body .hat-prize-wheel__rules ul { padding-inline-start: 1.25rem; }
body .hat-prize-wheel__rules li + li { margin-top: .75rem; }
body .hat-prize-wheel__rules a { color: var(--hat-accent, #1f5f8b); text-decoration: underline; overflow-wrap: anywhere; }
body .hat-prize-wheel__rules-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
body .hat-prize-wheel__rules-actions button { min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--hat-accent, #1f5f8b); border-radius: 6px; background: #fff; color: #172435; cursor: pointer; }
body .hat-prize-wheel__rules-actions button[value="accept"] { background: var(--hat-accent, #1f5f8b); color: #fff; }
body .hat-wheel-redemption li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
body .hat-wheel-redemption li form { margin: 0 0 0 auto; }
body .hat-wheel-redemption li button { min-height: 44px; }
body .hat-wheel-claim-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 10px 0 0; }
body .hat-wheel-claim-form label { display: grid; gap: 5px; min-width: min(100%, 220px); color: #23384a; font-size: 13px; font-weight: 600; }
body .hat-wheel-claim-form select { max-width: 100%; min-height: 42px; padding: 7px 10px; border: 1px solid #7d8a9b; border-radius: 5px; background: #fff; color: #14202e; font: inherit; }
body .hat-wheel-claim-form button { min-height: 44px; }
body .hat-prize-wheel__limits { padding: 12px 14px; border-left: 3px solid #355f7d; background: #f4f7fa; color: #23384a !important; font-size: 14px; }
body .hat-wheel-wallet { margin: 24px 0; padding: 20px; border: 1px solid #d5dce5; border-radius: 8px; background: #fff; color: #14202e; }
body .hat-wheel-wallet h2 { margin: 0 0 14px; color: #173f5f; font-size: 21px; line-height: 1.3; }
body .hat-wheel-wallet__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
body .hat-wheel-wallet__item { min-width: 0; padding: 14px 16px; border: 1px solid #d5dce5; border-left: 4px solid #355f7d; border-radius: 6px; background: #f8fafc; }
body .hat-wheel-wallet__item p { margin: 8px 0 0; color: #48566a; overflow-wrap: anywhere; }
body .hat-wheel-wallet__heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
body .hat-wheel-wallet__heading strong { color: #14202e; font-size: 16px; }
body .hat-wheel-wallet__state { color: #355f7d; font-size: 13px; font-weight: 700; }
body .hat-wheel-wallet__code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body .hat-wheel-wallet__code code { max-width: 100%; padding: 6px 9px; border: 1px dashed #7d8a9b; border-radius: 5px; background: #fff; color: #14202e; font-size: 15px; overflow-wrap: anywhere; user-select: all; }
body .hat-wheel-wallet__code .hat-wheel-copy-code { min-height: 36px; padding: 6px 10px; border: 1px solid #355f7d; border-radius: 5px; background: #fff; color: #173f5f; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
body .hat-wheel-wallet__code .hat-wheel-copy-code:hover { background: #edf3f7; }
body .hat-wheel-wallet__help { margin: 14px 0 0 !important; color: #48566a; font-size: 13px; }
@media (max-width: 600px) {
	body .hat-wheel-wallet { padding: 15px; }
	body .hat-wheel-wallet__item { padding: 12px; }
	body .hat-wheel-wallet__heading { align-items: flex-start; flex-direction: column; }
}
@media (forced-colors: active) {
	body .hat-prize-wheel__account-link, body .hat-wheel-wallet__code .hat-wheel-copy-code { border: 2px solid ButtonText; }
}
body .hat-prize-wheel__result .hat-prize-wheel__result-link { margin-top: 6px; font-weight: 600; }
body .hat-prize-wheel__claim-form { grid-column: 2; display: grid; width: 100%; gap: 8px; }
body .hat-prize-wheel__claim-form label { min-width: 0; }
body .hat-prize-wheel__claim-form select { width: 100%; }
body .hat-prize-wheel__claim-help { color: var(--hat-muted); font-size: 12px; line-height: 1.4; }
body .hat-prize-wheel__available { margin: 0 0 8px; color: var(--hat-ink) !important; font-size: 18px; font-weight: 700; }
body .hat-prize-wheel__limits { margin: 0 0 14px; font-size: 13px; }
body .hat-prize-wheel__choice-round { margin: 0 0 18px; padding: 14px; border: 1px solid var(--hat-line); border-radius: 10px; background: color-mix(in srgb, var(--hat-stage) 94%, #fff); color: var(--hat-ink); }
body .hat-prize-wheel__choice-round h3 { margin: 0 0 10px; color: var(--hat-muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1.4; text-align: center; text-transform: uppercase; }
body .hat-prize-wheel__choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
body .hat-prize-wheel__choice-list li { display: flex; min-width: 0; min-height: 72px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; margin: 0; padding: 9px 7px; border: 1px dashed var(--hat-line); border-radius: 10px; background: color-mix(in srgb, var(--hat-stage) 82%, #fff); color: var(--hat-ink); text-align: center; }
body .hat-prize-wheel__choice-list li.is-revealed { border-style: solid; border-color: var(--hat-accent); }
body .hat-prize-wheel__choice-list li.is-selected { box-shadow: inset 0 0 0 2px var(--hat-pointer); }
body .hat-prize-wheel__choice-list li img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
body .hat-prize-wheel__choice-list li strong { max-width: 100%; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
body .hat-prize-wheel__choice-list li span { color: var(--hat-muted); font-size: 11px; line-height: 1.35; }
body .hat-prize-wheel__choice-round .hat-prize-wheel__choose { min-height: 38px; padding: 7px 9px; font-size: 12px; }
body .hat-prize-wheel__choice-note { margin: 10px 0 0 !important; color: var(--hat-muted) !important; font-size: 12px; line-height: 1.45; text-align: center; }
@media (max-width: 540px) { body .hat-prize-wheel__choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Wallet typography is fixed so a theme's large paragraph size cannot outgrow the card headings. */
body .hat-wheel-wallet, body .hat-wheel-wallet p, body .hat-wheel-wallet li, body .hat-wheel-wallet summary { font-size: 14px; line-height: 1.5; }
body .hat-wheel-wallet h2 { font-size: 18px; }
body .hat-wheel-wallet__item p { margin: 4px 0 0; }
body .hat-wheel-wallet__heading strong { font-size: 15px; font-weight: 700; }
body .hat-wheel-wallet--checkout { margin: 0 0 20px; padding: 14px 18px; }
body .hat-wheel-wallet--checkout h2 { margin: 0 0 6px; }
body .hat-wheel-wallet__details summary { cursor: pointer; color: #173f5f; font-weight: 600; }
body .hat-wheel-wallet__details[open] summary { margin-bottom: 12px; }
body .hat-wheel-wallet__details summary:focus-visible, body .hat-wheel-wallet a:focus-visible, body .hat-wheel-wallet button:focus-visible { outline: 3px solid #14202e; outline-offset: 2px; }
body .hat-wheel-wallet a { color: #173f5f; text-decoration: underline; }
@media (min-width: 761px) { body .hat-wheel-wallet--account .hat-wheel-wallet__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Keep the account rewards page legible in the store's dark account layout. */
body .hat-wheel-wallet--account { border-color: #2b3542; background: #131922; color: #f3f5f8; }
body .hat-wheel-wallet--account h2 { color: #fff; }
body .hat-wheel-wallet--account > p { margin: 0; color: #c9d0da; }
body .hat-wheel-wallet--account .hat-wheel-wallet__item { border-color: #303b49; border-left-color: #f01d48; background: #0e131a; color: #f3f5f8; }
body .hat-wheel-wallet--account .hat-wheel-wallet__heading strong { color: #fff; }
body .hat-wheel-wallet--account .hat-wheel-wallet__state { color: #ff6682; }
body .hat-wheel-wallet--account .hat-wheel-wallet__item p { color: #c2cad5; }
body .hat-wheel-wallet--account .hat-wheel-wallet__code code { border-color: #647184; background: #080b10; color: #fff; }
body .hat-wheel-wallet--account .hat-wheel-wallet__code .hat-wheel-copy-code { border-color: #f01d48; background: #1c222b; color: #fff; }
body .hat-wheel-wallet--account .hat-wheel-wallet__code .hat-wheel-copy-code:hover { background: #30202a; }
body .hat-wheel-wallet--account a { color: #ff6682; }
