/* ==========================================================================
   OSE (Old-School Essentials) Creation Wizard
   Scoped to .creation-wizard.ose — mirrors cairn-wizard.css structure.

   Per ose-wizard-redesign-v{1..4}.md (2026-05-24). Slice 7 dev cutover
   surfaced a missing-CSS regression: the new view classes
   (`ose-race-card`, `ose-class-row`, etc.) were used in views_ose.cljs
   but had no styles, so the wizard rendered as unstyled plain text.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Outer wrapper
   --------------------------------------------------------------------------- */

.creation-wizard.ose {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
}

/* ---------------------------------------------------------------------------
   Step 1: Race & Class — two-pane split with race grid (left) + class
   list (right). Race pane reveals OSR class detail panel beneath the
   grid; class pane reveals OSR class detail panel beneath the list.
   --------------------------------------------------------------------------- */

.creation-wizard.ose .ose-race-class {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (max-width: 800px) {
  .creation-wizard.ose .ose-race-class {
    grid-template-columns: 1fr;
  }
}

.creation-wizard.ose .ose-race-pane,
.creation-wizard.ose .ose-class-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.creation-wizard.ose .ose-race-pane h4,
.creation-wizard.ose .ose-class-pane h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 0.35rem;
}

/* --- Race grid (cards) --- */

.creation-wizard.ose .ose-race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
}

.creation-wizard.ose .ose-race-card {
  padding: 0.6rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.creation-wizard.ose .ose-race-card:hover {
  border-color: var(--text-muted);
  background: var(--bg-hover);
}

.creation-wizard.ose .ose-race-card.selected {
  border-color: var(--accent-red);
  background: rgba(230, 57, 70, 0.08);
}

.creation-wizard.ose .ose-race-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.creation-wizard.ose .ose-race-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* --- Class list (rows) --- */

.creation-wizard.ose .ose-class-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.creation-wizard.ose .ose-class-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.creation-wizard.ose .ose-class-row:hover {
  border-color: var(--text-muted);
  background: var(--bg-hover);
}

.creation-wizard.ose .ose-class-row.selected {
  border-color: var(--accent-red);
  background: rgba(230, 57, 70, 0.08);
}

.creation-wizard.ose .ose-class-row.blocked {
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--bg-secondary);
}

.creation-wizard.ose .ose-class-row.blocked:hover {
  border-color: var(--border-primary);
  background: var(--bg-secondary);
}

.creation-wizard.ose .ose-class-row-name {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.creation-wizard.ose .ose-class-row-hd {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-monospace, monospace);
}

.creation-wizard.ose .ose-class-row-reason {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Detail panels (reuse OSR's pre-existing detail components) ---
   Cairn pattern: the legacy `osr-class-detail` + `osr-species-detail`
   components already have styles in their own CSS. They live alongside
   the OSR wizard and are referenced from views_ose via @#'legacy/...
   so the styles flow through. No additional rules needed here.
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   Step 3: HP & Starting Gold — side-by-side at desktop widths to save
   vertical space (the two sections are narrow and stack awkwardly when
   forced into a column). User 2026-05-24: "they don't take up much
   horizontal room."
   --------------------------------------------------------------------------- */

.creation-wizard.ose .ose-hp-gold-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .creation-wizard.ose .ose-hp-gold-row {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   Summary tile spacing — user 2026-05-24: "there could be a bit of space
   between top cards and the Race/Class/Alignment section."
   The legacy summary renderer puts a stat-card grid then a flat row of
   Race/Class/Alignment labels; without margin they sit flush.
   --------------------------------------------------------------------------- */

.creation-wizard.ose .wizard-step-content > .osr-summary-stats + *,
.creation-wizard.ose .wizard-step-content > .stat-card-grid + * {
  margin-top: 1.25rem;
}

/* ---------------------------------------------------------------------------
   Inherited from OSR / creation-wizard-standard:
     - Step indicator (now flows from .creation-wizard.standard rules
       because the wrapper carries both `standard` and `ose` class tokens).
     - Ability-roll buttons, HP/Gold roll cards, spell pickers, identity
       form, summary stat cards. Unscoped or under `.creation-wizard.standard`.
   --------------------------------------------------------------------------- */
