.sgp-spin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sgp-spin-overlay.sgp-spin-open {
  display: flex;
}

.sgp-spin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 46, 92, 0.55);
}

.sgp-spin-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--sg-surface, #fff);
  border-radius: var(--sg-radius-lg, 16px);
  box-shadow: var(--sg-shadow-lg, 0 12px 40px rgba(26, 46, 92, 0.2));
  padding: 32px 28px 28px;
  text-align: center;
}

.sgp-spin-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--sg-text-muted, #5c6b82);
  cursor: pointer;
  padding: 4px;
}

.sgp-spin-close:hover {
  color: var(--sg-text, #1a2e5c);
}

.sgp-spin-title {
  font-family: var(--sg-font-heading, serif);
  font-size: 24px;
  color: var(--sg-text, #1a2e5c);
  margin: 0 0 8px;
}

.sgp-spin-subtitle {
  font-size: 14px;
  color: var(--sg-text-muted, #5c6b82);
  margin: 0 0 20px;
}

/* ---------- the wheel itself ---------- */

.sgp-spin-wheel-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 24px;
}

.sgp-spin-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 20px solid var(--sg-brown, #6b4a32);
  /* A thin lighter sliver along one edge of the triangle reads as a
     bevel catching the light, instead of one flat brown shape. */
  filter: drop-shadow(0 3px 3px rgba(26, 46, 92, 0.35));
  z-index: 3;
}

.sgp-spin-pointer::after {
  content: "";
  position: absolute;
  top: -19px;
  left: -3px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 9px solid transparent;
  border-top: 15px solid rgba(255, 255, 255, 0.35);
}

/* A gold-toned ring around the wheel itself (behind it, peeking out
   past the rim) instead of a plain flat white border - closer to a
   real prize wheel's metal rim than a flat coloured disc. */
.sgp-spin-wheel-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: linear-gradient(155deg, #f3d98b, #b8862f 45%, #f3d98b 75%, #8a6321);
  box-shadow: 0 10px 26px rgba(26, 46, 92, 0.35);
  z-index: 0;
}

.sgp-spin-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid var(--sg-surface, #fff);
  box-shadow:
    0 4px 20px rgba(26, 46, 92, 0.25),
    inset 0 0 0 1px rgba(26, 46, 92, 0.08);
  position: relative;
  transform: rotate(0deg);
  z-index: 1;
}

/* A soft sheen arcing across the upper-left of the wheel, like light
   glancing off a glossy dome - sits above the coloured wedges but
   below the labels/hub, and never intercepts clicks. */
.sgp-spin-wheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 24%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.18) 22%,
    rgba(255, 255, 255, 0) 55%
  );
  pointer-events: none;
  z-index: 1;
}

.sgp-spin-wheel-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.sgp-spin-wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  margin-left: -36px;
  text-align: center;
  line-height: 1.15;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transform-origin: 50% 0;
}

/* "Free Shipping" only - its two words are built as separate <span>
   children (see spin-wheel.js) instead of one text node, stacked here
   as two block lines (FREE / SHIPPING) rather than left to wrap at
   whatever width happens to fit. */
.sgp-spin-wheel-label-2line span {
  display: block;
}

.sgp-spin-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  /* A raised gold dome instead of a flat white disc - the highlight
     sits up and to the left, like the wheel's own sheen, so it reads
     as one consistent light source rather than two unrelated effects. */
  background: radial-gradient(circle at 35% 30%, #fdf1cf, #e8c565 55%, #a8792f 100%);
  box-shadow:
    0 3px 10px rgba(26, 46, 92, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -3px 4px rgba(120, 78, 20, 0.5);
  z-index: 4;
}

/* ---------- steps ---------- */

.sgp-spin-step[hidden] {
  display: none;
}

.sgp-spin-btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--sg-radius, 10px);
  background: var(--sg-accent, #e85ba0);
  color: #fff;
  font-family: var(--sg-font-body, sans-serif);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sgp-spin-btn:hover {
  background: var(--sg-accent-light, #f193c5);
}

.sgp-spin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.sgp-spin-email {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--sg-border, #e3d6c4);
  border-radius: var(--sg-radius, 10px);
  font-size: 15px;
  font-family: var(--sg-font-body, sans-serif);
}

.sgp-spin-error {
  color: var(--sg-accent, #b0362f);
  font-size: 13px;
  margin: -6px 0 12px;
  min-height: 1em;
}

.sgp-spin-result-label {
  font-family: var(--sg-font-heading, serif);
  font-size: 26px;
  color: var(--sg-primary, #1b7a7a);
  margin: 4px 0 16px;
}

.sgp-spin-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sg-primary-light, #dceeee);
  border-radius: var(--sg-radius, 10px);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.sgp-spin-code {
  flex: 1;
  font-family: Consolas, Monaco, monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--sg-text, #1a2e5c);
  letter-spacing: 0.03em;
}

.sgp-spin-copy-btn {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--sg-primary, #1b7a7a);
  border-radius: 6px;
  background: #fff;
  color: var(--sg-primary, #1b7a7a);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sgp-spin-copy-btn:hover {
  background: var(--sg-primary, #1b7a7a);
  color: #fff;
}

.sgp-spin-copy-btn-copied,
.sgp-spin-copy-btn-copied:hover {
  background: #2e8b57;
  border-color: #2e8b57;
  color: #fff;
}

.sgp-spin-fineprint {
  font-size: 11.5px;
  color: var(--sg-text-muted, #5c6b82);
  margin-top: 14px;
}

/* ---------- floating reopen button ---------- */

.sgp-spin-reopen {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99998;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--sg-accent, #e85ba0);
  color: #fff;
  font-family: var(--sg-font-body, sans-serif);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(26, 46, 92, 0.3);
  /* A very light, slow pulse (not the wheel's own quick spin) - just
     enough to catch the eye as "this is still here and clickable",
     not enough to read as pushy or distracting. */
  animation: sgp-spin-reopen-pulse 10s ease-in-out infinite;
}

.sgp-spin-reopen[hidden] {
  display: none;
}

/* Hides itself whenever the product page's own design picker is open
   (personalizer.js adds/removes this exact class on <body>) - on
   mobile especially, this button's fixed bottom-right spot was
   overlapping the design picker's own controls (page, category chips)
   right where someone's trying to tap them. */
body.sgp-modal-open .sgp-spin-reopen {
  display: none;
}

.sgp-spin-reopen:hover {
  background: var(--sg-accent-light, #f193c5);
}

@keyframes sgp-spin-reopen-pulse {
  0%,
  92%,
  100% {
    transform: scale(1);
  }
  95% {
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sgp-spin-reopen {
    animation: none;
  }
}

@media (max-width: 480px) {
  .sgp-spin-reopen {
    right: 12px;
    bottom: 12px;
    padding: 12px 18px;
    font-size: 12.5px;
  }
}

