/**
 * Flow Progress Panel
 * ====================
 * Character creation checklist with numbered steps and progress tracking.
 */

.flow-progress-panel {
  --fp-bg: var(--panel-bg, #1a1a2e);
  --fp-border: var(--panel-border, #2d2d44);
  --fp-text: var(--text-primary, #e0e0e0);
  --fp-text-muted: var(--text-secondary, #6b7280);
  --fp-accent: #6366f1;
  --fp-accent-soft: rgba(99, 102, 241, 0.15);
  --fp-success: #10b981;
  --fp-success-soft: rgba(16, 185, 129, 0.15);
  --fp-pending: #374151;

  background: var(--fp-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 13px;
}

/* Empty state */
.fp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--fp-text-muted);
  padding: 2rem 1rem;
  text-align: center;
  flex: 1;
}

.fp-empty-icon {
  opacity: 0.5;
}

.fp-empty-icon .svg-icon {
  width: 32px;
  height: 32px;
}

.fp-empty-icon svg {
  width: 32px;
  height: 32px;
}

.fp-empty-state p {
  margin: 0;
  font-size: 0.85rem;
}

/* Header */
.fp-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--fp-border);
}

.fp-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.fp-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fp-progress-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fp-accent);
  background: var(--fp-accent-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-variant-numeric: tabular-nums;
}

/* Progress bar */
.fp-progress-bar {
  height: 4px;
  background: var(--fp-pending);
  border-radius: 2px;
  overflow: hidden;
}

.fp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fp-accent), var(--fp-success));
  border-radius: 2px;
  transition: width 0.4s ease-out;
}

/* Steps list */
.fp-steps {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* Individual step */
.fp-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
  cursor: default;
}

.fp-step:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Step number circle */
.fp-step-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--fp-pending);
  transition: all 0.2s ease;
}

.fp-step-num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fp-text-muted);
}

.fp-step-num--locked {
  opacity: 0.4;
}

.fp-check-icon {
  width: 14px;
  height: 14px;
  color: white;
}

/* Step content */
.fp-step-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.fp-step-icon {
  flex-shrink: 0;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.fp-step-icon .svg-icon {
  width: 14px;
  height: 14px;
}

.fp-step-icon svg {
  width: 14px;
  height: 14px;
}

.fp-step-label {
  color: var(--fp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.fp-step-badge {
  font-size: 0.6rem;
  color: var(--fp-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fp-step-value {
  font-size: 0.7rem;
  color: var(--fp-success);
  background: var(--fp-success-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* Step states */

/* Pending - greyed out */
.fp-step--pending {
  opacity: 0.5;
}

.fp-step--pending .fp-step-icon {
  filter: grayscale(1);
}

/* Unlocked - available but not started */
.fp-step--unlocked .fp-step-number {
  background: var(--fp-accent-soft);
  border: 1px solid var(--fp-accent);
}

.fp-step--unlocked .fp-step-num {
  color: var(--fp-accent);
}

.fp-step--unlocked .fp-step-label {
  color: var(--fp-text);
}

/* Active - currently working on */
.fp-step--active {
  background: var(--fp-accent-soft);
  border-left: 3px solid var(--fp-accent);
  padding-left: calc(1rem - 3px);
}

.fp-step--active .fp-step-number {
  background: var(--fp-accent);
  box-shadow: 0 0 12px var(--fp-accent);
  animation: fp-pulse 2s ease-in-out infinite;
}

.fp-step--active .fp-step-num {
  color: white;
}

.fp-step--active .fp-step-label {
  color: var(--fp-text);
  font-weight: 500;
}

.fp-step--active .fp-step-icon {
  opacity: 1;
}

@keyframes fp-pulse {
  0%, 100% {
    box-shadow: 0 0 8px var(--fp-accent);
  }
  50% {
    box-shadow: 0 0 16px var(--fp-accent);
  }
}

/* Completed */
.fp-step--completed .fp-step-number {
  background: var(--fp-success);
}

.fp-step--completed .fp-step-label {
  color: var(--fp-text);
}

.fp-step--completed .fp-step-icon {
  opacity: 1;
}

/* Current step hint at bottom */
.fp-current-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--fp-accent-soft);
  border-top: 1px solid var(--fp-border);
  font-size: 0.8rem;
}

.fp-hint-arrow {
  color: var(--fp-accent);
  font-weight: bold;
  animation: fp-bounce 1s ease-in-out infinite;
}

@keyframes fp-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.fp-hint-text {
  color: var(--fp-text);
  font-weight: 500;
}
