/*
 * Paytrack product site (kirbyservice.net): Ai flies to where the action is
 * (js/ai-fly.js, which explains it; Dimitar, 02/10/2026). Loaded only while
 * $PT_AI_FLY in index.php is on. Keep this file ASCII.
 */

/* The layer above the whole page (the logo and the arrow included): nothing in
   it takes a click. */
.pt-fly { position: fixed; inset: 0; z-index: 900; pointer-events: none; overflow: hidden; }

/* The stand-in Ai: placed by the script (transform), sized to the scene's Ai.
   His own bob is off: the script hovers him, and lands him exactly where the
   scene's Ai stands, so the hand-back does not jump. */
.pt-fly .pt-fly-ai { position: absolute; left: 0; top: 0; animation: none; will-change: transform; }

/* His bubble: the site's bubble, opened beside him on landing. Its tail points
   at him: down-left when it sits to his right, down-right when to his left. */
.pt-fly-sayer { position: absolute; left: 0; top: 0; will-change: transform; }
/* Solid, unlike the scenes' bubble (bone at 9%): it flies over the scene, and
   whatever was under it showed through and read as being in front of it. The
   colour is that 9% over the night. */
.pt-fly-sayer .pt-bubble { margin: 0; width: max-content; background: #222623; box-shadow: 0 .6em 1.6em rgba(0, 0, 0, .45);
  transition: opacity .3s ease, transform .45s var(--pt-spring); }
.pt-fly-sayer.is-on .pt-bubble { opacity: 1; transform: none; }
.pt-fly-sayer.is-left .pt-bubble { border-radius: 18px 18px 6px 18px; transform-origin: 100% 100%; }
.pt-fly-sayer.is-left .pt-bubble::before { left: auto; right: -6px; clip-path: polygon(0 0, 100% 0, 100% 100%); }

/* The scene's own Ai and bubble while he is away; on his return the bubble
   is held shut for two frames, so it opens with its own pop. */
.pt-ai-away { visibility: hidden; }
.pt-layer.is-current .pt-ai-back .pt-bubble { opacity: 0; transform: translateY(8px) scale(.94); transition: none; }   /* outranks .pt-layer.is-current .pt-bubble */
