/* 
 * Form Stepper CSS for Innolab Enrolment Form
 * 步骤导航样式优化
 */

/* 步骤进度条容器 */
.form-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
  padding: 0 30px; /* 增加左右填充，给步骤条更多呼吸空间 */
  max-width: 90%; /* 控制最大宽度，避免在超宽屏幕上过度拉伸 */
  margin-left: auto;
  margin-right: auto;
}

/* 水平连接线 */
.form-stepper::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 30px; /* 调整起始位置 */
  right: 30px; /* 调整结束位置 */
  height: 3px;
  background-color: var(--gray-20, #e0e0e0);
  border-radius: 3px;
  z-index: 1;
}

/* 已完成步骤的连接线 */
.form-stepper::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 30px;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, rgba(42, 157, 143, 0.7) 0%, var(--primary-green, #2a9d8f) 100%);
  border-radius: 3px;
  z-index: 1;
  transition: width 0.4s ease;
}

/* 根据完成步骤数设置进度条宽度 */
.form-stepper[data-completed="1"]::after {
  width: 25%;
}

.form-stepper[data-completed="2"]::after {
  width: 50%;
}

.form-stepper[data-completed="3"]::after {
  width: 75%;
}

.form-stepper[data-completed="4"]::after {
  width: 100%;
}

/* 单个步骤项 */
.step-item {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 步骤圆圈 */
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--gray-40, #999999);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: 600;
  color: var(--gray-60, #666666);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 步骤标题 */
.step-title {
  font-size: 14px;
  color: var(--gray-60, #666666);
  margin-top: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* 可点击步骤的悬停效果 */
.step-item:not(.step-disabled):hover .step-circle {
  transform: translateY(-2px);
  border-color: var(--primary-green, #2a9d8f);
  box-shadow: 0 5px 10px rgba(42, 157, 143, 0.2);
}

.step-item:not(.step-disabled):hover .step-title {
  color: var(--primary-green, #2a9d8f);
}

/* 当前步骤 */
.step-active .step-circle {
  background-color: var(--primary-green, #2a9d8f);
  border-color: var(--primary-green, #2a9d8f);
  color: white;
  box-shadow: 0 4px 10px rgba(42, 157, 143, 0.3);
  transform: scale(1.05);
}

.step-active .step-title {
  color: var(--primary-green, #2a9d8f);
  font-weight: 600;
}

/* 已完成步骤 - 新设计 */
.step-completed .step-circle {
  background-color: var(--primary-green, #2a9d8f);
  border-color: var(--primary-green, #2a9d8f);
  color: white;
  box-shadow: 0 3px 8px rgba(42, 157, 143, 0.25);
}

.step-completed .step-title {
  color: var(--primary-green, #2a9d8f);
  font-weight: 500;
}

/* 已完成步骤 - 小勾号标识在右上角 */
.step-completed .step-circle::after {
  content: "✓";
  font-size: 10px;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: var(--primary-green, #2a9d8f);
  border-radius: 50%;
  border: 1px solid var(--primary-green, #2a9d8f);
  z-index: 4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* 禁用的步骤 */
.step-disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.step-disabled .step-circle {
  background-color: var(--gray-10, #f5f5f5);
  border-color: var(--gray-30, #cccccc);
  box-shadow: none;
}

/* 申请类型指示器 */
.form-type-indicator {
  position: absolute;
  top: -30px;
  right: 10px;
  background-color: var(--primary-green, #2a9d8f);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  z-index: 3;
  display: none; /* 隐藏用户身份标记 */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.form-type-indicator::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--primary-green, #2a9d8f);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .form-stepper {
    padding: 0 15px; /* 减少填充 */
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  .form-stepper::before,
  .form-stepper::after {
    left: 20px; /* 调整连接线 */
    right: 20px;
  }
  
  .step-item {
    flex: 0 0 calc(33.33% - 15px);
    margin-bottom: 15px;
  }
}

@media (max-width: 576px) {
  .form-stepper {
    padding: 0 10px;
  }
  
  .form-stepper::before,
  .form-stepper::after {
    left: 15px;
    right: 15px;
  }
  
  .step-item {
    flex: 0 0 calc(50% - 15px);
  }
  
  .step-title {
    font-size: 12px;
  }
  
  .step-completed .step-circle::after {
    width: 14px;
    height: 14px;
    font-size: 9px;
    top: -4px;
    right: -4px;
  }
}

@media (max-width: 480px) {
  .step-item {
    flex: 0 0 calc(50% - 10px);
  }
  
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .step-completed .step-circle::after {
    width: 12px;
    height: 12px;
    font-size: 8px;
    top: -3px;
    right: -3px;
  }
  
  .form-type-indicator {
    font-size: 12px;
    padding: 4px 8px;
    top: -25px;
  }
} 