/* The same circular theme reveal on public pages and the patient portal. */
.portal-theme-spin { animation: portal-theme-spin .7s cubic-bezier(.22,1,.36,1); }
@keyframes portal-theme-spin {
  45% { transform: rotate(200deg) scale(.7); }
  100% { transform: rotate(360deg) scale(1); }
}
html.portal-theme-transition::view-transition-old(root),
html.portal-theme-transition::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.portal-theme-transition::view-transition-old(root) { z-index: 1; }
html.portal-theme-transition::view-transition-new(root) { z-index: 2; animation: portal-theme-reveal 800ms cubic-bezier(.22,1,.36,1) both; }
@keyframes portal-theme-reveal {
  from { clip-path: circle(0px 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)); }
}
html.portal-theme-transition *, html.portal-theme-transition *::before, html.portal-theme-transition *::after { transition: none !important; }
/* Color fading for browsers without View Transitions; no layout or form changes. */
html.theme-color-fade :is(body, header, main, aside, footer, .main-content, .page-content, .sidebar, .card, .auth-card, .modal-content) {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .portal-theme-spin { animation: none; }
  html.theme-color-fade :is(body, header, main, aside, footer, .main-content, .page-content, .sidebar, .card, .auth-card, .modal-content) { transition: none; }
}
