/* Small, quick movements that make the interface feel responsive: the page fades in, menus pop open, buttons press down,
   table rows light up. Everything is off for people who ask their system for reduced motion. */
@keyframes ez-page-in {
  from { opacity: 0; }
}

@keyframes ez-pop-in {
  from { opacity: 0; transform: translateY(-0.25rem) scale(0.97); }
}

/* Page changes: the browser keeps the sidebar and top bar still and cross-fades only the page content (View Transitions;
   browsers without support just load the page, with the fade below). */
@view-transition {
  navigation: auto;
}

.ez_sidebar { view-transition-name: sidebar; }
.ez_topbar { view-transition-name: topbar; }
.ez_app-main { view-transition-name: content; }

::view-transition-group(*) { animation-duration: 160ms; }

::view-transition-old(content) { animation: ez-vt-out 90ms ease-in both; }
::view-transition-new(content) { animation: ez-vt-in 180ms ease-out both; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 120ms; }

@keyframes ez-vt-out {
  to { opacity: 0; }
}

@keyframes ez-vt-in {
  from { opacity: 0; transform: translateY(0.375rem); }
}

.ez_guest-shell main {
  animation: ez-page-in 240ms ease-out;
}

details[open] > .ez_menu {
  transform-origin: top right;
  animation: ez-pop-in 140ms ease-out;
}

.ez_button:active {
  transform: scale(0.97);
}

.ez_button {
  transition: filter var(--ez-duration-fast), box-shadow var(--ez-duration-fast), background var(--ez-duration-fast), transform 90ms ease-out;
}

.ez_table tbody tr {
  transition: background var(--ez-duration-fast);
}

@media (prefers-reduced-motion: reduce) {
  .ez_guest-shell main,
  details[open] > .ez_menu {
    animation: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none;
  }

  .ez_button:active {
    transform: none;
  }
}
