.o2vend-whatsapp-float {
  --o2vend-whatsapp-green: #25d366;
  --o2vend-whatsapp-size: 56px;
  --o2vend-whatsapp-icon: 28px;

  position: fixed;
  bottom: 100px;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--o2vend-whatsapp-size);
  height: var(--o2vend-whatsapp-size);
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid var(--o2vend-whatsapp-green);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(37, 211, 102, 0.2);
  color: var(--o2vend-whatsapp-green);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.o2vend-whatsapp-float--right {
  right: 28px;
  left: auto;
}

.o2vend-whatsapp-float--left {
  left: 28px;
  right: auto;
}

.o2vend-whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 3px 10px rgba(37, 211, 102, 0.3);
}

.o2vend-whatsapp-float:focus-visible {
  outline: 2px solid var(--o2vend-whatsapp-green);
  outline-offset: 3px;
}

.o2vend-whatsapp-float__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.o2vend-whatsapp-float__icon svg {
  width: var(--o2vend-whatsapp-icon);
  height: var(--o2vend-whatsapp-icon);
}

.o2vend-whatsapp-float__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--o2vend-whatsapp-green);
  opacity: 0;
  animation: o2vend-whatsapp-pulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes o2vend-whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .o2vend-whatsapp-float {
    --o2vend-whatsapp-size: 48px;
    --o2vend-whatsapp-icon: 24px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .o2vend-whatsapp-float--right {
    right: 20px;
  }

  .o2vend-whatsapp-float--left {
    left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .o2vend-whatsapp-float {
    transition: none;
  }

  .o2vend-whatsapp-float:hover {
    transform: none;
  }

  .o2vend-whatsapp-float__pulse {
    animation: none;
    display: none;
  }
}

/* Product page WhatsApp order button */
.o2vend-whatsapp-product-order {
  --o2vend-whatsapp-green: #25d366;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 14px 0;
  padding: 12px 20px;
  border: 2px solid var(--o2vend-whatsapp-green);
  border-radius: 4px;
  background-color: #ffffff;
  color: var(--o2vend-whatsapp-green);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.o2vend-whatsapp-product-order:hover {
  background-color: var(--o2vend-whatsapp-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.o2vend-whatsapp-product-order:focus-visible {
  outline: 2px solid var(--o2vend-whatsapp-green);
  outline-offset: 2px;
}

.o2vend-whatsapp-product-order__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.o2vend-whatsapp-product-order__icon svg {
  width: 20px;
  height: 20px;
}

.o2vend-whatsapp-product-order__text {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .o2vend-whatsapp-product-order {
    width: 100%;
    min-height: 48px;
    margin: 12px 0;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .o2vend-whatsapp-product-order {
    transition: none;
  }
}
