/* ============================================================================
   anim.css — keyframes transcribed from research/css/_keyframes.css (spec §13)
   and the streaming module research/css/shared-3-CL45MlPx.css (spec §12.2)
   ========================================================================= */

/* ---------- streaming text (verbatim behaviour of _fadeInText_yu34g_1) --- */
@keyframes fadeInText { 0% { opacity: 0 } 100% { opacity: 1 } }

.chunkWrapper { display: contents }
.chunkWrapper > * { min-width: 0 }
.animating, .wordAnimating { opacity: 1 }

@media (prefers-reduced-motion: no-preference) {
  .animating     { animation: .4s linear both fadeInText }
  .wordAnimating { animation: .1s linear both fadeInText }
}
[data-reduce-motion="true"] .animating,
[data-reduce-motion="true"] .wordAnimating { animation: none }

/* ---------- shell / mount animations ------------------------------------- */
@keyframes greeting-fade-in { 0% { opacity: 0 } }
@keyframes ph-fade-in       { 0% { opacity: 0 } }
@keyframes cds-reveal-in    { 0% { opacity: 0; transform: translateY(4px) } 100% { opacity: 1; transform: none } }
@keyframes cds-um-enter     { 0% { opacity: 0; transform: scale(.92) translateY(6px) } 100% { opacity: 1; transform: none } }
@keyframes alert-band-rise  { 0% { transform: translateY(100%) } 100% { transform: translateY(0) } }
@keyframes fade             { 0% { opacity: 0 } 100% { opacity: 1 } }
@keyframes zoom             { 0% { transform: scale(.95) } 100% { transform: scale(1) } }
@keyframes login-hero-in    { 0% { opacity: 0; transform: translateY(20px) } }

/* ---------- loading / progress ------------------------------------------- */
@keyframes cds-dot-pulse {
  0%, 5%   { background: var(--cds-alpha-3); animation-timing-function: cubic-bezier(.165,.84,.44,1) }
  15%, 25% { background: var(--cds-alpha-7); animation-timing-function: cubic-bezier(.165,.84,.44,1) }
  65%, 100%{ background: var(--cds-alpha-3) }
}
@keyframes shimmer          { 0% { transform: translateX(-100%) } 60%, 100% { transform: translateX(100%) } }
@keyframes cds-shimmer      { 0% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }
@keyframes shimmertext      { 0% { background-position: 100% 0 } 65%, 100% { background-position: 0 0 } }
@keyframes cds-shimmer-text-shine { 0% { background-position: 150% 0 } 100% { background-position: -50% 0 } }
@keyframes compactShimmer   { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
@keyframes pulse            { 50% { opacity: .5 } }
@keyframes pulse-dot        { 0%, 100% { transform: scale(.75) } 50% { transform: scale(1) } }
@keyframes blink            { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }
@keyframes spin             { 100% { transform: rotate(360deg) } }
@keyframes ping             { 75%, 100% { opacity: 0; transform: scale(2) } }
@keyframes loading-background {
  0%, 100% { background-position: 0 0 }
  25%      { background-position: 100% 0 }
  50%      { background-position: 100% 100% }
  75%      { background-position: 0 100% }
}
@keyframes codeSpinnerSpin {
  0%  { transform: translateY(0) }   10% { transform: translateY(-2em) }
  30% { transform: translateY(-4em) } 50% { transform: translateY(-8em) }
  70% { transform: translateY(-4em) } 90% { transform: translateY(0) }
}

/* ---------- disclosure / grids ------------------------------------------- */
@keyframes accordion-open  { 0% { opacity: 0; height: 0 } 100% { height: var(--accordion-h); opacity: 1 } }
@keyframes accordion-close { 0% { height: var(--accordion-h); opacity: 1 } 100% { opacity: 0; height: 0 } }
@keyframes task-grid-fade-in     { 0% { opacity: 0 } 100% { opacity: 1 } }
@keyframes task-grid-clip-reveal { 0% { clip-path: circle(0%) } 100% { clip-path: circle(150%) } }
@keyframes saved-check-decay     { 100% { opacity: 0 } }
@keyframes ant-tools-push { 0% { opacity: 0; transform: translateX(8px) }  100% { opacity: 1; transform: none } }
@keyframes ant-tools-pop  { 0% { opacity: 1; transform: none } 100% { opacity: 0; transform: translateX(-8px) } }

/* ---------- agent / cowork surface --------------------------------------- */
@keyframes epitaxy-thinking-shimmer {
  0%, 100% { color: hsl(var(--text-400)) }
  50%      { color: color-mix(in srgb, hsl(var(--text-400)) 75%, hsl(var(--bg-100))) }
}
@keyframes epitaxy-verb-dot-2 { 0%, 33.3% { opacity: 0 } 33.4%, 100% { opacity: 1 } }
@keyframes epitaxy-verb-dot-3 { 0%, 66.6% { opacity: 0 } 66.7%, 100% { opacity: 1 } }
@keyframes cowork-hero-glow-pulse { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }

/* ---------- utility bindings --------------------------------------------- */
.anim-reveal-in   { animation: cds-reveal-in 200ms var(--cds-ease-out) both }
.anim-um-enter    { animation: cds-um-enter 260ms var(--cds-ease-out) both }
.anim-band-rise   { animation: alert-band-rise 400ms var(--cds-ease-out) both }
.anim-greeting    { animation: greeting-fade-in 600ms ease-out both }
.anim-spin        { animation: spin 1s linear infinite }

/* running tool label: gradient-clipped text swept by `shimmertext` */
.shimmer-text {
  background: linear-gradient(90deg,
      hsl(var(--text-500)) 0%, hsl(var(--text-500)) 35%,
      hsl(var(--text-100)) 50%,
      hsl(var(--text-500)) 65%, hsl(var(--text-500)) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmertext 2.25s infinite;
}
.shimmer-text.paused { animation-play-state: paused }

@media (prefers-reduced-motion: reduce) {
  .anim-reveal-in, .anim-um-enter, .anim-band-rise, .anim-greeting { animation: none }
  .shimmer-text { animation: none; color: hsl(var(--text-500)); background: none; -webkit-text-fill-color: currentColor }
}
