/* Apply the same small lift to native controls, portal menus, and the public templates. */
/* These controls already lift with transform in the application. Give them a
   single movement, including when reduced motion or touch disables the lift. */
:is(.wanli-agent .wanli-chat-send, .canvas-project-card, .entry-card,
  .wanli-tool-card, [class*="skills-workspace_skillCard__"],
  [class*="skill-library_card__"], [class*="login-form_submit__"]):is(button, a, [role="button"]):hover {
  transform: none !important;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :where(button, input:is([type="button"], [type="submit"], [type="reset"], [type="image"]), summary,
    [role="button"], [role="tab"], [role="switch"], [role="radio"], [role="option"],
    [role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"],
    [data-slot="button"], [data-slot="sidebar-menu-button"], a[href]) {
    &:not(:disabled, [aria-disabled="true"], [data-disabled=""], [data-disabled="true"],
      [inert], [inert] *, [aria-disabled="true"] *,
      .shade, .skip, .wanli-chat-backdrop, [data-slot$="-overlay"], [data-slot="sidebar-rail"]) {
      /* The individual translate leaves existing transform-based centring, image zooms
         and entrance effects intact. Keep existing Tailwind offsets where present. */
      &[class*="translate-x-"] { --wanli-rest-x: var(--tw-translate-x, 0px); }
      &[class*="translate-y-"] { --wanli-rest-y: var(--tw-translate-y, 0px); }
      &:not(.reveal) {
        transition: translate 150ms cubic-bezier(.2,.7,.3,1),
          background-color 150ms ease, border-color 150ms ease, color 150ms ease,
          box-shadow 150ms ease, opacity 150ms ease, filter 150ms ease, transform 150ms ease !important;
      }
      &.reveal {
        transition: opacity .75s, transform .9s cubic-bezier(.18,.72,.3,1),
          translate 150ms cubic-bezier(.2,.7,.3,1) !important;
      }
      &:hover:not(:active) { translate: var(--wanli-rest-x, 0px) calc(var(--wanli-rest-y, 0px) - 2px); }
    }
  }
}
