/* Localsewa v32.8.65 — Motion + Loading QA, Phase D
   Page-by-page normalization for Home, Services, Emergency, Bookings,
   Saved Providers, Profile and provider-facing cards. */

:root {
  --ls-motion-card: 180ms;
  --ls-motion-control: 140ms;
  --ls-motion-carousel-qa: 400ms;
}

/* Reviews: preserve the approved horizontal direction, but reduce the older
   620ms movement to the current site-wide motion cadence. */
.ls-customer-reviews__track {
  will-change: auto !important;
}
.ls-customer-reviews__track.is-forward,
.ls-customer-reviews__track.is-reverse {
  animation-duration: var(--ls-motion-carousel-qa) !important;
  animation-timing-function: var(--ls-ease-enter) !important;
  will-change: transform !important;
}

/* Primary content cards share one restrained hover language on precise pointers. */
.ls-provider-card,
.ls-services-editorial-card,
.ls-booking-card,
.ls-customer-reviews__card,
.ls-home-emergency-card {
  transition-property: transform, border-color, box-shadow, background-color !important;
  transition-duration: var(--ls-motion-card) !important;
  transition-timing-function: var(--ls-ease-standard) !important;
}

@media (hover: hover) and (pointer: fine) {
  .ls-provider-card:hover,
  .ls-services-editorial-card:hover {
    transform: translateY(-2px) !important;
  }

  .ls-booking-card:hover,
  .ls-customer-reviews__card:hover {
    transform: translateY(-1px) !important;
  }
}

/* Touch devices should not inherit sticky desktop hover transforms after taps. */
@media (hover: none), (pointer: coarse) {
  .ls-provider-card,
  .ls-provider-card:hover,
  .ls-services-editorial-card,
  .ls-services-editorial-card:hover,
  .ls-booking-card,
  .ls-booking-card:hover,
  .ls-customer-reviews__card,
  .ls-customer-reviews__card:hover,
  .ls-home-emergency-card,
  .ls-home-emergency-card:hover,
  .ls-emergency-cta:hover,
  .ls-services-provider-cta:hover {
    transform: none !important;
  }
}

/* Tabs, filter chips and action rows respond quickly without geometry shifts. */
.ls-booking-filter-tab,
.ls-emergency-filter-chip,
.ls-services-sort-control,
.ls-emergency-sort-control,
.ls-provider-actions > a,
.ls-provider-actions > button,
.ls-booking-actions > a,
.ls-booking-actions > button,
.ls-booking-communication > a,
.ls-booking-communication > button {
  transition-duration: var(--ls-motion-control) !important;
  transition-timing-function: var(--ls-ease-standard) !important;
}

.ls-booking-filter-tab:active,
.ls-emergency-filter-chip:active {
  transform: scale(.985);
}

/* Skeleton QA: placeholders now occupy final-content-like footprints and never
   carry interactive hover/transition effects. */
.animate-pulse,
.animate-pulse * {
  transition: none !important;
}

.ls-booking-skeleton {
  min-height: 214px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .025);
}

.ls-saved-page .animate-pulse,
.ls-emergency-page .animate-pulse,
.ls-customer-home .animate-pulse,
.ls-services-directory-grid .animate-pulse {
  pointer-events: none;
}

/* Dropdowns should settle, not zoom. */
.ui-dropdown-layer {
  transform-origin: top center;
}
.ui-dropdown-layer [role="option"] {
  transition: background-color var(--ls-motion-control) var(--ls-ease-standard),
              color var(--ls-motion-control) var(--ls-ease-standard) !important;
}

/* Disabled/loading controls never retain hover lift/press transforms. */
#root button:disabled,
#root [role="button"][aria-disabled="true"],
#root .ls-action-loading {
  transform: none !important;
}

/* Keep status/content refreshes quiet: no attention-seeking motion on cards
   that are merely receiving fresh data. */
.ls-booking-card,
.ls-provider-card {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .ls-customer-reviews__track.is-forward,
  .ls-customer-reviews__track.is-reverse,
  .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,
  .ls-services-sort-control,
  .ls-emergency-sort-control,
  .ls-provider-actions > a,
  .ls-provider-actions > button,
  .ls-booking-actions > a,
  .ls-booking-actions > button,
  .ls-booking-communication > a,
  .ls-booking-communication > button,
  .ui-dropdown-layer [role="option"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
