/* ===================================
   MODERN MaaS FORM STEPPER STYLES
   =================================== */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #0b264a;
  --primary-dark: #0f172a;
  --primary-light: #334155;
  --secondary-color: #3b82f6;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #0b264a;
  --neutral-900: #0f172a;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--neutral-50);
}

/* Main container */
.stepper-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #0b264a 50%, #334155 100%);
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.stepper-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.stepper-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Section */
.stepper-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 3rem 2rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stepper-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.header-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-icon svg {
  color: white;
}

.header-text {
  text-align: left;
}

.stepper-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stepper-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
}

/* Progress Section */
.progress-section {
  background: linear-gradient(180deg, var(--primary-color) 0%, transparent 100%);
  padding: 0 2rem 2rem;
  position: relative;
}

.progress-bar-container {
  background: rgba(255, 255, 255, 0.3);
  height: 6px;
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.progress-bar-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 16.66%;
  position: relative;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Steps Indicator */
.steps-indicator {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 1rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.step-item::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  z-index: -1;
  transform: translateX(-50%);
}

.step-item:last-child::before {
  display: none;
}

.step-item.completed::before {
  background: var(--success-color);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  border: 3px solid transparent;
  position: relative;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.step-icon {
  transition: var(--transition);
}

.step-check {
  position: absolute;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.step-item.active .step-number {
  background: white;
  color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 8px 25px rgba(59, 130, 246, 0.3);
  border-color: white;
}

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

.step-item.completed .step-icon {
  opacity: 0;
  transform: scale(0);
}

.step-item.completed .step-check {
  opacity: 1;
  transform: scale(1);
}

.step-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 100px;
  transition: var(--transition);
  font-weight: 500;
  line-height: 1.3;
}

.step-item.active .step-title {
  color: white;
  font-weight: 600;
}

.step-item.completed .step-title {
  color: rgba(255, 255, 255, 0.9);
}

/* Form Main Section */
.form-main {
  background: white;
  padding: 3rem 2rem;
  min-height: 500px;
}

.step-content {
  position: relative;
}

.step-panel {
  display: none;
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Form Styles */
.form-section {
  background: var(--neutral-50);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--neutral-200);
  transition: var(--transition);
}

.form-section:hover {
  box-shadow: var(--shadow);
  border-color: var(--neutral-300);
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

.form-control,
.form-select {
  border: 2px solid var(--neutral-200);
  border-radius: var(--border-radius);
  padding: 0.875rem 1rem;
  transition: var(--transition);
  font-size: 1rem;
  width: 100%;
  background: white;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:hover,
.form-select:hover {
  border-color: var(--neutral-300);
}

/* Process Tags */
.process-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.process-tag {
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: 25px;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.process-tag:hover {
  background: var(--neutral-50);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.process-tag.selected {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Navigation Footer */
.navigation-footer {
  background: linear-gradient(135deg, var(--neutral-50) 0%, white 100%);
  border-top: 1px solid var(--neutral-200);
  padding: 2rem;
  margin-top: 2rem;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-nav:hover::before {
  left: 100%;
}

.btn-prev {
  background: #374151;
  color: white;
}

.btn-prev:hover {
  background: #1f2937;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-next {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: white;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-submit {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.step-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--neutral-600);
  background: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--neutral-200);
}

.step-current {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.step-separator {
  color: var(--neutral-400);
}

.step-total {
  color: var(--neutral-500);
}

/* Summary Styles */
.step-summary {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid var(--success-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
}

.summary-title {
  font-weight: 600;
  color: #047857;
  margin-bottom: 0.5rem;
}

.summary-content {
  color: var(--neutral-700);
  font-size: 0.95rem;
}

/* Utility Classes */
.required-indicator {
  color: var(--error-color);
  margin-left: 0.25rem;
  font-weight: 700;
}

.help-text {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-top: 0.5rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--secondary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}

.btn-link:hover {
  color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .stepper-container {
    padding: 1rem 0.5rem;
  }

  .stepper-wrapper {
    border-radius: var(--border-radius-lg);
  }

  .stepper-header {
    padding: 2rem 1rem;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .header-text {
    text-align: center;
  }

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

  .stepper-subtitle {
    font-size: 1rem;
  }

  .progress-section {
    padding: 0 1rem 1.5rem;
  }

  .steps-indicator {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .step-item {
    flex: 0 0 calc(33.333% - 0.67rem);
  }

  .step-item::before {
    display: none;
  }

  .step-number {
    width: 40px;
    height: 40px;
  }

  .step-title {
    font-size: 0.75rem;
    max-width: 80px;
  }

  .form-main {
    padding: 2rem 1rem;
  }

  .form-section {
    padding: 1.5rem;
  }

  .navigation-footer {
    padding: 1.5rem 1rem;
  }

  .navigation-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-nav {
    width: 100%;
    justify-content: center;
  }

  .step-info {
    order: -1;
  }
}

@media (max-width: 480px) {
  .stepper-title {
    font-size: 1.25rem;
  }

  .stepper-subtitle {
    font-size: 0.9rem;
  }

  .step-item {
    flex: 0 0 calc(50% - 0.5rem);
  }

  .form-section {
    padding: 1rem;
  }

  .process-tags {
    gap: 0.5rem;
  }

  .process-tag {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Animation utilities */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Focus styles for accessibility */
.btn-nav:focus,
.form-control:focus,
.form-select:focus,
.process-tag:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .stepper-wrapper {
    border: 2px solid var(--neutral-900);
  }

  .btn-nav {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Button Styles - Fix visibility issues */
.btn-primary-fill {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

a.btn-primary-fill:hover,
.btn-primary-fill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color) !important;
    text-decoration: none;
    background: white !important;
    border: none !important;
}

.btn-primary-fill:focus {
    color: white !important;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    padding: 10px 26px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-outline:focus {
    color: var(--primary-color) !important;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Stats Section - Override to match platform theme colors */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0C274E, #4395DA) !important;
    color: white !important;
}

.stats-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stats-section .stat-item {
    padding: 2rem;
}

.stats-section .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #d2e225 !important;
    margin-bottom: 0.5rem;
}

.stats-section .stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .stats-section .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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