/* Motion for every page (signed-in and public): page-to-page cross-fade and blocks that rise in one
   after another (frontend/static/js/motion.js). Loaded on every page by backend/core/page_response.py. */
.ui-in { animation: ui-in .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--in-i, 0) * 45ms); }
@keyframes ui-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* Page to page: the old page fades, the new one rises in; the header and tab bar stay put. */
@view-transition { navigation: auto; }
header.ui-top { view-transition-name: ui-top; }
.ui-tabbar { view-transition-name: ui-tabbar; }
.public-header { view-transition-name: public-top; }
::view-transition-group(public-top) { animation: none; }
::view-transition-group(ui-top), ::view-transition-group(ui-tabbar) { animation: none; }
::view-transition-old(root) { animation: ui-vt-out .16s ease-in both; }
::view-transition-new(root) { animation: ui-vt-in .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ui-vt-out { to { opacity: 0; } }
@keyframes ui-vt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Small touches: links and buttons in the shell press in, cards lift a little on hover. */
.ui-nav a, .ui-tabbar a, .ui-tabbar button { transition: background-color .18s, color .18s; }
.ui-tabbar a:active, .ui-tabbar button:active { transform: scale(.94) !important; }
@media (prefers-reduced-motion: reduce) {
  .ui-in { animation: none; }
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}