/* ==========================================================================
   FAVOR — Official Floating WhatsApp Button (#25D366)
   Rendered across all public pages (marketing, storefront, product, checkout,
   invoice, articles, FAQ, contact, legal). Excluded on auth pages (/masuk,
   /daftar, password reset, email verification, /login).
   ========================================================================== */

.fv-wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 950;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: #25D366 !important;
  color: #FFFFFF !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.36), 0 4px 12px rgba(0, 0, 0, 0.24) !important;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease !important;
  -webkit-tap-highlight-color: transparent;
}

.fv-wa-float svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: #FFFFFF !important;
  flex-shrink: 0;
}

.fv-wa-float:hover {
  background-color: #20BD5A !important;
  color: #FFFFFF !important;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45), 0 6px 16px rgba(0, 0, 0, 0.28) !important;
}

.fv-wa-float:active {
  background-color: #1BA64E !important;
  color: #FFFFFF !important;
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32), 0 2px 6px rgba(0, 0, 0, 0.22) !important;
}

.fv-wa-float:focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: 3px !important;
}

/* Mobile safe positioning: stay clear of mobile bottom nav & sticky checkout CTA */
@media (max-width: 1023px) {
  .fv-wa-float {
    width: 52px;
    height: 52px;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .fv-wa-float svg {
    width: 28px;
    height: 28px;
  }

  /* Storefront & bare public pages have fixed mobile bottom navigation */
  body.tgz-page .fv-wa-float,
  body.ag-body--bare .fv-wa-float {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }

  /* Product / checkout pages with sticky bottom CTA bar */
  body.pp-has-sticky-cta .fv-wa-float {
    bottom: calc(138px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .fv-wa-float {
    transition: background-color 0.15s ease !important;
  }

  .fv-wa-float:hover,
  .fv-wa-float:active {
    transform: none !important;
  }
}
