/* ── Velvet Drip Rewards — inherits the same Fraunces/Inter pairing and
   color palette as the main site, so this never feels like a bolted-on
   plugin page. ── */

#vdr-app, #vdr-app * { box-sizing: border-box; }

/* CRITICAL: the [hidden] attribute has low CSS specificity and gets
   silently overridden by any element-specific `display:` rule (e.g.
   .vdr-wheel-wrap{display:flex}). Without this !important rule, setting
   .hidden = true in JS does nothing visually once a flex/block rule
   exists on that same element — exactly the bug that showed wheel AND
   result panel on screen at once. */
#vdr-app [hidden] { display: none !important; }

#vdr-app {
  --vd-black: #0d0d0d;
  --vd-cream: #f6f1ea;
  --vd-cocoa-dark: #2b1810;
  --vd-cocoa: #5c3320;
  --vd-toffee: #a3673a;
  --vd-caramel: #d79a5c;

  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 30% 20%, var(--vd-cocoa-dark), var(--vd-black) 70%);
  color: var(--vd-cream);
  min-height: 100vh;
  padding: 96px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Break out of Astra's constrained content column (max-width container)
     the same way the homepage's hero/menu sections do, so this page is
     genuinely full-bleed instead of sitting in a narrow centered box. */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.vdr-back {
  position: absolute;
  top: 28px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(246,241,234,0.65);
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  z-index: 5;
}

.vdr-back:hover {
  color: var(--vd-cream);
  border-color: rgba(215,154,92,0.4);
  background: rgba(255,255,255,0.07);
}

.vdr-login-nudge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 600px;
  width: 100%;
  margin: 0 0 36px;
  padding: 14px 22px;
  background: rgba(215,154,92,0.07);
  border: 1px solid rgba(215,154,92,0.25);
  border-radius: 999px;
  text-align: center;
}

.vdr-login-nudge__text {
  font-size: 0.88rem;
  color: rgba(246,241,234,0.85);
  line-height: 1.4;
}

.vdr-login-nudge__text strong {
  color: var(--vd-caramel);
}

.vdr-login-nudge__btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: var(--vd-caramel);
  color: var(--vd-black) !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.vdr-login-nudge__btn:hover {
  transform: translateY(-1px);
  background: #e3aa6c;
}

.vdr-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.vdr-head {
  text-align: center;
  max-width: 560px;
  margin-bottom: 48px;
}

.vdr-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vd-caramel);
  margin: 0 0 16px;
}

.vdr-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--vd-cream);
}

.vdr-title--accent {
  font-style: italic;
  background: linear-gradient(100deg, var(--vd-caramel) 0%, var(--vd-toffee) 45%, var(--vd-cocoa) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vdr-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(246,241,234,0.72);
  margin: 0;
}

.vdr-stage {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
}

/* ── Wheel ── */
.vdr-wheel-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vdr-wheel-pointer {
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--vd-caramel);
  margin-bottom: -4px;
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.vdr-wheel {
  position: relative;
  width: min(320px, 80vw);
  height: min(320px, 80vw);
}

#vdr-wheel-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.45));
  transition: transform 3.4s cubic-bezier(0.12, 0.8, 0.08, 1);
}

.vdr-wheel-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vd-toffee), var(--vd-cocoa-dark));
  border: 3px solid var(--vd-cream);
  color: var(--vd-cream);
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 4;
}

.vdr-wheel-hub:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

.vdr-wheel-hub:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Result panel ── */
.vdr-result {
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 32px;
  width: 100%;
}

.vdr-result__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.vdr-result__title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--vd-caramel);
  margin: 0 0 8px;
}

.vdr-result__sub {
  font-size: 0.95rem;
  color: rgba(246,241,234,0.7);
  margin: 8px 0 24px;
}

.vdr-coupon-box {
  background: rgba(215,154,92,0.08);
  border: 1px dashed rgba(215,154,92,0.4);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 20px 0;
}

.vdr-coupon-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vd-caramel);
  display: block;
  margin-bottom: 8px;
}

.vdr-coupon-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vdr-coupon-code {
  font-family: 'Inter', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--vd-cream);
}

.vdr-copy-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--vd-cream);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.vdr-copy-btn:hover { background: rgba(255,255,255,0.18); }

.vdr-coupon-note {
  font-size: 0.78rem;
  color: rgba(246,241,234,0.55);
  margin: 10px 0 0;
}

/* ── Claim box — shown to anonymous winners instead of a coupon code.
   Same dashed-border framing as the coupon box so it reads as "your prize
   is here, just one step away" rather than a dead end. ── */
.vdr-claim-box {
  background: rgba(215,154,92,0.08);
  border: 1px dashed rgba(215,154,92,0.4);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 20px 0;
  text-align: center;
}

.vdr-claim-box__icon {
  color: var(--vd-caramel);
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.vdr-claim-box__text {
  font-size: 0.92rem;
  color: rgba(246,241,234,0.85);
  margin: 0 0 16px;
}

.vdr-comeback {
  font-size: 0.85rem;
  color: rgba(246,241,234,0.5);
  margin: 18px 0 0;
}

/* ── Shared button ── */
.vdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vdr-btn--primary {
  background: linear-gradient(135deg, var(--vd-toffee), var(--vd-cocoa-dark));
  color: var(--vd-cream) !important;
  box-shadow: 0 8px 24px rgba(92,51,32,0.35);
}

.vdr-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(92,51,32,0.5);
}

.vdr-footnote {
  margin-top: 40px;
  text-align: center;
}

.vdr-footnote p {
  font-size: 0.78rem;
  color: rgba(246,241,234,0.4);
  margin: 0;
}

@media (max-width: 480px) {
  #vdr-app { padding: 72px 18px 60px; }
  .vdr-result { padding: 32px 20px; }
  /* Ensure the wheel always has real screen space on small phones —
     90vw rather than 80vw, and a sane floor so it can't shrink to
     nothing if any parent flex/grid context squeezes it. */
  .vdr-wheel { width: min(280px, 90vw); height: min(280px, 90vw); min-width: 220px; min-height: 220px; }
  .vdr-stage { max-width: 100%; padding: 0 4px; }
  .vdr-back { top: 16px; left: 16px; padding: 6px 12px; font-size: 0.78rem; }
  .vdr-login-nudge { flex-direction: column; padding: 16px 18px; margin-bottom: 28px; }
}
