/* =====================================================
   PICK YOUR FORMAT — Day 81 redesign (site-wide design
   revamp, page #4). "Format Wheel" direction, picked from
   a 7-option canvas (1 improve-current + 3 from-scratch +
   3 out-of-the-box) per the DESIGN REQUEST PROCESS rule.
   Reads the shared tokens style.css already defines.
   ===================================================== */

/* ===== PAGE HEADER ===== */
.page-header {
  text-align: center;
  padding: 56px 24px 8px;
}

.page-title {
  font-family: var(--font-display), sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.page-subtitle {
  color: var(--color-ink-soft);
  font-size: 1rem;
}

/* ===== WHEEL SECTION ===== */
.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 24px 64px;
}

.format-wheel {
  --wheel-size: 280px;
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  margin: 36px 0 8px;
}

/* The whole disc — face, dividers, and all 4 quad buttons — rotates
   together as one slow idle spin (Day 87). Each quad's own content
   counter-rotates at the same speed so its icon/label stay upright
   while the color/divider/tap-target underneath it keep moving as one
   piece — tapping still always hits the format currently shown there. */
.wheel-spinner {
  position: absolute;
  inset: 0;
  animation: wheelSpin 90s linear infinite;
}
@keyframes wheelSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wheelSpinReverse { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .wheel-spinner, .wheel-quad-content { animation: none; } }

.wheel-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #c084fc 0% 25%, var(--color-pop) 25% 50%, #5aa0ff 50% 75%, var(--gold-1) 75% 100%);
  box-shadow: var(--shadow-card), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.wheel-divider-v,
.wheel-divider-h {
  position: absolute;
  background: var(--color-bg);
  pointer-events: none;
}
.wheel-divider-v { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.wheel-divider-h { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }

/* Each quadrant is a real <button> sized to a generous corner hit-area,
   not just the visible icon — bigger tap target than the pie slice alone. */
.wheel-quad {
  position: absolute;
  width: 42%;
  height: 42%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform var(--motion-fast) var(--ease-standard);
}
.wheel-quad:hover,
.wheel-quad:focus-visible { transform: scale(1.08); }
.wheel-quad.selected { transform: scale(1.14); }
.wheel-quad:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

.wheel-quad-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  animation: wheelSpinReverse 90s linear infinite;
}

.wheel-quad[data-format="ipl"]  { top: 4%; right: 4%; }
.wheel-quad[data-format="test"] { bottom: 4%; right: 4%; }
.wheel-quad[data-format="odi"]  { bottom: 4%; left: 4%; }
.wheel-quad[data-format="t20"]  { top: 4%; left: 4%; }

.wheel-quad-label {
  font-family: var(--font-data), sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--color-bg);
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.wheel-hub-label {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--color-ink);
}

.wheel-start-btn {
  width: 280px;
  max-width: 100%;
  margin-top: 24px;
  text-align: center;
}
.wheel-start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-press);
}
.wheel-start-btn:disabled:hover { transform: none; }

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .page-header {
    padding: 36px 18px 4px;
  }
  .page-title {
    font-size: 1.7rem;
  }
  .format-wheel {
    --wheel-size: 250px;
  }
  .wheel-quad-label {
    font-size: 0.7rem;
  }
}
