/* ═══════════════════════════════════════════════════════════════════════════
   MATCH LOGGING WIZARD — Step-based UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Progress indicator ────────────────────────────────────────────────── */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-2);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.wizard-step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.wizard-step-indicator:hover {
  background: var(--surface-hover);
}

.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-weight: 700;
  font-size: var(--text-xs);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.wizard-step-indicator.active .wizard-step-num {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.wizard-step-indicator.completed .wizard-step-num {
  background: var(--success);
  color: #fff;
}

.wizard-step-indicator.completed .wizard-step-num::after {
  content: '✓';
  font-size: 14px;
}

/* Hide the number when showing checkmark */
.wizard-step-indicator.completed .wizard-step-num {
  font-size: 0;
}

.wizard-step-indicator.active .wizard-step-label {
  color: var(--text-primary);
}

.wizard-step-indicator.completed .wizard-step-label {
  color: var(--success);
}

.wizard-step-connector {
  flex: 0 0 32px;
  height: 2px;
  background: var(--border);
  position: relative;
}

/* ── Panels and transitions ────────────────────────────────────────────── */
.wizard-panels {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.wizard-panel {
  display: none;
  animation: wizardFadeIn 0.3s ease-out;
}

.wizard-panel.active {
  display: block;
}

.wizard-panel.exit-left {
  display: none;
}

.wizard-panel.exit-right {
  display: none;
}

@keyframes wizardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Actions bar ───────────────────────────────────────────────────────── */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

.wizard-nav-buttons {
  display: flex;
  gap: var(--space-3);
}

.wizard-prev {
  min-width: 80px;
}

.wizard-next,
.wizard-submit {
  min-width: 120px;
}

/* ── Review summary card ───────────────────────────────────────────────── */
.wizard-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

.wizard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.wizard-summary-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--bg-primary, var(--color-bg-base));
}

.wizard-summary-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wizard-summary-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Form validation error highlight ───────────────────────────────────── */
.form-input--error {
  border-color: var(--danger, #ef4444) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ── Override for wizard: no extra scroll wrapper ──────────────────────── */
.match-wizard {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--space-2);
}

#matchForm.match-form-enhanced {
  overflow-x: hidden;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wizard-progress {
    gap: 0;
    padding: var(--space-3) var(--space-1);
  }

  .wizard-step-label {
    display: none;
  }

  .wizard-step-connector {
    flex: 0 0 16px;
  }

  .wizard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .wizard-summary-grid {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    flex-direction: column;
    gap: var(--space-3);
  }

  .wizard-nav-buttons {
    width: 100%;
    justify-content: space-between;
  }
}
