/* SITE-WEB-3D-AVATAR-INTEGRATION-01 — the sealed 3D runtime occupies the
   existing LOTBI character slot. The approved static image remains visible
   until WebGL and the official GLB are ready, and remains the fail-safe. */
.chat-character-wrap {
  position: relative;
  isolation: isolate;
}

.site-avatar-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.site-avatar-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chat-character-logo {
  position: relative;
  z-index: 0;
  transition: opacity 180ms ease;
}

.chat-character-wrap.avatar-3d-ready .site-avatar-stage {
  opacity: 1;
}

.chat-character-wrap.avatar-3d-ready .chat-character-logo {
  opacity: 0;
  visibility: hidden;
}

/* Reduced Motion keeps the same official character and state text, but swaps
   the processing loop for its static brand image. The single 3D runtime stays
   mounted so the rest of the chat lifecycle is unchanged. */
.chat-character-wrap.avatar-3d-ready.avatar-processing.avatar-reduced-motion .site-avatar-stage {
  opacity: 0;
}

.chat-character-wrap.avatar-3d-ready.avatar-processing.avatar-reduced-motion .chat-character-logo {
  opacity: 1;
  visibility: visible;
}

.chat-character-wrap.avatar-3d-fallback .site-avatar-stage {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-avatar-stage,
  .chat-character-logo {
    transition: none;
  }
}
