.canvas-output-state {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 7px;
  background: rgba(17,21,29,0.94);
  box-shadow: 0 18px 42px rgba(0,0,0,0.34);
  color: rgba(255,255,255,0.72);
}

.canvas-output-state .canvas-strands-wait {
  width: 100%;
  gap: 3px;
}

.canvas-output-state.is-failed {
  border-color: rgba(248,113,113,0.26);
  color: #fecaca;
}

.canvas-output-state.is-failed span {
  font-size: 13px;
  font-weight: 800;
}

.canvas-output-state.is-failed em {
  max-width: 80%;
  color: rgba(254,202,202,0.62);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.canvas-output-result-grid > .is-result-entering,
.canvas-output-body.is-content-entering {
  animation: canvasOutputResultEnter 0.28s ease both;
}

.canvas-strands-wait {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: rgba(224,242,254,0.78);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.canvas-output-wait .canvas-strands-wait,
.canvas-asset-task-placeholder .canvas-strands-wait {
  width: 100%;
}

.canvas-strands-wait.is-node-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  gap: 0;
}

.canvas-strands-wait.is-node-fill .canvas-strands-label {
  position: absolute;
  left: 50%;
  top: 72%;
  z-index: 2;
  transform: translate(-50%, -50%);
}

/* Waiting animation: three pulsing bars, same approach as the create page's
   .task-wait-pulse — compositor-friendly CSS instead of a per-node WebGL canvas. */
.canvas-strands-pulse {
  height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.canvas-strands-pulse i {
  width: 5px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(224,242,254,0.92), rgba(56,189,248,0.5));
  animation: canvasStrandsPulse 1.1s ease-in-out infinite;
}

.canvas-strands-pulse i:nth-child(2) { animation-delay: 120ms; }
.canvas-strands-pulse i:nth-child(3) { animation-delay: 240ms; }

.canvas-task-timer {
  display: block;
  min-width: 5ch;
  color: rgba(224,242,254,0.55);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.canvas-strands-label {
  position: relative;
  z-index: 1;
  max-width: min(92%, 280px);
  color: rgba(224,242,254,0.75);
  text-shadow: 0 0 18px rgba(56,189,248,0.28);
}

.canvas-strands-wait.is-compact {
  width: 100%;
  gap: 4px;
  font-size: clamp(8px, 0.9vw, 11px);
}

.canvas-strands-wait.is-compact .canvas-strands-pulse i {
  width: 4px;
  height: 11px;
}

.canvas-strands-wait.is-compact .canvas-strands-label {
  max-width: 100%;
}

@keyframes canvasOutputEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes canvasOutputResultEnter {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes canvasOutputSlotPulse {
  0% {
    background-position: 180% 0;
  }
  100% {
    background-position: -80% 0;
  }
}

@keyframes canvasStrandsPulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.48; }
  50% { transform: scaleY(1); opacity: 1; }
}
