/* Shared page-to-page navigation polish for the studio and the admin console. */

/* Cross-document fade between "/" and "/admin" in browsers that support it. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 160ms; }

/* While a remembered session is being verified, show a quiet loader instead of
   the sign-in screen. If verification never finishes, reveal it after 8s. */
html[data-boot="resume"] #auth-screen,
html[data-boot="resume"] #admin-auth {
  visibility: hidden;
  animation: luotu-boot-reveal 0s linear 8s forwards;
}
html[data-boot="resume"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid rgba(124, 92, 255, 0.18);
  border-top-color: var(--accent, #7c5cff);
  animation: luotu-boot-spin 0.8s linear infinite, luotu-boot-hide 0s linear 8s forwards;
  z-index: 9999;
  pointer-events: none;
}
@keyframes luotu-boot-spin { to { transform: rotate(360deg); } }
@keyframes luotu-boot-reveal { to { visibility: visible; } }
@keyframes luotu-boot-hide { to { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}
