/* 每步卡片：底层为底色，叠一层左→右进度（见 exec-step-card__progress） */
.exec-step-card {
  position: relative;
  overflow: hidden;
}

.exec-step-card__body {
  position: relative;
  z-index: 1;
}

.exec-step-card__progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 0;
  pointer-events: none;
  border-radius: inherit;
  /* 仅随轮询前进时过渡；done↔running 由 React key 拆节点，避免 100%→0% 回退动画 */
  transition: width 0.35s ease-out;
}

.exec-step-card__progress--run {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.32) 0%,
    rgba(34, 211, 238, 0.12) 100%
  );
}

.exec-step-card__progress--done {
  background: linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.22) 0%,
    rgba(34, 197, 94, 0.10) 100%
  );
}

.exec-step-card__progress--indeterminate {
  width: 38% !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.28) 50%,
    transparent 100%
  );
  animation: ntq-exec-step-progress-slide 1.2s ease-in-out infinite;
}

@keyframes ntq-exec-step-progress-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .exec-step-card__progress--indeterminate {
    animation: none;
    opacity: 0.85;
    transform: translateX(0);
  }
}

.exec-step-card.is-pending {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.ntq-exec-step-grid {
  display: grid;
  grid-template-columns: minmax(148px, 220px) minmax(0, 1fr) minmax(148px, 176px);
  column-gap: 14px;
  row-gap: 8px;
  align-items: center;
}

.ntq-exec-step-lead {
  min-width: 0;
}

.ntq-exec-step-lead-main {
  min-width: 0;
  flex: 1;

  /* 与标题旁 help 图标拉开，避免与可点击运行钮贴在一起 */
  .ntq-rainbow-run-btn {
    margin-left: 12px;
  }
}

.ntq-exec-step-no {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--ntq-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ntq-text);
  background: transparent;
}

.ntq-exec-compare-divider {
  display: inline-block;
  align-self: stretch;
  flex-shrink: 0;
  width: 1px;
  min-height: 1.125rem;
  margin: 0 2px;
  background: var(--ntq-white-12);
}

/* 有对比列时运行中即占位，避免 done 后 Select 撑高行高导致闪动 */
.exec-step-card--has-compare {
  .ntq-exec-compare-slot {
    min-height: 40px;
  }
}

.ntq-exec-compare {
  padding-right: 4px;
}

.ntq-exec-compare__placeholder {
  flex-shrink: 0;
  width: 168px;
  max-width: 100%;
  height: 40px;
}

.ntq-exec-compare__select {
  min-width: 168px;
}
