/* Inline reply progress: a quiet particle interlock in the chat's existing palette. */
.thinking-status {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: min(100%, 340px);
  max-width: 100%;
  min-height: 42px;
  padding: 3px 0;
  color: var(--text);
  background: none;
  border: 0;
  box-shadow: none;
  vertical-align: middle;
}

.thinking-status-orb {
  position: relative;
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-content: center;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  animation: thinking-orbit 8s linear infinite;
}

.thinking-status-orb::before,
.thinking-status-orb::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 5px;
  width: 20px;
  height: 12px;
  border: 1px solid var(--a1);
  border-radius: 50%;
  opacity: 0.2;
  pointer-events: none;
}

.thinking-status-orb::before {
  transform: rotate(45deg);
}
.thinking-status-orb::after {
  border-color: var(--a2);
  transform: rotate(-45deg);
}

.thinking-status-orb i {
  position: relative;
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--a1);
  opacity: 0.5;
  animation: thinking-particle 2s ease-in-out infinite;
}

.thinking-status-orb i:nth-child(2n) {
  background: var(--a2);
}
.thinking-status-orb i:nth-child(2),
.thinking-status-orb i:nth-child(4),
.thinking-status-orb i:nth-child(6),
.thinking-status-orb i:nth-child(8) {
  animation-delay: -0.45s;
}
.thinking-status-orb i:nth-child(1),
.thinking-status-orb i:nth-child(9) {
  animation-delay: -0.9s;
}
.thinking-status-orb i:nth-child(3),
.thinking-status-orb i:nth-child(7) {
  animation-delay: -1.35s;
}
.thinking-status-orb i:nth-child(5) {
  opacity: 1;
  animation-delay: -1.7s;
}

.thinking-status-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}

.thinking-status-label,
.thinking-status-detail {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thinking-status-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.thinking-status-detail {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

@keyframes thinking-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes thinking-particle {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.72);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-status-orb,
  .thinking-status-orb i {
    animation: none;
  }
  .thinking-status-orb i {
    opacity: 0.8;
  }
}
.thinking-status:is(
  [data-phase="image"],
  [data-phase="reviewing"],
  [data-phase="finishing"]
) {
  display: flex;
  flex-wrap: wrap;
  width: min(100%, 380px);
  gap: 6px 12px;
}
.thinking-status:is(
    [data-phase="image"],
    [data-phase="reviewing"],
    [data-phase="finishing"]
  )
  .thinking-status-orb {
  display: none;
}
.image-waiting {
  flex: 0 0 100%;
  width: 100%;
  order: 2;
  padding: 6px 0;
  overflow: hidden;
  pointer-events: none;
}
.image-waiting canvas {
  display: block;
  width: min(100%, 320px);
  margin: 0;
  background: transparent;
}
.thinking-status .task-clock {
  order: 3;
}
