
/* SRII PROPERTIES — ANIMATED WHATSAPP ASSISTANT */

.sp-wa,
.sp-wa * {
  box-sizing: border-box;
}

.sp-wa {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 68px;
  height: 68px;
  font-family: Arial, sans-serif;
}

.sp-wa__button {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25d366;
  box-shadow: 0 5px 20px rgba(0,0,0,.22);
  text-decoration: none;
  z-index: 3;
  animation: sp-wa-pulse 2.5s infinite;
}

.sp-wa__button svg {
  width: 34px;
  height: 34px;
}

.sp-wa__button:hover {
  background: #1eae52;
  transform: scale(1.05);
}

@keyframes sp-wa-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37,211,102,.35),
                0 5px 20px rgba(0,0,0,.22);
  }
  65% {
    box-shadow: 0 0 0 14px rgba(37,211,102,0),
                0 5px 20px rgba(0,0,0,.22);
  }
}

/* Character behind WhatsApp icon */

.sp-wa__character {
  position: absolute;
  bottom: 35px;
  right: 1px;
  width: 100px;
  height: 118px;
  z-index: 2;
  opacity: 0;
  transform: translateY(48px) scale(.8);
  pointer-events: none;
  transition: transform .65s ease, opacity .45s ease;
}

.sp-wa.is-greeting .sp-wa__character,
.sp-wa.is-message .sp-wa__character {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sp-wa__character svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.15));
}

.sp-wa__arm {
  transform-origin: 87px 90px;
}

.sp-wa.is-greeting .sp-wa__arm,
.sp-wa.is-message .sp-wa__arm {
  animation: sp-wa-wave .65s ease-in-out 4;
}

@keyframes sp-wa-wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-24deg); }
}

.sp-wa__hi {
  position: absolute;
  top: 0;
  right: -15px;
  background: #fff;
  color: #0a2144;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s, transform .25s;
}

.sp-wa.is-greeting .sp-wa__hi {
  opacity: 1;
  transform: scale(1);
}

/* Message bubble */

.sp-wa__bubble {
  position: absolute;
  bottom: 145px;
  right: 0;
  width: 290px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #ead9bc;
  border-radius: 17px;
  box-shadow: 0 8px 35px rgba(10,33,68,.17);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(.95);
  transition: opacity .35s, transform .35s, visibility .35s;
  z-index: 4;
}

.sp-wa.is-message .sp-wa__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sp-wa__bubble::after {
  content: "";
  position: absolute;
  right: 25px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid #ead9bc;
  border-bottom: 1px solid #ead9bc;
  transform: rotate(45deg);
}

.sp-wa__bubble a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  color: #0a2144;
  text-decoration: none;
}

.sp-wa__bubble strong {
  font-size: 17px;
}

.sp-wa__bubble span {
  font-size: 14px;
  line-height: 1.55;
}

.sp-wa__bubble small {
  color: #138f49;
  font-size: 12px;
  font-weight: 700;
}

.sp-wa__close {
  position: absolute;
  top: 5px;
  right: 8px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #69788a;
  font-size: 23px;
  cursor: pointer;
  padding: 4px 7px;
}

/* Mobile */

@media (max-width: 767px) {
  .sp-wa {
    right: 16px;
    bottom: 18px;
    width: 60px;
    height: 60px;
  }

  .sp-wa__button {
    width: 58px;
    height: 58px;
  }

  .sp-wa__button svg {
    width: 31px;
    height: 31px;
  }

  .sp-wa__character {
    width: 90px;
    height: 108px;
    bottom: 31px;
  }

  .sp-wa__bubble {
    width: 270px;
    bottom: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-wa *,
  .sp-wa *::before,
  .sp-wa *::after {
    animation: none !important;
    transition: none !important;
  }
}
