/**
 * DiDi Taxi NL - 表单引导和空状态样式
 * 为价格查询表单提供引导和空状态提示
 */

/* 步骤指示器 */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  padding: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  transition: all 0.3s ease;
}

.step.active {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  font-weight: 600;
}

.step.completed {
  background: #10b981;
  color: white;
}

.step::before {
  content: attr(data-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.step.active::before {
  background: rgba(255, 255, 255, 0.3);
}

.step.completed::before {
  content: '✓';
  background: rgba(255, 255, 255, 0.3);
}

/* 空状态提示 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 20px;
  margin: 24px 0;
  animation: fadeInUp 0.5s ease-out;
}

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

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

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
}

.empty-state-tips {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  font-size: 13px;
  color: #475569;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empty-state-tip i {
  color: #3b82f6;
  font-size: 16px;
  flex-shrink: 0;
}

/* 表单验证状态 */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #10b981;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ef4444;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 验证提示消息 */
.valid-feedback,
.invalid-feedback {
  display: none;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

.valid-feedback {
  color: #10b981;
}

.invalid-feedback {
  color: #ef4444;
}

.form-control.is-valid ~ .valid-feedback,
.form-select.is-valid ~ .valid-feedback {
  display: block;
}

.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
  display: block;
}

/* 表单字段动画 */
.form-section {
  animation: fadeInUp 0.5s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

/* 价格结果区域 */
.price-results {
  display: none;
  animation: fadeInUp 0.5s ease-out;
}

.price-results.show {
  display: block;
}

/* 表单完成进度 */
.form-progress {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin: 24px 0;
  overflow: hidden;
}

.form-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
  width: 0%;
  transition: width 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .step-indicator {
    flex-wrap: wrap;
    gap: 8px;
  }

  .step {
    font-size: 12px;
    padding: 6px 12px;
  }

  .empty-state {
    padding: 32px 16px;
  }

  .empty-state-icon {
    font-size: 36px;
  }

  .empty-state-title {
    font-size: 16px;
  }

  .empty-state-description {
    font-size: 13px;
  }

  .empty-state-tips {
    max-width: 100%;
  }

  .empty-state-tip {
    font-size: 12px;
    padding: 10px 12px;
  }
}
