
/* === WiPack v26: PSчик 66 motion/liveliness === */

/* Make the mascot feel alive, but not annoying */
.wipack-assistant-button .wipack-assistant-character {
  animation:
    wipackPschikFloat 4.2s ease-in-out infinite,
    wipackPschikBreath 2.8s ease-in-out infinite !important;
  transform-origin: 50% 88% !important;
  will-change: transform, filter !important;
  filter: drop-shadow(0 12px 16px rgba(13,69,122,.18)) !important;
}

/* Soft shadow also moves */
.wipack-assistant-button::before {
  animation: wipackPschikShadow 4.2s ease-in-out infinite !important;
}

/* On hover: stronger greeting motion */
.wipack-assistant-button:hover .wipack-assistant-character {
  animation:
    wipackPschikHello 1.05s ease-in-out infinite,
    wipackPschikGlow 1.6s ease-in-out infinite !important;
}

/* On active click */
.wipack-assistant-button:active .wipack-assistant-character {
  animation: wipackPschikClick .32s ease-out 1 !important;
}

/* When chat is open, calm down but keep small movement */
body.wipack-pschik-open .wipack-assistant-button .wipack-assistant-character {
  animation:
    wipackPschikListening 3.2s ease-in-out infinite !important;
}

/* Add tiny attention sparkle near PSчик */
.wipack-assistant-button .wipack-pschik-sparkle {
  position: absolute;
  width: 7px;
  height: 7px;
  right: 18px;
  top: 12px;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  transform: scale(.6);
}
.wipack-assistant-button .wipack-pschik-sparkle::before,
.wipack-assistant-button .wipack-pschik-sparkle::after {
  content:"";
  position:absolute;
  background:#0B5DB8;
  border-radius:999px;
  left:3px;
  top:0;
}
.wipack-assistant-button .wipack-pschik-sparkle::before {
  width:2px;
  height:7px;
}
.wipack-assistant-button .wipack-pschik-sparkle::after {
  width:7px;
  height:2px;
  left:0;
  top:3px;
}
.wipack-assistant-button:hover .wipack-pschik-sparkle {
  animation: wipackPschikSparkle 1.2s ease-in-out infinite !important;
}

/* Small pulse on first load to show it is clickable */
.wipack-assistant-button.wipack-pschik-intro .wipack-assistant-character {
  animation: wipackPschikIntro 1.8s ease-in-out 1, wipackPschikFloat 4.2s ease-in-out infinite 1.8s !important;
}

@keyframes wipackPschikFloat {
  0%,100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-3px) rotate(-1.1deg) scale(1.01); }
  50% { transform: translateY(-6px) rotate(.8deg) scale(1.015); }
  75% { transform: translateY(-3px) rotate(1.1deg) scale(1.01); }
}

@keyframes wipackPschikBreath {
  0%,100% { filter: drop-shadow(0 12px 16px rgba(13,69,122,.16)); }
  50% { filter: drop-shadow(0 16px 20px rgba(13,69,122,.23)); }
}

@keyframes wipackPschikShadow {
  0%,100% { transform: scale(1); opacity:.85; }
  50% { transform: scale(.82); opacity:.55; }
}

@keyframes wipackPschikHello {
  0%,100% { transform: translateY(-4px) rotate(-3deg) scale(1.045); }
  35% { transform: translateY(-8px) rotate(4deg) scale(1.065); }
  70% { transform: translateY(-5px) rotate(-1deg) scale(1.05); }
}

@keyframes wipackPschikGlow {
  0%,100% { filter: drop-shadow(0 13px 18px rgba(13,69,122,.25)); }
  50% { filter: drop-shadow(0 18px 24px rgba(11,93,184,.38)); }
}

@keyframes wipackPschikClick {
  0% { transform: scale(1.04) rotate(0); }
  45% { transform: scale(.92) rotate(-2deg); }
  100% { transform: scale(1.04) rotate(0); }
}

@keyframes wipackPschikListening {
  0%,100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-3px) rotate(.6deg) scale(1.01); }
}

@keyframes wipackPschikSparkle {
  0%,100% { opacity:0; transform:translateY(0) scale(.5) rotate(0deg); }
  35% { opacity:1; transform:translateY(-4px) scale(1) rotate(45deg); }
  70% { opacity:.35; transform:translateY(-8px) scale(.75) rotate(90deg); }
}

@keyframes wipackPschikIntro {
  0% { transform: translateY(0) scale(.8) rotate(0); opacity:.2; }
  35% { transform: translateY(-10px) scale(1.08) rotate(-4deg); opacity:1; }
  60% { transform: translateY(-2px) scale(.98) rotate(3deg); }
  100% { transform: translateY(0) scale(1) rotate(0); }
}

/* Respect accessibility setting */
@media (prefers-reduced-motion: reduce) {
  .wipack-assistant-button .wipack-assistant-character,
  .wipack-assistant-button:hover .wipack-assistant-character,
  .wipack-assistant-button::before,
  .wipack-assistant-button .wipack-pschik-sparkle {
    animation: none !important;
  }
}
