/* loading-states.css — #A5 honest streaming load detail.
 *
 * The garage-door overlay already shows a real % (GLTFLoader byte progress).
 * This adds an honest ETA + a car-silhouette skeleton, revealed ONLY while a
 * load is actively "streaming" — i.e. it has outlasted ~400ms or runs on a
 * remote host (set as `.is-streaming` by setViewerLoading() in app.js). On a
 * fast localhost load the class never lands, so the door stays clean and these
 * never flash (PLAY §1: under ~300ms, show nothing).
 *
 * Kept in its own file so it commits cleanly — css/viewer.css carries
 * unrelated other-session WIP.
 */

/* Car-silhouette skeleton — hidden until streaming, then a gentle pulse. */
.garage-door__skeleton {
  display: none;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--c-active, #FFFFFF);
  opacity: 0;
}
.garage-door.is-streaming .garage-door__skeleton {
  display: block;
  animation: garageSkeletonPulse 1.6s ease-in-out infinite;
}
@keyframes garageSkeletonPulse {
  0%, 100% { opacity: 0.16; transform: translateY(0); }
  50%      { opacity: 0.44; transform: translateY(-2px); }
}

/* Honest ETA line under the percentage. */
.garage-door__eta {
  margin-top: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--c-text-3, rgba(255, 255, 255, 0.55));
  min-height: 12px;
}
.garage-door__eta[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .garage-door.is-streaming .garage-door__skeleton {
    animation: none;
    opacity: 0.3;
  }
}
