/* ==========================================================================
   Sticky WhatsApp button — right side
   ========================================================================== */

.xevora-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.38);
  text-decoration: none;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease;
}

.xevora-whatsapp:hover,
.xevora-whatsapp:focus-visible {
  color: #fff;
  background: #1ebe57;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.45);
}

.xevora-whatsapp:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.xevora-whatsapp__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.xevora-whatsapp__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--ink, #15130f);
  color: #fff;
  font-family: var(--sans, "Jost", sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
  box-shadow: 0 8px 24px rgba(21, 19, 15, 0.18);
}

.xevora-whatsapp__tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  background: var(--ink, #15130f);
  transform: translateY(-50%) rotate(45deg);
}

.xevora-whatsapp:hover .xevora-whatsapp__tooltip,
.xevora-whatsapp:focus-visible .xevora-whatsapp__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Above mobile bottom bar */
@media (max-width: 767px) {
  .xevora-whatsapp {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
  }

  .xevora-whatsapp__tooltip {
    display: none;
  }
}

/* PDP sticky bar spacing */
body.has-pdp-sticky .xevora-whatsapp {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body.has-pdp-sticky .xevora-whatsapp {
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xevora-whatsapp,
  .xevora-whatsapp__tooltip {
    transition: none;
  }
}
