/*
 * Optional Jev status mascot. The page owns the markup and state transitions;
 * this file only styles the small, presentational status block.
 *
 * Expected markup:
 *   <div class="neural-jev-mascot" data-jev-state="idle">
 *     <img class="neural-jev-mascot__art" src="/assets/nca/agent-137.png" alt="">
 *     <div class="neural-jev-mascot__copy">...</div>
 *   </div>
 *
 * Set data-jev-state to loading only while the real typed Jev request is
 * pending. The complete/error cues are intentionally short and idle is still.
 */

.neural-jev-mascot {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 0;
}

.neural-jev-mascot__art {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .3));
  transform-origin: 50% 72%;
}

.neural-jev-mascot__copy {
  min-width: 0;
}

.neural-jev-mascot__label {
  margin: 0 0 4px;
  color: var(--neural-green, #c9ff38);
  font: 600 9px/1.4 var(--mono, ui-monospace, monospace);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.neural-jev-mascot__text {
  margin: 0;
  color: var(--neural-muted, #a5b2a8);
  font-size: 11px;
  line-height: 1.5;
}

/* No animation in idle: a ready selector should remain visually quiet. */
.neural-jev-mascot[data-jev-state="loading"] .neural-jev-mascot__art {
  animation: neural-jev-think 1.55s ease-in-out infinite;
}

.neural-jev-mascot[data-jev-state="complete"] .neural-jev-mascot__art {
  animation: neural-jev-complete .72s ease-out 1 both;
}

.neural-jev-mascot[data-jev-state="error"] .neural-jev-mascot__art {
  animation: neural-jev-error .8s ease-out 1 both;
}

.neural-jev-mascot[data-jev-state="error"] .neural-jev-mascot__label {
  color: var(--neural-orange, #ff8e8e);
}

@keyframes neural-jev-think {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.5deg); }
  28% { transform: translate3d(1px, -2px, 0) rotate(1.5deg); }
  55% { transform: translate3d(-1px, 1px, 0) rotate(-.8deg); }
  78% { transform: translate3d(1px, -1px, 0) rotate(.8deg); }
}

@keyframes neural-jev-complete {
  0% { transform: translate3d(0, 3px, 0) scale(.97); }
  55% { transform: translate3d(0, -2px, 0) scale(1.025); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes neural-jev-error {
  0%, 100% { transform: rotate(0); }
  28% { transform: rotate(-3deg) translateX(-1px); }
  62% { transform: rotate(3deg) translateX(1px); }
}

@media (prefers-reduced-motion: reduce) {
  .neural-jev-mascot__art {
    animation: none !important;
  }
}
