<script>
(function () {
const checkoutUrl = "https://checkout.dinaandagnes.com/checkout/creator-asset-pack?ee_id=U1R_5PPRglafvelydc9bi";
const showAfterScroll = 600;
const styles = document.createElement("style");
styles.innerHTML = `
#cap-floating-btn {
position: fixed !important;
right: 24px !important;
bottom: 24px !important;
z-index: 2147483647 !important;
height: 48px !important;
padding: 0 24px !important;
border: 0 !important;
border-radius: 999px !important;
background: #02E482 !important;
color: #ffffff !important;
font-family: Inter, Arial, sans-serif !important;
font-size: 15px !important;
font-weight: 800 !important;
cursor: pointer !important;
box-shadow: 0 14px 34px rgba(0,0,0,.26) !important;
white-space: nowrap !important;
opacity: 0 !important;
visibility: hidden !important;
transform: translateY(12px) scale(1) !important;
pointer-events: none !important;
transition: opacity .28s ease, transform .28s ease, visibility .28s ease, box-shadow .28s ease !important;
}
#cap-floating-btn.cap-visible {
opacity: 1 !important;
visibility: visible !important;
transform: translateY(0) scale(1) !important;
pointer-events: auto !important;
}
#cap-floating-btn .cap-btn-inner {
display: flex !important;
align-items: center !important;
gap: 10px !important;
transform: scale(1);
}
#cap-floating-btn .cap-icon {
font-size: 18px !important;
line-height: 1 !important;
}
#cap-floating-btn.cap-pulse .cap-btn-inner {
animation: cap-real-pulse .65s ease-in-out !important;
}
#cap-floating-btn.cap-pulse {
box-shadow: 0 18px 46px rgba(2,228,130,.46) !important;
}
@keyframes cap-real-pulse {
0% { transform: scale(1); }
45% { transform: scale(1.07); }
100% { transform: scale(1); }
}
@media (hover: hover) and (pointer: fine) {
#cap-floating-btn.cap-visible:hover {
transform: translateY(0) scale(1.03) !important;
box-shadow: 0 16px 38px rgba(0,0,0,.30) !important;
}
}
#cap-popup-overlay {
position: fixed !important;
inset: 0 !important;
z-index: 2147483646 !important;
display: none !important;
align-items: center !important;
justify-content: center !important;
background: rgba(9,12,25,.78) !important;
backdrop-filter: blur(3px) !important;
}
#cap-popup-overlay.active {
display: flex !important;
}
#cap-popup {
width: min(92vw, 620px) !important;
height: min(88vh, 860px) !important;
background: #ffffff !important;
border-radius: 14px !important;
overflow: hidden !important;
box-shadow: 0 30px 90px rgba(0,0,0,.45) !important;
}
#cap-popup iframe {
width: 100% !important;
height: 100% !important;
border: 0 !important;
display: block !important;
}
#cap-close {
position: fixed !important;
top: 22px !important;
right: 30px !important;
z-index: 2147483647 !important;
border: 0 !important;
background: transparent !important;
color: #ffffff !important;
font-size: 42px !important;
cursor: pointer !important;
}
@media (max-width: 640px) {
#cap-floating-btn {
right: 18px !important;
bottom: 22px !important;
height: 46px !important;
padding: 0 22px !important;
font-size: 15px !important;
}
#cap-popup-overlay {
display: none !important;
}
}
`;
const button = document.createElement("button");
button.id = "cap-floating-btn";
button.type = "button";
button.innerHTML = `
<span class="cap-btn-inner">
<span class="cap-icon">✦</span>
<span>Creator Asset Pack</span>
</span>
`;
const overlay = document.createElement("div");
overlay.id = "cap-popup-overlay";
overlay.innerHTML = `
<button id="cap-close" type="button">×</button>
<div id="cap-popup">
<iframe src="${checkoutUrl}" title="Creator Asset Pack Checkout"></iframe>
</div>
`;
document.head.appendChild(styles);
document.body.appendChild(button);
document.body.appendChild(overlay);
function toggleFloatingButton() {
if (window.scrollY > showAfterScroll) {
button.classList.add("cap-visible");
} else {
button.classList.remove("cap-visible");
}
}
function pulseButton() {
if (!button.classList.contains("cap-visible")) return;
button.classList.add("cap-pulse");
setTimeout(function () {
button.classList.remove("cap-pulse");
}, 700);
}
window.addEventListener("scroll", toggleFloatingButton, { passive: true });
window.addEventListener("load", toggleFloatingButton);
toggleFloatingButton();
setInterval(pulseButton, 10000);
button.addEventListener("click", function () {
if (window.innerWidth <= 640) {
window.location.href = checkoutUrl;
return;
}
overlay.classList.add("active");
document.body.style.overflow = "hidden";
});
overlay.addEventListener("click", function (e) {
if (e.target.id === "cap-popup-overlay" || e.target.id === "cap-close") {
overlay.classList.remove("active");
document.body.style.overflow = "";
}
});
})();
</script>