/**
 * GUIDED TOUR OVERLAY
 * Version: 37.11.4-PHASE3C
 * Date: 2025-01-14
 * 
 * Interactive onboarding overlay with multi-step tutorial.
 * Features smooth animations, progress dots, and personalization inputs.
 * 
 * Dependencies:
 * - variables.css (design tokens)
 * - buttons.css (button styles)
 * 
 * Components:
 * - .guided-tour-overlay - Full-screen backdrop
 * - .guided-tour-content - Modal content container
 * - .tour-header - Sticky header with close button
 * - .tour-body - Main content area
 * - .tour-step - Individual tour slides
 * - .tour-progress - Progress indicator with dots
 * - .tour-features-grid - Feature showcase grid
 * - .tour-personalization-input - Input fields for user data
 * - .tour-privacy-badge - Privacy assurance badge
 * 
 * Animations: fadeIn, slideUp, fadeInSlide
 */

/* ============================================
   GUIDED TOUR OVERLAY
   ============================================ */
.guided-tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.3s ease-out;
  transition: opacity 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.guided-tour-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.4s ease-out;
  box-shadow: 0 25px 50px rgba(102, 126, 234, 0.3);
  border: 2px solid rgba(102, 126, 234, 0.1);
  position: relative;
}

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

.tour-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 2.5rem;
  border-radius: 18px 18px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  color: white;
}

.tour-header h2 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.tour-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.tour-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.tour-body {
  padding: 2.5rem 2.5rem 2rem;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fd 100%);
}

.tour-step {
  display: none;
  animation: fadeInSlide 0.4s ease-out;
}

.tour-step.active {
  display: block;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tour-step-icon {
  font-size: 5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
}

.tour-step h3 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  text-align: center;
}

.tour-step p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a5568;
  margin: 0 0 1rem 0;
  text-align: center;
}

.tour-step p strong {
  color: var(--text);
}

.tour-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

@media (min-width: 480px) {
  .tour-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.tour-actions .btn-link {
  text-align: center;
  color: var(--text-secondary);
}

.tour-progress {
  padding: 1.5rem 2.5rem;
  background: linear-gradient(180deg, #f8f9fd 0%, #ffffff 100%);
  border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.tour-progress-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e0;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.progress-dot.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scale(1.3);
  border-color: white;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Tour Feature Boxes */
.tour-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 1.5rem;
}

.tour-feature-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  text-align: center;
  transition: all 0.3s ease;
}

.tour-feature-card:hover {
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-3px);
}

.tour-feature-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.tour-feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.5rem;
}

.tour-feature-desc {
  font-size: 0.9rem;
  color: #718096;
  margin: 0;
  line-height: 1.5;
}

/* Personalization Form in Tour */
.tour-personalization-input {
  background: rgba(102, 126, 234, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 2px solid rgba(102, 126, 234, 0.15);
}

.tour-personalization-input label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.tour-personalization-input input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.tour-personalization-input input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tour-personalization-input .input-help {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 0.5rem;
  font-style: italic;
}

.tour-privacy-badge {
  background: rgba(72, 187, 120, 0.1);
  border-left: 4px solid #48bb78;
  padding: 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.tour-privacy-badge strong {
  color: #2d3748;
  display: block;
  margin-bottom: 0.5rem;
}

.tour-privacy-badge ul {
  margin: 0.75rem 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.tour-privacy-badge li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.tour-privacy-badge li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #48bb78;
  font-weight: bold;
}

/* Mobile adjustments */
@media (max-width: 479px) {
  .guided-tour-overlay {
    padding: 0;
    align-items: flex-start;
  }
  
  .guided-tour-content {
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
    height: 100%;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  .tour-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0;
  }
  
  .tour-header h2 {
    font-size: var(--font-size-lg);
  }
  
  .tour-body {
    padding: var(--space-xl);
    overflow-y: visible;
    height: auto;
  }
  
  .tour-step-icon {
    font-size: 3rem;
  }
  
  .tour-step h3 {
    font-size: var(--font-size-lg);
  }
  
  .tour-step p {
    font-size: var(--font-size-sm);
  }
  
  .tour-features-grid {
    grid-template-columns: 1fr;
  }
  
  .tour-progress {
    position: sticky;
    bottom: 0;
    background: white;
    padding: var(--space-md);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    z-index: 100;
  }
}
