/* 飞羽异步任务 · 工作状态气泡（Lite / Pro IM / 上下文 / 诊断共用） */
.apollo-work-status,
.message-bubble.assistant.is-work-status,
.pro-im-body.apollo-work-status,
.pro-ctx-msg-content.apollo-work-status,
.pro-detail-diagnosis-body.apollo-work-status {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.06);
}

.message-bubble.assistant.is-work-status.is-work-stack,
.apollo-work-stack-host {
  padding: 14px 16px 12px;
  background: linear-gradient(
    145deg,
    rgba(99, 102, 241, 0.14),
    rgba(6, 182, 212, 0.08)
  );
  border: 1px solid rgba(129, 140, 248, 0.35);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.08),
    0 12px 32px rgba(15, 23, 42, 0.22);
}

.apollo-work-stack-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.apollo-work-stack-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e0e7ff, #6366f1 55%, #312e81);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.65);
  animation: apollo-work-orb 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.apollo-work-stack-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #c7d2fe;
}

.apollo-work-stack-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apollo-work-stack-step {
  position: relative;
  padding-left: 22px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(165, 180, 252, 0.55);
  transition: color 0.25s ease, transform 0.25s ease;
}

.apollo-work-stack-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  background: transparent;
  box-sizing: border-box;
}

.apollo-work-stack-step.is-done {
  color: #86efac;
}

.apollo-work-stack-step.is-done::before {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.25);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35);
}

.apollo-work-stack-step.is-active {
  color: #e0e7ff;
  font-weight: 500;
}

.apollo-work-stack-step.is-active::before {
  border-color: #818cf8;
  background: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.55);
  animation: apollo-work-step-pulse 1.2s ease-in-out infinite;
}

.apollo-work-stack-step.is-stream::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: apollo-work-dot 1.1s ease-in-out infinite;
  box-shadow: 7px 0 0 currentColor, 14px 0 0 currentColor;
}

.apollo-work-status.is-work-breathing,
.message-bubble.assistant.is-work-status.is-work-breathing,
.pro-im-body.apollo-work-status.is-work-breathing,
.pro-ctx-msg-content.apollo-work-status.is-work-breathing,
.pro-detail-diagnosis-body.apollo-work-status.is-work-breathing {
  animation: apollo-work-breathe 2.4s ease-in-out infinite;
}

.apollo-work-status.is-work-enter,
.message-bubble.assistant.is-work-status.is-work-enter,
.pro-im-body.apollo-work-status.is-work-enter,
.pro-ctx-msg-content.apollo-work-status.is-work-enter,
.pro-detail-diagnosis-body.apollo-work-status.is-work-enter {
  animation: apollo-work-bubble-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.apollo-work-status.is-work-done,
.message-bubble.assistant.is-work-status.is-work-done,
.pro-im-body.apollo-work-status.is-work-done,
.pro-ctx-msg-content.apollo-work-status.is-work-done,
.pro-detail-diagnosis-body.apollo-work-status.is-work-done {
  color: #86efac;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  box-shadow: none;
  animation: none;
}

.apollo-work-status.is-work-breathing:not(.apollo-work-stack-host)::after,
.message-bubble.assistant.is-work-status.is-work-breathing:not(.is-work-stack)::after,
.pro-im-body.apollo-work-status.is-work-breathing::after,
.pro-ctx-msg-content.apollo-work-status.is-work-breathing::after,
.pro-detail-diagnosis-body.apollo-work-status.is-work-breathing::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: apollo-work-dot 1.1s ease-in-out infinite;
  box-shadow: 7px 0 0 currentColor, 14px 0 0 currentColor;
}

@keyframes apollo-work-orb {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes apollo-work-step-pulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.35);
  }
  50% {
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.75);
  }
}

@keyframes apollo-work-breathe {
  0%,
  100% {
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.08);
  }
  50% {
    border-color: rgba(129, 140, 248, 0.62);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  }
}

@keyframes apollo-work-bubble-in {
  from {
    opacity: 0.45;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes apollo-work-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
  }
  40% {
    opacity: 1;
  }
}
