/* Onboarding Wizard Styles — extends the base HeyHi design system */

/* Onboarding Layout */
.onboarding-main {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
  background: radial-gradient(circle at 50% 20%, rgba(34, 197, 94, 0.05) 0%, rgba(15, 23, 42, 0) 50%);
}

.onboarding-container {
  max-width: 640px;
  width: 100%;
  padding: 0 24px;
}

.onboarding-nav-info {
  display: flex;
  align-items: center;
}

.nav-step-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: var(--color-primary);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

/* Wizard Stepper */
.wizard-stepper {
  position: relative;
  margin-bottom: 48px;
}

.stepper-track {
  position: absolute;
  top: 18px;
  left: 36px;
  right: 36px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  z-index: 0;
}

.stepper-fill {
  height: 100%;
  width: 0%;
  background: var(--color-cta);
  border-radius: 2px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.stepper-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.marker-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all 300ms ease;
}

.marker-check {
  display: none;
}

.marker-number {
  display: block;
}

.step-marker.active .marker-circle {
  border-color: var(--color-cta);
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-cta);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.step-marker.complete .marker-circle {
  border-color: var(--color-cta);
  background: var(--color-cta);
  color: #0c120c;
}

.step-marker.complete .marker-number {
  display: none;
}

.step-marker.complete .marker-check {
  display: block;
}

.marker-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.step-marker.active .marker-label {
  color: var(--color-text);
}

/* Step Cards */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: step-enter 400ms ease forwards;
}

@keyframes step-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-card {
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.step-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top center, rgba(34, 197, 94, 0.05), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.step-card > * {
  position: relative;
  z-index: 1;
}

.step-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.step-icon-wrapper.github-color {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.step-icon-wrapper.green-color {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-cta);
}

.step-icon-wrapper.blue-color {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-accent-blue);
}

.step-icon-wrapper.purple-color {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-accent-purple);
}

.step-title {
  font-size: 1.5rem;
}

.step-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 440px;
  line-height: 1.5;
}

.step-action-btn {
  margin-top: 12px;
  padding: 14px 32px;
  font-size: 1rem;
}

/* Step Status Messages */
.step-status {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  margin-top: 8px;
}

.status-loading {
  color: var(--color-accent-blue);
}

.status-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--color-accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.status-success {
  color: var(--color-cta);
}

.status-error {
  color: var(--color-error);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Provider Selector */
.provider-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.provider-card {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: var(--font-heading);
}

.provider-card:hover {
  border-color: var(--color-text-muted);
}

.provider-card.active {
  border-color: var(--color-accent-purple);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

.provider-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.provider-prefix {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* LLM Key Input */
.llm-key-group {
  width: 100%;
  text-align: left;
}

.key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.key-input-wrapper .form-input {
  width: 100%;
  padding-right: 48px;
}

.key-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.key-toggle:hover {
  color: var(--color-text);
}

.hidden {
  display: none;
}

/* Completion Card */
.completion-card {
  background: radial-gradient(circle at top center, rgba(34, 197, 94, 0.12) 0%, var(--color-primary) 70%);
}

.completion-icon {
  animation: completion-pop 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes completion-pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.completion-title {
  font-size: 2rem;
  background: linear-gradient(135deg, #fff 30%, var(--color-cta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.completion-desc {
  max-width: 480px;
}

.completion-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  text-align: left;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Disabled state for locked steps' buttons */
.step-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .onboarding-main {
    padding-top: 100px;
  }

  .step-card {
    padding: 32px 24px;
  }

  .provider-selector {
    grid-template-columns: 1fr;
  }

  .marker-label {
    font-size: 0.6rem;
  }

  .stepper-track {
    left: 24px;
    right: 24px;
  }
}

@media (max-width: 375px) {
  .step-title {
    font-size: 1.3rem;
  }

  .step-action-btn {
    width: 100%;
  }
}
