/* Pick of Trend — spin-to-win popup. Uses the design tokens from pot.css. */

.pot-wheel-ovl {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(23, 20, 15, 0.55);
  opacity: 0; transition: opacity 0.25s ease;
}
.pot-wheel-ovl.is-open { opacity: 1; }
.pot-wheel-ovl[hidden] { display: none; }

.pot-wheel-box {
  position: relative;
  width: 100%; max-width: 380px;
  background: var(--card);
  border-radius: 14px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(23, 20, 15, 0.35);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pot-wheel-ovl.is-open .pot-wheel-box { transform: translateY(0) scale(1); }

.pot-wheel-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: 0; border-radius: 999px;
  background: var(--sunk); color: var(--ink-2);
  font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.pot-wheel-close:hover { background: var(--line); color: var(--ink); }

.pot-wheel-head h2 { margin: 0 0 6px; font-size: 24px; }
.pot-wheel-head p { margin: 0 0 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

.pot-wheel-stage {
  position: relative;
  width: 250px; height: 250px;
  margin: 0 auto 6px;
}

.pot-wheel-pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid var(--acc);
  filter: drop-shadow(0 2px 2px rgba(23, 20, 15, 0.25));
}

.pot-wheel-disc {
  position: absolute; inset: 0;
  border-radius: 999px;
  border: 5px solid var(--ink);
  overflow: hidden;
  transform: rotate(0deg);
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.12, 0.72, 0.15, 1);
  background:
    conic-gradient(
      from 0deg,
      var(--sunk) 0deg 45deg,
      var(--card) 45deg 90deg,
      var(--sunk) 90deg 135deg,
      var(--card) 135deg 180deg,
      var(--sunk) 180deg 225deg,
      var(--card) 225deg 270deg,
      var(--sunk) 270deg 315deg,
      var(--card) 315deg 360deg
    );
  box-shadow: inset 0 0 0 1px var(--line);
}

.pot-wheel-seg {
  position: absolute; top: 50%; left: 50%;
  width: 50%; height: 0;
  transform-origin: 0 0;
  transform: rotate(calc(360deg / var(--n) * var(--i) + (360deg / var(--n) / 2))) translateX(14px);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}
.pot-wheel-seg.is-win { color: var(--acc-dark); }

.pot-wheel-spin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 4;
  width: 62px; height: 62px; border-radius: 999px;
  background: var(--acc); color: var(--bg);
  border: 3px solid var(--card);
  font-family: var(--disp); font-weight: 800; font-size: 13px; letter-spacing: 0.03em;
  box-shadow: 0 3px 10px rgba(23, 20, 15, 0.3);
}
.pot-wheel-spin:hover:not(:disabled) { background: var(--acc-dark); }
.pot-wheel-spin:disabled { opacity: 0.85; cursor: default; }

.pot-wheel-result {
  margin-top: 16px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.pot-wheel-result.is-in { opacity: 1; transform: translateY(0); }
.pot-wheel-result[hidden] { display: none; }

.pot-wheel-result-msg {
  margin: 0 0 12px;
  font-family: var(--disp); font-weight: 700; font-size: 18px;
}

.pot-wheel-code {
  border: 1.5px dashed var(--acc); border-radius: 6px;
  background: var(--sunk);
  padding: 10px 14px 12px;
  margin-bottom: 14px;
}
.pot-wheel-code[hidden] { display: none; }
.pot-wheel-code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pot-wheel-code-row span {
  font-family: var(--disp); font-weight: 700; font-size: 16px; letter-spacing: 0.05em;
}
.pot-wheel-code-note {
  margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3);
}
.pot-wheel-code button {
  border: 1.5px solid var(--ink); background: var(--bg); color: var(--ink);
  border-radius: 4px; height: 32px; padding: 0 12px; font-size: 12px; font-weight: 700;
}
.pot-wheel-code button:hover { background: var(--ink); color: var(--bg); }

.pot-wheel-cta {
  width: 100%; height: 46px; border: 0; border-radius: 6px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 700;
}
.pot-wheel-cta:hover { background: var(--line-dark); }

@media (max-width: 480px) {
  .pot-wheel-box { padding: 22px 18px 18px; }
  .pot-wheel-stage { width: 210px; height: 210px; }
  .pot-wheel-spin { width: 54px; height: 54px; font-size: 12px; }
  .pot-wheel-seg { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .pot-wheel-ovl, .pot-wheel-box, .pot-wheel-result { transition: none; }
}
