/*
  Troca de tema com a página aberta (js/core/tema.js): o tema novo se revela em círculo a partir do
  alternador clicado (--tema-x/--tema-y) ou, quando quem muda é o sistema, do canto superior direito
  Sem View Transitions, só as cores fazem a transição
*/
::view-transition-old(root) {
  animation: none;
}

::view-transition-new(root) {
  animation: ds5-revelar-tema .8s cubic-bezier(.7, 0, .3, 1) both;
}

@keyframes ds5-revelar-tema {
  from {
    clip-path: circle(0 at var(--tema-x, calc(100% - 48px)) var(--tema-y, 28px));
  }
  to {
    clip-path: circle(150vmax at var(--tema-x, calc(100% - 48px)) var(--tema-y, 28px));
  }
}

:root.ds5-tema-trocando,
:root.ds5-tema-trocando *,
:root.ds5-tema-trocando *::before,
:root.ds5-tema-trocando *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease, fill .45s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) {
    animation: none;
  }
}
