/* Fluent-inspired natural motion, shared by main and agent workbenches. */
:root {
  --suite-motion-fast: 120ms;
  --suite-motion-page: 280ms;
  --suite-motion-dialog: 240ms;
  --suite-motion-ease: cubic-bezier(.16,1,.3,1);
}
/* Individual transform properties preserve existing centered dialog transforms. */
@supports (transition-behavior: allow-discrete) {
  body dialog:not(.membership-plans-dialog) {
    animation: none;
    opacity: 0;
    translate: 0 10px;
    scale: .975;
    transition: opacity 160ms ease, translate 160ms ease, scale 160ms ease,
      overlay 160ms allow-discrete, display 160ms allow-discrete;
  }
  body dialog[open]:not(.membership-plans-dialog) {
    animation: none;
    opacity: 1;
    translate: 0 0;
    scale: 1;
    transition-duration: var(--suite-motion-dialog);
    transition-timing-function: var(--suite-motion-ease);
  }
  body dialog:not(.membership-plans-dialog)::backdrop {
    animation: none;
    opacity: 0;
    transition: opacity 160ms ease, overlay 160ms allow-discrete, display 160ms allow-discrete;
  }
  body dialog[open]:not(.membership-plans-dialog)::backdrop { opacity: 1; animation: none; }
  body dialog.agent-reference-drawer { translate: 32px 0; scale: 1; }
  body dialog.agent-reference-drawer[open] { translate: 0 0; }
  /* Closed dialogs must not intercept a click while their visual exit finishes. */
  body dialog:not([open]):not(.membership-plans-dialog), body dialog:not([open]):not(.membership-plans-dialog)::backdrop { pointer-events: none; }
  @starting-style {
    body dialog[open]:not(.membership-plans-dialog) { opacity: 0; translate: 0 10px; scale: .975; }
    body dialog.agent-reference-drawer[open] { translate: 32px 0; scale: 1; }
    body dialog[open]:not(.membership-plans-dialog)::backdrop { opacity: 0; }
  }
}
body :is(.agent-shell,.workspace,dialog) button:not(.suite-select-trigger):not(.suite-date-trigger) {
  transition: background-color var(--suite-motion-fast) ease, border-color var(--suite-motion-fast) ease,
    color var(--suite-motion-fast) ease, box-shadow var(--suite-motion-fast) ease,
    opacity var(--suite-motion-fast) ease, translate 180ms var(--suite-motion-ease),
    scale 180ms var(--suite-motion-ease);
}
/* Hover is pointer-only; no sticky raised states on touchscreens. Keep navigation
   anchored, and reserve lift for action buttons rather than large option cards. */
@media (hover: hover) and (pointer: fine) {
  body :is(.agent-workspace,.workspace,dialog) :is(.button,.primary-button,.secondary-button,.manual-action,.manual-search-button):hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
    translate: 0 -2px;
    scale: 1.015;
    box-shadow: 0 5px 14px #30275324;
  }
}
body :is(.agent-shell,.workspace,dialog) button:active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.suite-select-trigger):not(.suite-date-trigger) {
  translate: 0 1px;
  scale: .97;
  transition-duration: 70ms;
  box-shadow: inset 0 2px 4px #18213b22;
}
body :is(.agent-shell,.workspace,dialog) button[aria-busy="true"] { cursor: progress; translate: none; scale: 1; }
body :is(.agent-shell,.workspace,dialog) button:focus-visible { outline: 2px solid #8f80e5; outline-offset: 3px; }
body :is(.agent-toast,.toast):not([hidden]) { animation: suite-feedback-in 160ms var(--suite-motion-ease); }
@keyframes suite-feedback-in { from { opacity:0; } to { opacity:1; } }
[data-agent-panel]:has(> .suite-frame-loading) { position: relative; }
.suite-frame-pending { opacity: 0; pointer-events: none; }
.suite-frame-loading[hidden] { display: none !important; }
.suite-frame-loading {
  position: absolute; z-index: 2; inset: 50% auto auto 50%; display: flex; align-items: center; gap: 10px;
  min-width: 150px; padding: 12px 16px; border: 1px solid color-mix(in srgb,var(--suite-primary,#6255d9) 16%,#fff);
  border-radius: 999px; color: var(--suite-muted,#64728b); background: color-mix(in srgb,var(--suite-surface,#fff) 92%,transparent);
  box-shadow: 0 14px 38px #3027531c; backdrop-filter: blur(12px); font-size: 13px; font-weight: 650;
  translate: -50% -46%; animation: suite-frame-loader-in 220ms var(--suite-motion-ease) both;
}
.suite-frame-loading::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid #e7e2fa; border-top-color: var(--suite-primary,#6255d9);
  animation: suite-frame-spin 720ms linear infinite;
}
@keyframes suite-frame-loader-in { from { opacity: 0; translate: -50% -38%; } to { opacity: 1; translate: -50% -46%; } }
@keyframes suite-frame-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  body dialog, body dialog::backdrop,
  body :is(.agent-shell,.workspace,dialog) button,
  body :is(.agent-toast,.toast), .suite-frame-loading, .suite-frame-loading::before {
    animation: none !important; transition: none !important;
  }
  .suite-frame-loading { translate: -50% -50%; }
  body dialog[open] { opacity: 1; translate: none; scale: 1; }
  body :is(.agent-shell,.workspace,dialog) button { translate: none !important; scale: 1 !important; }
}
