/**
 * DIRECT THREE-COLUMN OVERRIDE
 * 
 * This CSS file uses extremely high specificity selectors and !important declarations
 * to ensure the 3-column layout is applied regardless of other CSS.
 * 
 * ABSOLUTE MAXIMUM PRIORITY IMPLEMENTATION - June 2025
 *  * Version: 1750551899
 */

/* CREATOR COMMUNITY NEWSFEED LAYOUT - FLEXBOX APPROACH *  * Version: 1750551899
 */
body.creator-community-newsfeed,
body.creator-community-newsfeed *,
body.creator-community-newsfeed *::before,
body.creator-community-newsfeed *::after {
    box-sizing: border-box !important;
}

/* Reset all BuddyBoss containers *  * Version: 1750551899
 */
body.creator-community-newsfeed #content,
body.creator-community-newsfeed .container,
body.creator-community-newsfeed .content-area,
body.creator-community-newsfeed .site-content-grid,
body.creator-community-newsfeed .bb-grid,
body.creator-community-newsfeed .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Force layout to use flexbox with highest specificity *  * Version: 1750551899
 */
html body.creator-community-newsfeed .layout,
body.creator-community-newsfeed div.layout,
body.creator-community-newsfeed main .layout,
body.creator-community-newsfeed #content .layout,
body.creator-community-newsfeed .site-content .layout,
body.creator-community-newsfeed .content-area .layout,
body.creator-community-newsfeed .bb-grid .layout,
#page body.creator-community-newsfeed .layout,
.site-content body.creator-community-newsfeed .layout,
.content-area body.creator-community-newsfeed .layout,
.bb-grid body.creator-community-newsfeed .layout,
body.creator-community-newsfeed div.layout[style],
.layout[style] {
    display: flex !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

/* Left sidebar - fix width and position *  * Version: 1750551899
 */
html body.creator-community-newsfeed .left-sidebar,
body.creator-community-newsfeed div.left-sidebar,
body.creator-community-newsfeed main .left-sidebar,
body.creator-community-newsfeed #content .left-sidebar,
body.creator-community-newsfeed .site-content .left-sidebar,
body.creator-community-newsfeed .content-area .left-sidebar,
body.creator-community-newsfeed .bb-grid .left-sidebar,
#page body.creator-community-newsfeed .left-sidebar,
body.creator-community-newsfeed div.left-sidebar[style],
.layout .left-sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    flex: 0 0 260px !important;
    background-color: white !important;
    padding: 20px !important;
    border-right: 1px solid #e5e7eb !important;
    height: 100% !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Main content - flexible width *  * Version: 1750551899
 */
html body.creator-community-newsfeed .main-content,
body.creator-community-newsfeed div.main-content,
body.creator-community-newsfeed main .main-content,
body.creator-community-newsfeed #content .main-content,
body.creator-community-newsfeed .site-content .main-content,
body.creator-community-newsfeed .content-area .main-content,
body.creator-community-newsfeed .bb-grid .main-content,
#page body.creator-community-newsfeed .main-content,
body.creator-community-newsfeed div.main-content[style],
.layout .main-content {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important; /* CRITICAL for flexbox child to prevent overflow *  * Version: 1750551899
 */
    background-color: #f8fafc !important;
    padding: 20px 40px !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Right sidebar - fix width and position *  * Version: 1750551899
 */
html body.creator-community-newsfeed .right-sidebar,
body.creator-community-newsfeed div.right-sidebar,
body.creator-community-newsfeed main .right-sidebar,
body.creator-community-newsfeed #content .right-sidebar,
body.creator-community-newsfeed .site-content .right-sidebar,
body.creator-community-newsfeed .content-area .right-sidebar,
body.creator-community-newsfeed .bb-grid .right-sidebar,
#page body.creator-community-newsfeed .right-sidebar,
body.creator-community-newsfeed div.right-sidebar[style],
.layout .right-sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
    background-color: white !important;
    padding: 20px !important;
    border-left: 1px solid #e5e7eb !important;
    height: 100% !important;
    position: sticky !important;
    top: 0 !important;
    right: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Right sidebar white background extension *  * Version: 1750551899
 */
html body.creator-community-newsfeed .right-sidebar::after,
body.creator-community-newsfeed div.right-sidebar::after,
body.creator-community-newsfeed main .right-sidebar::after,
body.creator-community-newsfeed #content .right-sidebar::after,
body.creator-community-newsfeed .site-content .right-sidebar::after,
body.creator-community-newsfeed .content-area .right-sidebar::after,
body.creator-community-newsfeed .bb-grid .right-sidebar::after,
#page body.creator-community-newsfeed .right-sidebar::after,
body.creator-community-newsfeed div.right-sidebar[style]::after,
.layout .right-sidebar::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    width: 100vw !important; /* Extend all the way *  * Version: 1750551899
 */
    height: 100% !important;
    background-color: white !important;
    z-index: -1 !important;
    display: block !important;
}

/* Post content fix *  * Version: 1750551899
 */
html body.creator-community-newsfeed .newsfeed-post,
body.creator-community-newsfeed .newsfeed-post {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    margin-bottom: 25px !important;
}

html body.creator-community-newsfeed .post-voting,
body.creator-community-newsfeed .post-voting {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    flex: 0 0 70px !important;
}

html body.creator-community-newsfeed .post-content,
body.creator-community-newsfeed .post-content {
    flex: 1 !important;
    min-width: 0 !important; /* Critical for preventing overflow *  * Version: 1750551899
 */
    width: auto !important;
}

/* Fix for text overflow *  * Version: 1750551899
 */
html body.creator-community-newsfeed .post-title,
html body.creator-community-newsfeed .post-body,
body.creator-community-newsfeed .post-title,
body.creator-community-newsfeed .post-body {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    width: 100% !important;
}

/* RESPONSIVE ADJUSTMENTS *  * Version: 1750551899
 */
@media (max-width: 1200px) {
    html body.creator-community-newsfeed .layout,
    body.creator-community-newsfeed .layout {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
    }
    
    html body.creator-community-newsfeed .left-sidebar,
    html body.creator-community-newsfeed .right-sidebar,
    body.creator-community-newsfeed .left-sidebar,
    body.creator-community-newsfeed .right-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        position: static !important;
    }
    
    html body.creator-community-newsfeed .right-sidebar::after,
    body.creator-community-newsfeed .right-sidebar::after {
        display: none !important;
    }
    
    html body.creator-community-newsfeed .main-content,
    body.creator-community-newsfeed .main-content {
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    html body.creator-community-newsfeed .layout,
    body.creator-community-newsfeed .layout {
        padding: 15px !important;
        gap: 15px !important;
    }
    
    html body.creator-community-newsfeed .newsfeed-actions,
    body.creator-community-newsfeed .newsfeed-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    html body.creator-community-newsfeed .post-voting,
    body.creator-community-newsfeed .post-voting {
        min-width: 60px !important;
        width: 60px !important;
    }
}

/* BuddyBoss container override *  * Version: 1750551899
 */
html body.creator-community-newsfeed #content .container,
body.creator-community-newsfeed #content .container {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Fix for BuddyBoss theme specific issues *  * Version: 1750551899
 */
html body.creator-community-newsfeed .site-content .content-area,
body.creator-community-newsfeed .site-content .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Force layout to be visible *  * Version: 1750551899
 */
html body.creator-community-newsfeed .layout *,
body.creator-community-newsfeed .layout * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Extra layer of protection against conflicting styles *  * Version: 1750551899
 */
html body.creator-community-newsfeed [style*="display"],
body.creator-community-newsfeed [style*="display"] {
    display: initial !important;
}

html body.creator-community-newsfeed .layout[style*="display"],
body.creator-community-newsfeed .layout[style*="display"] {
    display: flex !important;
}

html body.creator-community-newsfeed .left-sidebar[style*="width"],
html body.creator-community-newsfeed .right-sidebar[style*="width"],
body.creator-community-newsfeed .left-sidebar[style*="width"],
body.creator-community-newsfeed .right-sidebar[style*="width"] {
    width: 260px !important;
    min-width: 260px !important;
}

/* Ensure forum layout also uses this approach *  * Version: 1750551899
 */
html body.page-community-forum .forum-three-column-container,
body.page-community-forum .forum-three-column-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

html body.page-community-forum .forum-sidebar,
body.page-community-forum .forum-sidebar {
    width: 280px !important;
    min-width: 280px !important;
    flex: 0 0 280px !important;
}

html body.page-community-forum .forum-middle-column,
body.page-community-forum .forum-middle-column {
    flex: 1 !important;
    min-width: 0 !important;
}

html body.page-community-forum .forum-right-column,
body.page-community-forum .forum-right-column {
    width: 280px !important;
    min-width: 280px !important;
    flex: 0 0 280px !important;
}