/* PallyPilot website — the little robot helper in the corner.
   It floats, says a few friendly things, and takes visitors to the demo. */
.pp-bot { position: fixed; z-index: 60; inset-inline-end: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
html[dir='rtl'] .pp-bot { align-items: flex-start; }
html:not(.js) .pp-bot { display: none; }
.pp-bot > * { pointer-events: auto; }

.pp-bot-btn { position: relative; display: block; width: 68px; height: 68px; border-radius: 22px; animation: pp-bot-in .9s cubic-bezier(.2,.9,.25,1.25) both, pp-bot-float 3.4s ease-in-out 1s infinite; filter: drop-shadow(0 10px 22px rgba(60, 50, 200, .35)); -webkit-tap-highlight-color: transparent; }
.pp-bot-btn img { width: 100%; height: 100%; display: block; transition: transform .25s ease; }
.pp-bot-btn:hover img, .pp-bot-btn:focus-visible img { transform: rotate(-8deg) scale(1.06); }
.pp-bot.wave .pp-bot-btn img { animation: pp-bot-wave .9s ease-in-out; }
.pp-bot-ring { position: absolute; inset: -6px; border-radius: 26px; border: 2px solid rgba(124, 58, 237, .55); opacity: 0; animation: pp-bot-ring 4s ease-out 2s infinite; pointer-events: none; }

.pp-bot-bubble { position: relative; max-width: min(260px, calc(100vw - 40px)); padding: 12px 34px 12px 15px; border-radius: 16px; border-end-end-radius: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .95rem; line-height: 1.45; opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1); visibility: hidden; }
html[dir='rtl'] .pp-bot-bubble { padding: 12px 15px 12px 34px; border-end-end-radius: 16px; border-end-start-radius: 6px; transform-origin: bottom left; }
.pp-bot.talk .pp-bot-bubble { opacity: 1; transform: none; visibility: visible; }
.pp-bot-text { margin: 0; }
.pp-bot-text.swap { animation: pp-bot-swap .35s ease; }
.pp-bot-close { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.pp-bot-close:hover { background: var(--surface-2); color: var(--ink); }

@keyframes pp-bot-in { from { opacity: 0; transform: translateY(40px) scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes pp-bot-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes pp-bot-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@keyframes pp-bot-ring { 0% { opacity: .9; transform: scale(.92); } 60%, 100% { opacity: 0; transform: scale(1.18); } }
@keyframes pp-bot-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) { .pp-bot-btn { width: 56px; height: 56px; border-radius: 18px; } .pp-bot-bubble { font-size: .9rem; } }
@media (prefers-reduced-motion: reduce) { .pp-bot-btn, .pp-bot-ring, .pp-bot.wave .pp-bot-btn img, .pp-bot-text.swap { animation: none; } }
