/* Cookie Bar Z-Index Fix */
/* Ensures cookie consent bar is always on top of everything */

/* Cookie bar always on top */
#cookieConsent,
.cookie-consent-bar {
    z-index: 2147483647 !important; /* Maximum possible z-index value */
    position: fixed !important;
}

/* Ensure all ads and other fixed elements stay below */
.adsbygoogle,
ins.adsbygoogle,
.google-auto-placed,
.adsbygoogle-noablate,
.ad-placement-mobile-anchor,
.sticky-ad,
.fixed-ad,
.bottom-ad,
[class*="ad-"],
[id*="google_ads"],
iframe[id*="google_ads"],
iframe[src*="doubleclick"],
iframe[src*="googlesyndication"] {
    z-index: 99 !important;
    max-z-index: 100 !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    #cookieConsent,
    .cookie-consent-bar {
        z-index: 2147483647 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
    
    /* When cookie bar is visible, push ads up */
    .cookie-consent-bar.show ~ .ad-placement-mobile-anchor,
    body.cookie-consent-visible .ad-placement-mobile-anchor {
        bottom: 100px !important; /* Adjust based on cookie bar height */
        transition: bottom 0.3s ease-out;
    }
}

/* Add margin to body when cookie bar is shown on mobile */
@media (max-width: 768px) {
    body.cookie-consent-visible {
        padding-bottom: 100px; /* Prevent content from being hidden */
    }
}