/* AFNAAN STORE — fast premium palette blending (no extra animation).
   The old rendered frame fades directly into the ready new palette, preventing
   gradients/background images from abruptly jumping dark to light. */
html[data-af-appearance="store"][data-af-ux="luma"] { background-color:#e6f5fb; }
html[data-af-appearance="store"][data-af-ux="nova"] { background-color:#05050f; }

/* The new frame is always fully opaque underneath the outgoing frame.
   Avoid simultaneous fades which can expose a blank white/black canvas. */
::view-transition-group(root) { animation-duration:235ms; }
::view-transition-new(root) { animation:none; mix-blend-mode:normal; }
::view-transition-old(root) {
  mix-blend-mode:normal;
  animation:af-palette-crossfade 235ms cubic-bezier(.22,.68,.25,1) both;
}
@keyframes af-palette-crossfade { from { opacity:1; } to { opacity:0; } }

/* Graceful fallback for browsers without native view transitions. Scoped only
   to the 240ms after a user selects a theme; never add sitewide transitions. */
html.af-theme-shift.af-theme-fallback, html.af-theme-shift.af-theme-fallback body,
html.af-theme-shift.af-theme-fallback :is(#userMenu,.glass-card,.top-header,.bottom-nav,.sidebar,.nav-bottom,.nav-item,.af-choice,.btn-primary,.af-login-appearance,input,textarea,select,.modal,.card,.product-card,.pkg-card) {
  transition:background-color 230ms ease,color 230ms ease,border-color 230ms ease,box-shadow 230ms ease!important;
}

@supports not (view-transition-name: root) {
  html.af-theme-shift,
  html.af-theme-shift body,
  html.af-theme-shift :is(#userMenu,.glass-card,.top-header,.bottom-nav,.sidebar,
    .nav-bottom,.nav-item,.af-choice,.btn-primary,.af-login-appearance,
    input,textarea,select,.modal,.card,.product-card,.pkg-card) {
    transition:background-color 230ms ease,color 230ms ease,
      border-color 230ms ease,box-shadow 230ms ease!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  /* Only a short palette dissolve, never a wipe, zoom or page movement. */
  ::view-transition-old(root) { animation-duration:180ms; }
}
