/* Reveal the complete new theme from the control, with the old page underneath. */
html.theme-revealing::view-transition,
html.theme-revealing::view-transition-group(*),
html.theme-revealing::view-transition-image-pair(*),
html.theme-revealing::view-transition-old(*),
html.theme-revealing::view-transition-new(*) {
  pointer-events: none !important;
}

html.theme-revealing,
html.theme-revealing *,
html.theme-revealing *::before,
html.theme-revealing *::after {
  transition: none !important;
}

html.theme-revealing::view-transition-group(root) {
  animation: none;
}

html.theme-revealing::view-transition-image-pair(root) {
  isolation: isolate;
}

html.theme-revealing::view-transition-old(root),
html.theme-revealing::view-transition-new(root) {
  mix-blend-mode: normal;
}

html.theme-revealing::view-transition-old(root) {
  animation: none;
  z-index: 1;
}

html.theme-revealing::view-transition-new(root) {
  z-index: 2;
  animation: theme-reveal-circle 450ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes theme-reveal-circle {
  from { clip-path: circle(0 at var(--theme-reveal-x) var(--theme-reveal-y)); }
  to { clip-path: circle(var(--theme-reveal-radius) at var(--theme-reveal-x) var(--theme-reveal-y)); }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-revealing::view-transition-new(root) { animation: none; }
}
