/* ============================================
   MODE CRYPTO CLUB - CSS FIXES
   Site: https://modecryptoclub.com
   Date: December 17, 2025
   Issues Fixed: 4 responsive issues, overflow problems
   ============================================ */

/* === MOBILE OVERFLOW FIXES === */

/* Fix consent overlay positioning */
#_cm-css-reset,
[id*="cm-cookie"],
.cookie-consent-overlay {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Prevent any element from causing horizontal scroll */
body {
    overflow-x: hidden;
}

/* Fix long URLs in Privacy/Terms pages (MCC-001) */
a {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Privacy/Terms page specific */
.privacy-policy-content a,
.terms-content a,
.entry-content a,
.post-content a {
    word-break: break-all;
    hyphens: auto;
}

/* Responsive tables in legal pages */
.entry-content table,
.post-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* === AD SPACING & PADDING === */

/* Ezoic Ad Containers - Add breathing room */
[id*="ezoic-pub-ad-placeholder"],
[id*="ezoic-ad"],
.ezoic-ad,
.ez-video-wrap,
.ezoic-floating-bottom {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    padding: 10px 0 !important;
}

/* Ezoic in-content ads - More spacing */
.ezoic-ad-adaptive {
    margin: 24px auto !important;
    padding: 12px 0 !important;
}

/* Taboola Feed Containers */
[id*="taboola-"],
.taboola-container,
.trc_rbox {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    padding: 16px 0 !important;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Google AdSense */
.adsbygoogle,
ins.adsbygoogle {
    margin: 20px auto !important;
    display: block;
}

/* Generic Ad Wrappers */
.ad-container,
.advertisement,
.ad-wrapper,
.ad-unit {
    margin: 20px 0 !important;
    padding: 10px 0 !important;
}

/* Sidebar Ads */
.sidebar [id*="ezoic"],
.widget-area [id*="ezoic"],
aside [id*="ezoic"] {
    margin-bottom: 20px !important;
}

/* Footer Sticky Ads - Give content room to breathe */
.ezoic-floating-bottom,
.adace-slot-wrapper[data-slot-position="sticky-footer"] {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* === CONTENT SEPARATION === */

/* Add visual separator before in-content ads */
.entry-content > [id*="ezoic"]:not(:first-child)::before,
.post-content > [id*="ezoic"]:not(:first-child)::before {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin-bottom: 15px;
}

/* Ensure paragraphs have proper spacing around ads */
.entry-content p + [id*="ezoic"],
.entry-content [id*="ezoic"] + p {
    margin-top: 24px;
}

/* List items near ads */
.entry-content ul + [id*="ezoic"],
.entry-content ol + [id*="ezoic"] {
    margin-top: 20px;
}

.entry-content [id*="ezoic"] + ul,
.entry-content [id*="ezoic"] + ol {
    margin-top: 20px;
}

/* === MOBILE-SPECIFIC OPTIMIZATIONS === */

@media screen and (max-width: 768px) {
    /* Prevent ad overflow */
    [id*="ezoic"],
    [id*="taboola-"],
    .adsbygoogle,
    iframe[id*="google_ads"] {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Tighter ad margins on mobile */
    [id*="ezoic-pub-ad-placeholder"],
    .ezoic-ad {
        margin: 15px auto !important;
        padding: 8px 0 !important;
    }

    /* Taboola responsive fix */
    [id*="taboola-"] {
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

/* === MOBILE SMALL (320px) FIXES === */

@media screen and (max-width: 320px) {
    /* Fix horizontal overflow at 320px */
    * {
        max-width: 100% !important;
    }

    /* Ensure all containers respect viewport */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}
