/* Light feedback only. Canvas geometry, loading and navigation timing stay owned
   by their existing implementations. No blanket transition: all / will-change. */
html[data-fy-motion] :is(
  button.button, button.custom-send-button, .custom-chat-task-actions > button,
  .sidebar-service-actions > button, button.sidebar-settings-entry, button.sidebar-logout
):not(:where(.infinite-workspace-shell *, .canvas-library-page *)) {
  /* The legacy desktop theme uses an important transition shorthand. */
  transition-property: background-color, border-color, color, box-shadow, transform, scale !important;
  transition-duration: 150ms !important;
  transition-timing-function: cubic-bezier(.2,.7,.3,1) !important;
}

html[data-fy-motion="standard"] :is(
  button.button, button.custom-send-button, .custom-chat-task-actions > button,
  .sidebar-service-actions > button, button.sidebar-settings-entry, button.sidebar-logout
):not(:disabled):not([aria-disabled="true"]):not(:where(.infinite-workspace-shell *, .canvas-library-page *)):active {
  scale: .98;
}

@media (hover: hover) and (pointer: fine) {
  html[data-fy-motion="standard"] :is(
    .sidebar-service-actions > button, button.sidebar-settings-entry,
    .custom-chat-task-actions > button
  ):not(:disabled):hover {
    border-color: rgba(137,174,244,.54) !important;
    box-shadow: inset 0 0 0 1px rgba(137,174,244,.08) !important;
  }
}

html[data-fy-motion] .sidebar .nav-item {
  /* Keep the legacy hover translate from nudging the whole menu row. */
  transform: none !important;
  transition-property: color, background-color, border-color, box-shadow !important;
  transition-duration: 170ms !important;
  transition-timing-function: ease-out !important;
}
/* The existing active shadow is important. Animate an unused decorative
   pseudo-element instead of fighting that shadow or moving the menu item. */
html[data-fy-motion="standard"] .sidebar .nav-item.active::after {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 3px;
  background: #99bdff;
  pointer-events: none;
  animation: fy-motion-nav-select 180ms ease-out;
}
@keyframes fy-motion-nav-select {
  from { opacity: .25; transform: scaleY(.65); }
  to { opacity: 1; transform: scaleY(1); }
}

html[data-fy-motion="standard"] .fy-motion-dialog-enter {
  animation: fy-motion-dialog-in 180ms cubic-bezier(.2,.7,.3,1) both;
}
@keyframes fy-motion-dialog-in {
  from { opacity: .7; translate: 0 5px; }
  to { opacity: 1; translate: 0 0; }
}

html[data-fy-motion="standard"] .fy-motion-task-complete {
  /* An inset outline remains visible despite the theme's important shadow.
     Outline does not take layout space or change card positioning. */
  outline: 1px solid transparent;
  outline-offset: -1px;
  animation: fy-motion-task-done 560ms ease-out;
}
@keyframes fy-motion-task-done {
  0% { outline-color: rgba(104,211,170,.8); }
  100% { outline-color: rgba(104,211,170,0); }
}

