/* ============================================================
   Apollo Group TV — Spin Wheel Overlay
   Dark navy + neon cyan brand
   ============================================================ */

/* ── Overlay backdrop ── */
#sw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#sw-overlay[hidden] {
  display: none !important;
}

#sw-overlay.sw-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Dialog box ── */
#sw-box {
  background: #0d1f3c;
  border: 1px solid #1a3a5c;
  border-top: 4px solid #00d4ff;
  border-radius: 12px;
  padding: 32px 28px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 212, 255, 0.08);
  animation: sw-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes sw-pop {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ── Close button ── */
#sw-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #5a8aaa;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

#sw-close:hover {
  color: #e8f4f8;
  background: rgba(255,255,255,.06);
}

/* ── Header ── */
#sw-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #00d4ff;
  margin-bottom: 6px;
}

#sw-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #e8f4f8;
  margin-bottom: 8px;
  line-height: 1.2;
}

#sw-sub {
  font-size: .85rem;
  color: #8ab4cc;
  line-height: 1.6;
  margin-bottom: 20px;
}

#sw-sub strong {
  color: #e8f4f8;
}

/* ── Wheel wrapper ── */
#sw-wheel-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 20px;
}

#sw-canvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.2);
}

/* ── Pointer (arrow at top center) ── */
#sw-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #00d4ff;
  filter: drop-shadow(0 2px 6px rgba(0,212,255,.6));
  z-index: 10;
}

/* ── Spin button ── */
.sw-btn-spin {
  background: #00d4ff;
  color: #080d1a;
  border: none;
  border-radius: 6px;
  padding: 14px 40px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.35);
  margin-bottom: 12px;
}

.sw-btn-spin:hover:not(:disabled) {
  background: #00a8cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 212, 255, 0.45);
}

.sw-btn-spin:active:not(:disabled) {
  transform: translateY(0);
}

.sw-btn-spin:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ── Note ── */
#sw-note {
  font-size: .73rem;
  color: #5a8aaa;
  margin-top: 4px;
}

/* ── Result section ── */
#sw-result {
  animation: sw-fadein .4s ease both;
  padding-top: 8px;
}

@keyframes sw-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sw-result-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
  animation: sw-bounce .5s ease both;
}

@keyframes sw-bounce {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1);   }
}

.sw-result-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #00d4ff;
  margin-bottom: 8px;
  line-height: 1.25;
}

.sw-result-detail {
  font-size: .88rem;
  color: #8ab4cc;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ── Claim button ── */
.sw-btn-claim {
  background: #00d4ff;
  color: #080d1a;
  border: none;
  border-radius: 6px;
  padding: 13px 36px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.35);
}

.sw-btn-claim:hover {
  background: #00a8cc;
  transform: translateY(-1px);
}

/* ── Prize banner (injected into order form) ── */
#sw-prize-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-left: 4px solid #00d4ff;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 14px;
  animation: sw-fadein .4s ease both;
}

.sw-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sw-banner-text {
  font-size: .88rem;
  font-weight: 700;
  color: #00d4ff;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #sw-box {
    padding: 24px 16px 20px;
    border-radius: 10px;
  }

  #sw-wheel-wrap {
    width: 260px;
    height: 260px;
  }

  #sw-canvas {
    width: 260px !important;
    height: 260px !important;
  }

  #sw-title { font-size: 1.25rem; }

  .sw-btn-spin,
  .sw-btn-claim { padding: 12px 24px; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  #sw-overlay,
  #sw-box,
  #sw-result,
  .sw-result-icon { animation: none !important; transition: none !important; }
}
