/* Modern, Responsive Banner Styling */
.promo-banner-container {
position: fixed;
bottom: 20px;
right: 20px;
max-width: 400px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0,0,0,0.15);
z-index: 99999;
padding: 20px;
font-family: sans-serif;
border-left: 5px solid #25d366; /* Match your brand accent color here */
}
.promo-banner-content {
position: relative;
}
.promo-close-btn {
position: absolute;
top: -10px;
right: -5px;
font-size: 22px;
cursor: pointer;
color: #888;
}
.promo-close-btn:hover {
color: #000;
}
.promo-text-section h3 {
margin: 0 0 8px 0;
font-size: 18px;
color: #222;
}
.promo-text-section p {
margin: 0 0 15px 0;
font-size: 14px;
color: #555;
line-height: 1.4;
}
.promo-signin-btn {
display: inline-block;
background-color: #000000;
color: #ffffff !important;
text-decoration: none;
padding: 10px 20px;
border-radius: 4px;
font-weight: bold;
font-size: 14px;
text-align: center;
width: 100%;
box-sizing: border-box;
transition: background 0.2s ease;
}
.promo-signin-btn:hover {
background-color: #333333;
}
/* Mobile optimization */
@media (max-width: 480px) {
.promo-banner-container {
bottom: 0;
right: 0;
left: 0;
max-width: 100%;
border-radius: 0;
border-left: none;
border-top: 5px solid #25d366;
}
}
// JavaScript to handle custom cookie logic
document.addEventListener("DOMContentLoaded", function() {
// Check if user has already dismissed or accepted the offer
if (!localStorage.getItem("hide_promo_discount")) {
// Delayed display for better user experience (2 seconds)
setTimeout(function() {
document.getElementById("promo-cookie-banner").style.display = "block";
}, 2000);
}
});
function closePromoBanner() {
document.getElementById("promo-cookie-banner").style.display = "none";
// Set a flag to hide it for 7 days
localStorage.setItem("hide_promo_discount", "true");
}
function trackPromoClick() {
// Hide the banner permanently once they head to the sign-in page
localStorage.setItem("hide_promo_discount", "true");
}