.bdexperts-kpi-contact-wrap {
  position: fixed;
  bottom: var(--bkpi-offset-bottom, 24px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: var(--bkpi-gap, 12px);
  pointer-events: none;
}

.bdexperts-kpi-contact-wrap--right {
  right: var(--bkpi-offset-side, 20px);
  left: auto;
}

.bdexperts-kpi-contact-wrap--left {
  left: var(--bkpi-offset-side, 20px);
  right: auto;
}

.bdexperts-kpi-contact-wrap--horizontal {
  flex-direction: row;
}

.bdexperts-kpi-contact-btn {
  position: relative;
  width: var(--bkpi-btn-size, 56px);
  height: var(--bkpi-btn-size, 56px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
  animation: bkpi-btn-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bdexperts-kpi-contact-btn:nth-child(2) {
  animation-delay: 0.12s;
}

.bdexperts-kpi-contact-btn:hover,
.bdexperts-kpi-contact-btn:focus {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  color: #fff;
}

.bdexperts-kpi-contact-btn:hover svg,
.bdexperts-kpi-contact-btn:focus svg {
  animation: bkpi-icon-pop 0.45s ease;
}

.bdexperts-kpi-contact-btn svg {
  width: var(--bkpi-icon-size, 26px);
  height: var(--bkpi-icon-size, 26px);
  fill: currentColor;
  display: block;
  position: relative;
  z-index: 1;
}

.bdexperts-kpi-contact-btn--whatsapp {
  background: var(--bkpi-wa-color, #25d366);
}

.bdexperts-kpi-contact-btn--call {
  background: var(--bkpi-call-color, #0ea5e9);
}

/* Soft attention pulse behind WhatsApp */
.bdexperts-kpi-contact-btn--whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  z-index: 0;
  animation: bkpi-pulse-ring 2.4s ease-out infinite;
  opacity: 0;
}

/* Gentle ring bounce on the call icon */
.bdexperts-kpi-contact-btn--call svg {
  animation: bkpi-phone-ring 3.2s ease-in-out infinite;
  transform-origin: 50% 50%;
}

@keyframes bkpi-btn-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bkpi-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes bkpi-phone-ring {
  0%,
  82%,
  100% {
    transform: rotate(0deg);
  }
  86% {
    transform: rotate(-12deg);
  }
  90% {
    transform: rotate(10deg);
  }
  94% {
    transform: rotate(-8deg);
  }
  98% {
    transform: rotate(4deg);
  }
}

@keyframes bkpi-icon-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bdexperts-kpi-contact-btn,
  .bdexperts-kpi-contact-btn--whatsapp::before,
  .bdexperts-kpi-contact-btn--call svg,
  .bdexperts-kpi-contact-btn:hover svg,
  .bdexperts-kpi-contact-btn:focus svg {
    animation: none !important;
  }

  .bdexperts-kpi-contact-btn:hover,
  .bdexperts-kpi-contact-btn:focus {
    transform: none;
  }
}

@media (max-width: 640px) {
  .bdexperts-kpi-contact-wrap {
    bottom: max(16px, var(--bkpi-offset-bottom, 24px));
  }

  .bdexperts-kpi-contact-wrap--right {
    right: max(14px, var(--bkpi-offset-side, 20px));
  }

  .bdexperts-kpi-contact-wrap--left {
    left: max(14px, var(--bkpi-offset-side, 20px));
  }
}
