@use '../variables' as *;

/* 步骤进度加载遮罩组件 */
.step-progress-overlay {
  font-size: 0.14rem;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 半透明遮罩 */
.step-progress-overlay__mask {
  position: absolute;
  inset: 0;
  background: $overlay-bg;
}

/* 内容面板 */
.step-progress-overlay__panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.24rem 0.32rem;
  gap: 0.24rem;
  width: 4.80rem;
  background: linear-gradient(180deg, #EDF9FA 0%, #FFFFFF 20.63%);
  border: 1px solid #F0F0F0;
  box-shadow: 0 0 0.16rem rgba(0, 0, 0, 0.05);
  border-radius: 0.12rem;
}

/* 顶部标题行 */
.step-progress-overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.step-progress-overlay__titles {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.step-progress-overlay__title {
  font-weight: 620;
  font-size: 0.18rem;
  line-height: 0.24rem;
  color: $text-dark;
  margin: 0;
}

.step-progress-overlay__subtitle {
  font-weight: 330;
  font-size: 0.12rem;
  line-height: 0.16rem;
  color: $text-middle;
  margin: 0;
}

/* 关闭按钮 */
.step-progress-overlay__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.24rem;
  height: 0.24rem;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 0.04rem;
  transition: background 0.2s;

  &:hover {
    background: #F0F0F0;
  }
}

/* 进度面板（带边框的内框） */
.step-progress-overlay__progress-box {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.16rem;
  gap: 0.1rem;
  width: 100%;
  border: 1px solid #AEE6EA;
  border-radius: 0.08rem;
}

/* 进度条头部 */
.step-progress-overlay__progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.08rem;
}

.step-progress-overlay__progress-label {
  font-weight: 450;
  font-size: 0.14rem;
  line-height: 0.19rem;
  color: #616367;
}

.step-progress-overlay__progress-percent {
  font-weight: 450;
  font-size: 0.14rem;
  line-height: 0.19rem;
  color: $accent;
}

/* 进度轨道 */
.step-progress-overlay__progress-rail {
  width: 100%;
  height: 0.06rem;
  background: #EDF9FA;
  border-radius: 0.03rem;
  overflow: hidden;
  margin-bottom: 0.20rem;
}

.step-progress-overlay__progress-fill {
  height: 100%;
  background: $accent;
  border-radius: 0.03rem;
  transition: width 0.3s ease;
}

/* 步骤列表 */
.step-progress-overlay__steps {
  display: flex;
  flex-direction: column;
}

.step-progress-overlay__step-item {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.step-progress-overlay__step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 0.08rem;
  flex-shrink: 0;
}

/* 步骤圆点 — 通用 */
.step-progress-overlay__dot {
  width: 0.16rem;
  height: 0.16rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 完成状态：品牌色实心 + 对勾 */
.step-progress-overlay__dot--done {
  background: $accent;
}

/* 进行中：浅色光晕 + 呼吸内圆 */
.step-progress-overlay__dot--active {
  background: #EDF9FA;
}

.step-progress-overlay__dot-pulse {
  width: 0.08rem;
  height: 0.08rem;
  background: $accent;
  border-radius: 50%;
  animation: step-overlay-breathe 1.2s ease-in-out infinite;
}

@keyframes step-overlay-breathe {
  0%, 100% { transform: scale(0.7); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* 等待状态：浅色圆 */
.step-progress-overlay__dot--pending {
  background: #EDF9FA;
}

/* 连接线 */
.step-progress-overlay__connector {
  width: 0.02rem;
  height: 0.22rem;
  background: #EDF9FA;
  border-radius: 0.01rem;
}

/* 步骤文字 */
.step-progress-overlay__step-text {
  flex: 1;
  font-weight: 380;
  font-size: 0.12rem;
  line-height: 0.16rem;
  color: #18181A;
}

.step-progress-overlay__step-text--pending {
  font-weight: 330;
  color: #616367;
}

/* 步骤状态文字 */
.step-progress-overlay__step-state {
  font-size: 0.12rem;
  line-height: 0.16rem;
  flex-shrink: 0;
  margin-left: 0.10rem;
  text-align: right;
}

.step-progress-overlay__step-state--done {
  font-weight: 450;
  color: $accent;
}

.step-progress-overlay__step-state--active {
  font-weight: 450;
  color: $accent;
}

.step-progress-overlay__step-state--pending {
  font-weight: 330;
  color: #939599;
}
