/* =============================================================================
 * Local Authority Scorecard — custom styles
 * Tailwind handles layout/spacing; this file owns motion, transitions,
 * option-card states, and print rules (print rules expand in Phase 4).
 * ========================================================================== */

/* ----- View switching (landing / wizard / report) ----- */
.view {
  display: block;
}
.view.hidden {
  display: none;
}

/* ----- CTA micro-interaction ----- */
.cta-pop {
  will-change: transform;
}
.cta-pop:hover {
  transform: translateY(-1px);
}
.cta-pop:active {
  transform: translateY(0);
}

/* ----- Progress bar easing ----- */
.progress-bar {
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================================
 * STEP SLIDE TRANSITIONS
 * Each step is absolutely stacked inside #step-viewport. The controller toggles
 * .is-active and a direction class to animate in/out.
 * ========================================================================== */
.step {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 320ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.step.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
/* Going backwards: incoming step slides in from the left. */
.step.from-left {
  transform: translateX(-40px);
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .progress-bar,
  .cta-pop {
    transition: none;
  }
  .step {
    transform: none;
  }
}

/* =============================================================================
 * OPTION CARDS (radio / select rendered as tappable cards)
 * ========================================================================== */
.option-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.125rem;
  border: 2px solid #e2e8f0;        /* slate-200 */
  border-radius: 0.875rem;
  background: #ffffff;
  color: #1e293b;                   /* slate-800 */
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease;
}
.option-card:hover {
  border-color: #fdba74;            /* brand-300-ish */
  background: #fff7ed;              /* brand-50 */
}
.option-card:active {
  transform: scale(0.995);
}
.option-card.selected {
  border-color: #f97316;            /* brand-500 */
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.option-card .marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #cbd5e1;        /* slate-300 */
  border-radius: 9999px;
  font-size: 0.75rem;
  color: transparent;
  transition: all 160ms ease;
}
.option-card.selected .marker {
  border-color: #f97316;
  background: #f97316;
  color: #ffffff;
}

/* Textarea + lead inputs */
.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

/* =============================================================================
 * REPORT (Phase 4) — on-screen styles
 * ========================================================================== */
.report-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.report-card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.12);
}
.report-note {
  border-left: 4px solid #4f46e5;
  background: #eef2ff;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}
.report-action {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.report-action-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: #fff7ed;
  color: #ea580c;
  font-weight: 800;
  font-size: 0.85rem;
}
.report-cta {
  text-align: center;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
}
.report-cta-high {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}
.report-cta-standard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.report-cta-btn {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #c2410c;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}
.report-cta-btn-light {
  background: #f97316;
  color: #ffffff;
}
.report-print-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
}
.report-print-btn:hover {
  background: #e2e8f0;
}

/* =============================================================================
 * PRINT — clean, ink-friendly report (hides landing + wizard + interactive bits)
 * ========================================================================== */
@media print {
  #view-landing,
  #view-wizard {
    display: none !important;
  }
  body {
    background: #ffffff !important;
  }
  .report-print-btn {
    display: none !important;
  }
  .report-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
  }
  .report-action {
    break-inside: avoid;
  }
  .report-cta {
    break-inside: avoid;
  }
  /* Ensure colored bars/backgrounds actually print. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  @page {
    margin: 1.5cm;
  }
}
