/* Fincate Pro — animations (v3.13.0).
   Loaded only for people with animations on (by default, everyone on the glass look; Account → Appearance can
   switch them on for Classic or off altogether) — the server marks the page <html class="fp-motion">.
   Everything here is screen-only and switched off when the device asks for reduced motion. The documents (reports,
   letters, the live preview's paper) are never animated by these rules, and nothing is printed differently.
   The behaviour (what moves when) is in spro-motion.js; this file holds the tokens and the purely CSS effects. */
html.fp-motion{
  --fpm-fast:140ms; --fpm-t:240ms; --fpm-slow:420ms; --fpm-chart:700ms;
  --fpm-out:cubic-bezier(.2,.8,.2,1); --fpm-io:cubic-bezier(.65,0,.35,1); --fpm-spring:cubic-bezier(.34,1.56,.64,1);
  --fpm-ring:#1f8a70; --fpm-hl:rgba(255,222,89,.55);
}
@media screen and (prefers-reduced-motion: no-preference){

/* ---- buttons: a small press ---- */
html.fp-motion :is(button,.btn,.fp-btn,a.btn):not(:disabled):not(.fp-mag):active{transform:scale(.97);transition:transform var(--fpm-fast) var(--fpm-out)}
html.fp-motion :is(#sheets,#onepager,#clSheets,#adlSheets,#docDash,#docLetter,#docNote,#pvBody,#report .sheet) :is(button,.btn):active{transform:none}

/* ---- dialogs: rise in; side panels slide in from the right ---- */
html.fp-motion dialog[open]:not(.fdrawer){animation:fpm-pop var(--fpm-t) var(--fpm-out)}
html.fp-motion dialog.fdrawer[open]{animation:fpm-slide-r var(--fpm-slow) var(--fpm-out)}
html.fp-motion dialog[open]::backdrop{animation:fpm-fade var(--fpm-slow) var(--fpm-out)}
@keyframes fpm-pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@keyframes fpm-slide-r{from{transform:translateX(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes fpm-fade{from{opacity:0}to{opacity:1}}

/* ---- switches: the knob springs, and stretches while pressed ---- */
html.fp-motion .switch .tr{transition:background-color var(--fpm-t) var(--fpm-out)}
html.fp-motion .switch .tr::after{transition:transform var(--fpm-t) var(--fpm-spring),width var(--fpm-fast) var(--fpm-out)}
html.fp-motion .switch:active .tr::after{width:22px}
html.fp-motion .switch[aria-checked=true]:active .tr::after{transform:translateX(12px)}

/* ---- toasts ---- */
html.fp-motion .fp-toast{animation:fpm-toast var(--fpm-t) var(--fpm-out)}
@keyframes fpm-toast{from{opacity:0;transform:translate(-50%,14px)}to{opacity:1;transform:translateX(-50%)}}

/* ---- loading: a soft shimmer over areas the page marks as busy (after a short wait, so quick loads don't flash) ---- */
html.fp-motion [aria-busy="true"]:not(table):not(tbody){position:relative}
html.fp-motion [aria-busy="true"]:not(table):not(tbody)::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);background-size:220% 100%;
  animation:fpm-shim 1.3s linear .3s infinite;opacity:0}
html.fp-motion[data-fp-theme="dark"] [aria-busy="true"]:not(table):not(tbody)::after{background-image:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.08) 50%,transparent 70%)}
@keyframes fpm-shim{0%{background-position:120% 0;opacity:1}100%{background-position:-120% 0;opacity:1}}

/* ---- numbers counting up: the real figure stays in the page (for screen readers and copying); the counting
   digits are drawn over it while it animates (spro-motion.js sets data-fpm-n and --fpm-c) ---- */
/* the hiding is an animation of the count's length (--fpm-d): when it ends the real figure shows again by itself, even
   on a copy of the element or if the script stopped. Text in its own colour (a suffix such as " days") stays visible. */
html.fp-motion .fpm-counting{position:relative;animation:fpm-cnt-hide var(--fpm-d,820ms) step-end}
html.fp-motion .fpm-counting::after{content:attr(data-fpm-n);position:absolute;left:0;top:0;right:0;white-space:nowrap;color:var(--fpm-c);font-variant-numeric:tabular-nums;text-align:inherit;pointer-events:none;
  opacity:0;animation:fpm-cnt-show var(--fpm-d,820ms) step-end}
@keyframes fpm-cnt-hide{0%{color:transparent}100%{color:transparent}}
@keyframes fpm-cnt-show{0%{opacity:1}100%{opacity:1}}

/* ======================= the wizards ======================= */
/* steps: the wizard's own fade replays on every re-render; with animations on, spro-motion.js plays a directional
   slide only when the step really changes */
html.fp-motion .panel{animation:none}
/* drawers and their backdrop */
html.fp-motion .drawer{transition:transform var(--fpm-slow) var(--fpm-out)!important}
html.fp-motion .drawer-bg.open{animation:fpm-fade var(--fpm-slow) var(--fpm-out)}
html.fp-motion :is(#checkModal,.modal){animation:fpm-pop-c var(--fpm-t) var(--fpm-out)}
html.fp-motion .modal-bg{animation:fpm-fade var(--fpm-t) var(--fpm-out)}
@keyframes fpm-pop-c{from{opacity:0;transform:translate(-50%,calc(-50% + 12px)) scale(.98)}to{opacity:1;transform:translate(-50%,-50%)}}
/* Go → : a ring pulses round the box it lands on (the wizard adds .gap-flash for 1.6 s) */
html.fp-motion .gap-flash{position:relative}
html.fp-motion .gap-flash::after{content:"";position:absolute;inset:-6px;border-radius:12px;border:2px solid var(--fpm-ring);pointer-events:none;
  animation:fpm-ring 1.1s var(--fpm-out) both}
@keyframes fpm-ring{0%{opacity:0;transform:scale(1.04)}20%{opacity:1;transform:scale(1)}45%{opacity:.25}65%{opacity:1}100%{opacity:0;transform:scale(1)}}
/* multi-choice chips (objectives and the like) */
html.fp-motion .multi-opt{transition:background-color var(--fpm-t) var(--fpm-out),border-color var(--fpm-t) var(--fpm-out),color var(--fpm-t),transform var(--fpm-fast) var(--fpm-out)}
html.fp-motion .multi-opt .fpm-fill{position:absolute;border-radius:50%;pointer-events:none;background:var(--fpm-ring);opacity:.16}
/* the wording library's toast rises with a little give */
html.fp-motion #wlToast{transition:transform var(--fpm-t) var(--fpm-spring),opacity var(--fpm-t) var(--fpm-out)!important}
}

/* reduced motion asked for: nothing moves, whatever the setting (belt and braces for the script) */
@media (prefers-reduced-motion: reduce), (forced-colors: active){
  html.fp-motion .fpm-counting{animation:none!important}
  html.fp-motion .fpm-counting::after{content:none}
}
@media print{
  html.fp-motion .fpm-counting{animation:none!important}
  html.fp-motion .fpm-counting::after{content:none}
}
