/* Localsewa v32.8.66 — Motion + Loading System Final Pass
   Final cascade layer for restrained, natural motion and loading behavior.
   Route/page navigation remains intentionally instant. */

:root {
  --ls-motion-control: 140ms;
  --ls-motion-fast: 140ms;
  --ls-motion-base: 180ms;
  --ls-motion-card: 180ms;
  --ls-motion-overlay: 180ms;
  --ls-motion-modal: 220ms;
  --ls-motion-sheet: 260ms;
  --ls-motion-drawer: 260ms;
  --ls-motion-carousel: 400ms;
  --ls-ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ls-ease-enter: cubic-bezier(.16, 1, .3, 1);
  --ls-ease-exit: cubic-bezier(.4, 0, 1, 1);
}

/* Keep page navigation immediate even if a browser/framework transition API is introduced later. */
::view-transition-group(root),
::view-transition-image-pair(root),
::view-transition-old(root),
::view-transition-new(root) {
  animation: none !important;
  transition: none !important;
}

#root > main,
#root > div,
#root main,
#root [role="main"] {
  animation-name: none !important;
  animation-delay: 0s !important;
}

/* Retire legacy review-card/page animations from older visual layers.
   The approved carousel motion is exclusively the v32.8.65 track motion. */
.ls-customer-reviews__card,
.ls-customer-reviews__grid,
.ls-customer-reviews__page--exit-left,
.ls-customer-reviews__page--enter-right,
.ls-customer-reviews__page--exit-right,
.ls-customer-reviews__page--enter-left,
.ls-customer-reviews__page--slide-left,
.ls-customer-reviews__page--slide-right {
  animation: none !important;
}

.ls-customer-reviews__track.is-forward,
.ls-customer-reviews__track.is-reverse {
  animation-duration: var(--ls-motion-carousel) !important;
  animation-timing-function: var(--ls-ease-enter) !important;
  will-change: transform;
}

.ls-customer-reviews__track:not(.is-forward):not(.is-reverse) {
  will-change: auto !important;
}

/* Continuous decorative motion is outside the Localsewa motion language. */
#root .animate-bounce,
#root .animate-ping,
.ui-premium-glow {
  animation: none !important;
  transform: none !important;
}

/* Ensure generic utility transitions cannot re-introduce long or inconsistent timings. */
#root .transition,
#root .transition-all,
#root .transition-colors,
#root .transition-opacity,
#root .transition-shadow,
#root .transition-transform {
  transition-duration: var(--ls-motion-base) !important;
  transition-timing-function: var(--ls-ease-standard) !important;
}

#root .transition-colors,
#root .transition-opacity {
  transition-duration: var(--ls-motion-control) !important;
}

/* Common micro-interactions: no large movement, bounce or geometry animation. */
#root button,
#root [role="button"],
#root a,
.ui-dropdown-layer [role="option"] {
  -webkit-tap-highlight-color: transparent;
}

#root button:disabled,
#root [aria-disabled="true"],
#root .ls-action-loading {
  transform: none !important;
  transition-property: background-color, border-color, color, box-shadow, opacity !important;
}

/* Loading placeholders must remain visually passive and non-interactive. */
.animate-pulse,
.animate-pulse * {
  pointer-events: none;
  transition: none !important;
}

/* Keep expensive compositor hints transient instead of permanent. */
.ui-dropdown-layer:not([data-state="open"]),
.ls-booking-chat-panel:not(.is-animating) {
  will-change: auto;
}

/* Accessibility: non-essential motion collapses to immediate state changes.
   Functional progress spinners remain visible, but rotate more slowly. */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto !important;
  }

  #root .transition,
  #root .transition-all,
  #root .transition-colors,
  #root .transition-opacity,
  #root .transition-shadow,
  #root .transition-transform,
  #root input,
  #root textarea,
  #root select,
  .ui-dropdown-layer,
  .ui-dropdown-layer [role="option"],
  .ls-services-sort-control,
  .ls-emergency-sort-control,
  .ls-provider-card,
  .ls-services-editorial-card,
  .ls-booking-card,
  .ls-customer-reviews__card,
  .ls-home-emergency-card,
  .ls-booking-filter-tab,
  .ls-emergency-filter-chip,
  aside[aria-label="Customer navigation"],
  [role="dialog"][aria-label="Provider navigation"],
  [role="dialog"][aria-label="Provider navigation"] > aside {
    transition: none !important;
    transform: none !important;
  }

  .ui-dropdown-layer,
  .ls-customer-reviews__track.is-forward,
  .ls-customer-reviews__track.is-reverse,
  [role="dialog"][aria-label="Admin menu"] > button,
  [role="dialog"][aria-label="Admin menu"] > aside,
  [role="dialog"][aria-label="Notifications"] > button,
  [role="dialog"][aria-label="Notifications"] > section,
  [role="dialog"][aria-modal="true"].fixed.inset-0.flex.items-end,
  [role="dialog"][aria-modal="true"].fixed.inset-0.flex.items-end > :last-child:not(button),
  .ls-booking-chat-overlay,
  .ls-booking-chat-panel,
  .ui-center-notice,
  .ui-role-switch-card,
  .ui-role-node,
  .ui-role-node-delay,
  .ui-role-connector > span,
  .ui-premium-glow,
  .ui-toast-enter,
  .animate-pulse {
    animation: none !important;
    transform: none !important;
  }

  .animate-pulse {
    opacity: .82 !important;
  }

  .animate-spin,
  .ls-inline-spinner,
  .ls-action-loading:not(.ls-has-native-spinner)::before {
    animation-duration: 1.6s !important;
  }
}
