@keyframes cpStatusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(176, 122, 6, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(176, 122, 6, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(176, 122, 6, 0);
  }
}

@keyframes cpShimmer {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(220%);
  }
}

@keyframes cpDotBlink {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes cpLiveBorderPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(6, 164, 176, 0.4),
      inset 0 0 0 1px rgba(6, 164, 176, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(6, 164, 176, 0),
      inset 0 0 0 1px rgba(6, 164, 176, 0.75);
  }
}

@keyframes cpLiveDotPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(0.95);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }
}

/* История обменов: активные статусы pending/processing идут как _yelow */
.story__element_status._yelow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  animation: cpStatusPulse 1.9s ease-out infinite;
}

.story__element_status._yelow::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: cpDotBlink 1.3s ease-in-out infinite;
}

/* Карточка статусов заявки: анимируем только живые этапы */
.status .item.status-active-live {
  position: relative;
  overflow: hidden;
  padding-right: 28px;
  animation: cpLiveBorderPulse 1.6s ease-in-out infinite;
  isolation: isolate;
}

.status .item.status-active-live > * {
  position: relative;
  z-index: 2;
}

.status .item.status-active-live::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: cpLiveDotPulse 1.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

.status .item.status-active-live::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120%;
  width: 120%;
  background: linear-gradient(
    110deg,
    rgba(6, 164, 176, 0) 20%,
    rgba(6, 164, 176, 0.35) 50%,
    rgba(6, 164, 176, 0) 80%
  );
  animation: cpShimmer 1.8s linear infinite;
  will-change: transform;
  pointer-events: none;
  z-index: 1;
}

/* Блок курса на главной: числа в формуле должны быть одинаково контрастными */
.curs-excenge__top .exchange-rate-value {
  opacity: 1;
}

.detales__btn.exchange-expired-badge {
  background: #b01a06;
}

.detales__btn.exchange-cancelled-badge {
  background: #b01a06;
}

.detales__text.exchange-expired-text {
  opacity: 1;
  font-size: 16px;
  line-height: 1.45;
}

.detales__right ._btn.exchange-expired-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.detales__right ._btn.exchange-expired-actions .exchange-expired-action-btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 16px;
}

.detales__right ._btn.exchange-cancel-action-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.detales__right ._btn.exchange-cancel-action-wrap .exchange-cancel-action-btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 16px;
  border-color: #b01a06;
  background: #b01a06;
}

.detales__right ._btn.exchange-cancel-action-wrap .exchange-cancel-action-btn:hover {
  background: #8f1705;
}

.detales__right ._btn.exchange-cancel-action-wrap .exchange-cancel-action-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
