/* ============================================================
   Onboarding Page Styles
   Getting Started checklist and profile setup
   ============================================================ */

/* Page Container */
#onboardingPage {
  display: none;
  padding: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

#onboardingPage.active {
  display: block;
}

/* Welcome Section */
.onboarding-welcome {
  text-align: center;
  margin-bottom: var(--space-8);
}

.onboarding-welcome h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.onboarding-welcome p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

/* Getting Started Card */
.getting-started-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.getting-started-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.getting-started-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.getting-started-icon {
  color: var(--color-primary);
}

.progress-indicator {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.progress-text {
  font-weight: 500;
}

/* Progress Bar */
.progress-bar-container {
  height: 8px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Steps List */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Step Item */
.step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.step-item:hover {
  background: var(--color-bg-hover);
}

.step-item.completed {
  opacity: 0.7;
}

.step-item.locked {
  opacity: 0.5;
}

/* Step Status Circle */
.step-status {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-hover);
  border: 2px solid var(--color-border);
}

.step-item.completed .step-status {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

.step-item.current .step-status {
  background: var(--color-bg);
  border-color: var(--color-primary);
  border-width: 2px;
}

.step-item.current .step-status .step-number {
  color: var(--color-primary);
  font-weight: 600;
}

.step-number {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Step Content */
.step-content {
  flex: 1;
}

.step-label {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.step-item.locked .step-label {
  color: var(--color-text-muted);
}

.step-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.step-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Step Action Button */
.step-action {
  flex-shrink: 0;
}

.step-action-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-action-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

/* Quick Actions */
.quick-actions {
  margin-bottom: var(--space-6);
}

.quick-actions h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.quick-action-icon {
  color: var(--color-text-muted);
}

.quick-action-btn:hover .quick-action-icon {
  color: var(--color-primary);
}

/* Returning User View */
.returning-user-welcome {
  text-align: center;
  margin-bottom: var(--space-8);
}

.returning-user-welcome h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.returning-user-welcome p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.returning-user-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.stat-icon {
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* CTA Section */
.cta-section {
  text-align: center;
  margin-bottom: var(--space-8);
}

.primary-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.primary-cta-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-icon {
  display: flex;
}

/* Recent Sessions */
.recent-sessions-section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.recent-sessions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.recent-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.recent-session-item:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.session-question {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.session-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.session-status {
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.session-status.complete {
  background: var(--color-success);
  color: white;
}

.session-status.waiting_notes {
  background: var(--color-warning);
  color: white;
}

.loading-text,
.empty-state {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-4);
}

/* Profile Modal */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
}

.profile-modal.hidden {
  display: none;
}

.profile-modal-content {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.profile-modal-header h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

/* Profile Step */
.profile-step {
  padding: var(--space-6);
}

.profile-step-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.step-dots {
  display: flex;
  gap: var(--space-1);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.step-dot.active {
  background: var(--color-primary);
}

.profile-question {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.profile-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

/* Profile Options */
.profile-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.profile-option-btn {
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-option-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.profile-option-btn.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.profile-text-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.profile-text-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

/* Profile Navigation */
.profile-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.profile-nav-right {
  display: flex;
  gap: var(--space-3);
}

.profile-back-btn,
.profile-skip-btn {
  padding: var(--space-3) var(--space-4);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-back-btn:hover,
.profile-skip-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.profile-next-btn {
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-next-btn:hover {
  background: var(--color-primary-hover);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--space-3) var(--space-6);
  background: var(--color-text);
  color: white;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  z-index: 1100;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast-success {
  background: var(--color-success);
}

.toast.toast-error {
  background: var(--color-danger);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #onboardingPage {
    padding: var(--mobile-padding);
  }

  .onboarding-welcome h1 {
    font-size: var(--text-xl);
  }

  .getting-started-card {
    padding: var(--space-4);
  }

  .getting-started-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .step-item {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .step-action {
    width: 100%;
    margin-top: var(--space-2);
  }

  .step-action-btn {
    width: 100%;
    min-height: var(--touch-target-min);
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .quick-action-btn {
    min-height: var(--touch-target-min);
  }

  .returning-user-grid {
    grid-template-columns: 1fr;
  }

  .primary-cta-btn {
    width: 100%;
    justify-content: center;
    min-height: var(--touch-target-min);
  }

  .profile-modal-content {
    max-height: 100vh;
    border-radius: 0;
  }

  .profile-options {
    flex-direction: column;
  }

  .profile-option-btn {
    width: 100%;
    text-align: left;
    min-height: var(--touch-target-min);
  }

  .profile-nav {
    flex-direction: column;
    gap: var(--space-3);
  }

  .profile-nav-right {
    width: 100%;
  }

  .profile-back-btn,
  .profile-skip-btn,
  .profile-next-btn {
    flex: 1;
    min-height: var(--touch-target-min);
  }
}
