
/* Reveal the video once it has a frame to show; never use the uploaded selfie as
   a preview. The server-stored preview frame is the only preview, and it paints
   from the start so the box is never empty while the video downloads. */
.result-video {
  position: relative;
  max-height: 65vh;
  width: 100%;
  background: var(--main-bg, #101c30);
  color: var(--body-text, #fff8e8);
}
.result-video > video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  aspect-ratio: auto;
  max-height: none;
  visibility: hidden;
}
.result-video.is-ready > video { visibility: visible; }
/* The preview stays up through a load error, so a failed video is a still frame
   with a message rather than an empty box. */
.result-video.has-preview > video { visibility: visible; }
.result-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(255, 217, 120, 0.12), transparent 75%);
}
/* Over a preview, swap the decorative wash for a light scrim: the status text has
   to stay readable against an arbitrary frame, and the frame has to stay visible. */
.result-video.has-preview .result-video-placeholder {
  background: linear-gradient(to bottom, rgba(16, 28, 48, 0.45), rgba(16, 28, 48, 0.2));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.result-video-placeholder p { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .result-video-placeholder .spinner-border { animation: none; }
}
