/* HeyBuddy animated mascot styles — HeyMyPDF */
.buddy-wrap {
  position: fixed;
  bottom: 25px;
  right: clamp(10px, 3vw, 42px);
  z-index: 9990;
  width: min(410px, calc(100vw - 20px));
  pointer-events: none;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0;
}
.buddy-wrap.is-visible {
  display: flex !important;
}
.buddy-wrap.is-rtl {
  direction: rtl;
  text-align: right;
}
.bubble {
  pointer-events: auto;
  width: min(285px, calc(100vw - 126px));
  margin: 0 -7px 100px 0;
  border-radius: 24px 24px 9px 24px;
  background: #ffffff;
  padding: 20px 20px 14px;
  box-shadow: 0 18px 60px rgba(56, 93, 172, 0.22);
  border: 1px solid #e1eaf7;
  position: relative;
  transform-origin: bottom right;
  animation: buddyPopIn .55s cubic-bezier(.2, 1.5, .5, 1) both;
}
.bubble:after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 27px;
  border-width: 12px 0 12px 14px;
  border-style: solid;
  border-color: transparent transparent transparent #ffffff;
}
.buddy-wrap.is-rtl .bubble {
  margin: 0 0 100px -7px;
  border-radius: 24px 24px 24px 9px;
  transform-origin: bottom left;
}
.buddy-wrap.is-rtl .bubble:after {
  right: auto;
  left: -12px;
  border-width: 12px 14px 12px 0;
  border-color: transparent #ffffff transparent transparent;
}
.bubble h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #2863f0;
}
.bubble p {
  font-size: 14px;
  line-height: 1.48;
  color: #101f52;
  margin: 0 0 12px;
  min-height: 62px;
}
.bubble footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.buddy-wrap.is-rtl .bubble footer {
  flex-direction: row-reverse;
}
.buddy-dots {
  display: flex;
  gap: 5px;
}
.buddy-dot {
  width: 6px;
  height: 6px;
  background: #dce6f7;
  border-radius: 10px;
  transition: width .2s, background .2s;
}
.buddy-dot.on {
  background: #2863f0;
  width: 19px;
}
.buddy-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.buddy-next {
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(100deg, #2863f0, #8370ed);
  padding: 8px 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(40, 99, 240, 0.25);
  transition: transform .15s, box-shadow .15s;
}
.buddy-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 99, 240, 0.35);
}
.buddy-next:active {
  transform: translateY(1px);
}
.buddy-close {
  position: absolute;
  top: 8px;
  right: 9px;
  border: 0;
  background: transparent;
  color: #838299;
  font-size: 22px;
  line-height: 1;
  width: 30px;
  height: 30px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.buddy-wrap.is-rtl .buddy-close {
  right: auto;
  left: 9px;
}
.buddy-close:hover {
  background: #f0f4fa;
  color: #101f52;
}
.buddy-skip {
  border: 0;
  background: transparent;
  color: #828197;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  transition: color .15s;
}
.buddy-skip:hover {
  color: #2863f0;
}
.mascot {
  width: 146px;
  height: 196px;
  flex-shrink: 0;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 15px 11px rgba(104, 84, 181, 0.2));
  animation: buddyJumpIn .9s cubic-bezier(.15, 1.5, .4, 1) both;
}
.mascot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.floaty {
  animation: buddyBob 2.8s ease-in-out infinite;
  transform-origin: center;
}
.ears {
  animation: buddyEarWiggle 3.7s infinite;
  transform-origin: 74px 74px;
}
.arm {
  animation: buddyWave 1.3s ease-in-out infinite;
  transform-origin: 109px 119px;
}
.spark {
  animation: buddyTwinkle 2s ease-in-out infinite;
}
.spark.two {
  animation-delay: 1s;
}
.eye-shine {
  animation: buddyBlink 5s infinite;
  transform-origin: 50% 118px;
}
.mascot.out {
  animation: buddyGoAway .6s ease-in both;
}
.buddy-wrap.out .bubble {
  animation: buddyFadeAway .28s ease-in both;
}

@keyframes buddyBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-11px) rotate(2deg); }
}
@keyframes buddyJumpIn {
  from { opacity: 0; transform: translateY(240px) rotate(25deg) scale(.5); }
  70% { opacity: 1; }
  to { transform: translateY(0) rotate(0) scale(1); }
}
@keyframes buddyPopIn {
  from { opacity: 0; transform: scale(.6) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes buddyWave {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-21deg); }
}
@keyframes buddyEarWiggle {
  0%, 85%, 100% { transform: rotate(0); }
  90% { transform: rotate(6deg); }
}
@keyframes buddyTwinkle {
  0%, 100% { opacity: .3; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes buddyBlink {
  0%, 44%, 46%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.07); }
}
@keyframes buddyGoAway {
  to { transform: translate(70px, 180px) rotate(22deg) scale(.3); opacity: 0; }
}
@keyframes buddyFadeAway {
  to { transform: scale(.8); opacity: 0; }
}

@media (max-width: 650px) {
  .bubble {
    margin-bottom: 90px;
    padding: 16px;
    width: min(248px, calc(100vw - 120px));
  }
  .mascot {
    width: 122px;
    height: 165px;
  }
  .buddy-wrap {
    bottom: 12px;
    right: 8px;
  }
  .bubble p {
    font-size: 13px;
    min-height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buddy-wrap *,
  .buddy-wrap *:before,
  .buddy-wrap *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


.hm-heybuddy-launcher-pill {
  position: fixed !important;
  bottom: 16px !important;
  right: 16px !important;
  z-index: 9998 !important;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.hm-heybuddy-launcher-pill:hover {
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45) !important;
}

