.bmp-contact-fab {
  position: fixed;
  right: 0.65rem;
  bottom: calc(var(--bottom-nav-height) + var(--bottom-nav-float) + 0.65rem + env(safe-area-inset-bottom, 0px));
  z-index: 240;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.bmp-contact-welcome {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(17.5rem, calc(100vw - 5.5rem));
  padding: 0.7rem 2rem 0.75rem 0.85rem;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transform-origin: right bottom;
  transition:
    opacity 0.32s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.bmp-contact-welcome.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.bmp-contact-welcome.is-hiding {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
}

.bmp-contact-welcome__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  font-weight: 500;
}

.bmp-contact-welcome__close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2563eb;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.bmp-contact-welcome__close:hover {
  background: rgba(37, 99, 235, 0.08);
}

.bmp-contact-welcome__tail {
  position: absolute;
  right: 1rem;
  bottom: -0.45rem;
  width: 0.9rem;
  height: 0.9rem;
  background: #fff;
  border: none;
  transform: rotate(45deg);
  border-bottom-right-radius: 3px;
}

.bmp-contact-fab__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: #ff6a00;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.5);
  cursor: pointer;
  animation: bmp-contact-bounce 2.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.bmp-contact-fab__toggle:focus,
.bmp-contact-fab__toggle:active {
  outline: none;
}

.bmp-contact-fab__toggle img,
.bmp-contact-fab__headset {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.bmp-contact-fab__pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 106, 0, 0.75);
  animation: bmp-contact-pulse 2.2s ease-out infinite;
}

.bmp-contact-fab.is-open .bmp-contact-fab__toggle {
  animation: none;
}

.bmp-contact-fab__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.bmp-contact-fab__item {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(10px) scale(0.88);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  transition-delay: var(--contact-delay, 0ms);
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.bmp-contact-fab__item--widget {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.bmp-contact-fab__item:focus,
.bmp-contact-fab__item:active {
  outline: none;
}

.bmp-contact-fab.is-open .bmp-contact-fab__item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bmp-contact-fab__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes bmp-contact-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes bmp-contact-pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }

  70%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (min-width: 901px) {
  .bmp-contact-fab {
    right: 0.85rem;
    bottom: 1.25rem;
  }
}

/* Allinonechat default bubble is hidden; opened from contact menu instead. */
.aio-lc-bubble {
  display: none !important;
}

.aio-lc-root:not(:has(.aio-lc-panel:not(.aio-lc-hidden))) {
  pointer-events: none;
}

.aio-lc-root .aio-lc-panel:not(.aio-lc-hidden) {
  pointer-events: auto;
}
