/**
 * WeGreen Ads CSS
 * 
 * Sticky footer ad styles and other ad-related styling
 * 
 * @package WeGreen
 * @since 1.0.0
 */

/* Ad Container Styles */
.wegreen-ad-container {
    margin: 10px auto;
    text-align: center;
    clear: both;
}

/* Sticky Click Top Ads - Fixed at top of page */
.sticky-click-top-ads {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: #fff;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-click-top-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10000;
}

.sticky-click-top-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.sticky-click-top-close svg {
    width: 12px;
    height: 12px;
    fill: #666;
}

.sticky-click-top-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.sticky-click-top-content ins {
    width: 100% !important;
    height: 130px !important;
    max-height: 130px !important;
    display: block !important;
}

/* Responsive adjustments for sticky click top */
@media (max-width: 768px) {
    .sticky-click-top-ads {
        height: 120px;
    }
    
    .sticky-click-top-content {
        padding: 5px;
    }
    
    .sticky-click-top-content ins {
        height: 110px !important;
        max-height: 110px !important;
    }
}

@media (max-width: 480px) {
    .sticky-click-top-ads {
        height: 100px;
    }
    
    .sticky-click-top-close {
        top: 5px;
        right: 10px;
        width: 20px;
        height: 20px;
    }
    
    .sticky-click-top-close svg {
        width: 10px;
        height: 10px;
    }
    
    .sticky-click-top-content {
        padding: 5px;
    }
    
    .sticky-click-top-content ins {
        height: 90px !important;
        max-height: 90px !important;
    }
}

/* Body padding adjustment when sticky top ad is present */
body.has-sticky-top-ad {
    padding-top: 150px;
}

@media (max-width: 768px) {
    body.has-sticky-top-ad {
        padding-top: 120px;
    }
}

@media (max-width: 480px) {
    body.has-sticky-top-ad {
        padding-top: 100px;
    }
}

/* Sticky Footer Ad Styles - Matching Floating Ads Bottom Plugin */
#floating_ads_bottom_container {
    position: fixed;
    bottom: 10px;
    width: 100%;
    z-index: 9999;
    min-height: 90px;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    max-height: 100px !important;
}

#floating_ads_bottom_wrap {
    text-align: center;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

#floating_ads_bottom_ad {
    display: inline-block;
    width: 100%;
    max-width: 728px;
    min-width: 320px; 
}

#floating_ads_bottom_ad ins {
    width: 100% !important;
    min-width: 320px !important;
    min-height: 90px !important;
    display: block !important;
}

/* Responsive adjustments for sticky footer */
@media (max-width: 768px) {
    #floating_ads_bottom_ad {
        max-width: 468px;
        min-height: 60px;
    }
    
    #floating_ads_bottom_ad ins {
        min-height: 60px !important;
    }
}

@media (max-width: 480px) {
    #floating_ads_bottom_ad {
        max-width: 320px;
        min-width: 320px;
        max-height: 120px;
        min-height: 100px;
    }
    
    #floating_ads_bottom_ad ins {
        width: 320px !important;
        height: 100px !important;
        min-width: 320px !important;
        max-height: 120px !important;
    }
}

/* Legacy sticky ads styles - kept for backward compatibility */
.sticky-ads { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 100px !important; 
    padding: 0; 
    box-shadow: 0 -6px 18px 0 rgba(9,32,76,.1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: #fefefe; 
    z-index: 9999; 
} 

.sticky-ads-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10000;
} 

.sticky-ads-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.sticky-ads-close svg {
    width: 12px;
    height: 12px;
    fill: #666;
}

.sticky-ads .sticky-ads-close svg { 
    width: 22px; 
    height: 22px; 
    fill: #000; 
} 

.sticky-ads .sticky-ads-content { 
    overflow: hidden; 
    display: block; 
    position: relative; 
    height: 100px !important; 
    width: 100%; 
    margin: 0 10px; 
}

/* Body padding to prevent content overlap - removed as floating ads plugin doesn't use this */
/* body.has-sticky-footer-ad {
    padding-bottom: 100px;
} */

/* Responsive adjustments */
@media (max-width: 768px) {
    .sticky-ads {
        height: 100px !important;
    }
    
    .sticky-ads .sticky-ads-content {
        height: 100px !important;
    }
    
    .sticky-ads-close {
        top: 5px;
        right: 10px;
        width: 20px;
        height: 20px;
    }
    
    .sticky-ads-close svg {
        width: 10px;
        height: 10px;
    }
    
    .sticky-ads .sticky-ads-close svg {
        width: 18px;
        height: 18px;
    }
    
    body.has-sticky-footer-ad {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .sticky-ads {
        height: 100px !important;
    }
    
    .sticky-ads .sticky-ads-content {
        height: 100px !important;
    }
    
    body.has-sticky-footer-ad {
        padding-bottom: 100px;
    }
}