/* =============================================
   PROGRESS STEPS - Barra vertical animada
   ============================================= */

@property --p {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* ---------- Container ---------- */
.progress-steps {
  flex-shrink: 0;
}

.progress-steps__container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  opacity: 1;
  transform: translateY(0);
}

.progress-steps__container.is-entering {
  animation: psEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.progress-steps__container.is-exiting {
  animation: psExit 0.45s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes psEnter {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes psExit {
  from { opacity: 1; transform: translateY(0) scale(1);    filter: blur(0); }
  to   { opacity: 0; transform: translateY(-14px) scale(0.98); filter: blur(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-steps__container.is-entering,
  .progress-steps__container.is-exiting {
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Vertical Track ---------- */
.progress-steps__track {
  position: relative;
  width: 14px;
  flex: 0 0 14px;
  margin-right: 14px;
  align-self: stretch;
  min-height: 100%;
}

.progress-steps__track-bg {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 5px;
  background: var(--surface-light-active);
  border-radius: 3px;
  z-index: 0;
}

.progress-steps__track-fill {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 5px;
  height: 0%;
  background: linear-gradient(180deg, #D3111A 0%, #5F080C 100%);
  border-radius: 3px;
  z-index: 1;
  box-shadow: 0 0 12px rgba(211, 17, 26, 0.35);
}

/* ---------- List ---------- */
.progress-steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.progress-steps__item {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.progress-steps__item:last-child {
  margin-bottom: 0;
}

/* ---------- Number Circle ---------- */
.progress-steps__number {
  --p: 0;
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  margin-right: 16px;
  border: 2px solid var(--surface-normal);
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-light-active);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.progress-steps__number-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(var(--p) * 100%);
  z-index: 0;
  transform-origin: top center;
  background: linear-gradient(180deg, #D3111A 0%, #5F080C 100%);
}

.progress-steps__number-digit {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  transform: rotate(calc(var(--p) * 1turn));
  color: color-mix(in srgb, #ffffff calc(var(--p) * 85%), var(--surface-darker));
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}

/* ---------- Label ---------- */
.progress-steps__label {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--surface-darker);
  line-height: 1.35;
  transition: color 0.25s ease;
}

/* ---------- States ---------- */
.progress-steps__item.active .progress-steps__number {
  border-color: #D3111A;
  animation: psFillSpin 0.75s linear forwards;
  box-shadow: 0 2px 10px rgba(211, 17, 26, 0.35);
}

@keyframes psFillSpin {
  from { --p: 0; }
  to   { --p: 1; }
}

.progress-steps__item.completed .progress-steps__number {
  --p: 1;
  animation: none;
  border-color: #D3111A;
  box-shadow: 0 1px 6px rgba(211, 17, 26, 0.25);
}

.progress-steps__item.completed .progress-steps__number-digit {
  transform: rotate(0deg);
  color: #fff;
}

.progress-steps__item.completed .progress-steps__label,
.progress-steps__item.active .progress-steps__label {
  color: var(--primary-darker);
}

/* ---------- Responsive ---------- */
@media (max-width: 834px) {
  .progress-steps__track {
    margin-right: 10px;
  }

  .progress-steps__number {
    width: 32px;
    height: 32px;
    margin-right: 12px;
  }

  .progress-steps__number-digit {
    font-size: 0.875rem;
  }

  .progress-steps__label {
    font-size: 0.875rem;
  }

  .progress-steps__item {
    margin-bottom: 18px;
  }
}

@media (max-width: 576px) {
  .progress-steps__number {
    width: 28px;
    height: 28px;
    margin-right: 10px;
  }

  .progress-steps__number-digit {
    font-size: 0.8rem;
  }

  .progress-steps__label {
    font-size: 0.8rem;
  }

  .progress-steps__item {
    margin-bottom: 14px;
  }
}
