/* Modern Forum 1.1.11: opt-in geometry for standard XenForo 1.5 styles.
 * The base sheet leaves the selected style's logo/header dimensions intact.
 * This sheet is loaded only for the Standard XenForo layout profile.
 */
/* Some XenForo 1 themes absolutely position the selected tab's secondary
 * navigation without reserving its height. JavaScript measures only a real
 * overlap and supplies the extra clearance through this variable. Themes
 * that already reserve the sub-navigation space remain unchanged. */
.oafModernStandard #content.forum_list .pageContent {
    padding-top: calc(10px + var(--oaf-standard-subnav-clearance, 0px)) !important;
}

.oafModernStandard #content.forum_list .oafQuickActions {
    box-sizing: border-box;
    margin: 0 0 12px;
    position: static;
    width: 100%;
    right: auto;
    top: auto;
    z-index: auto;
}

.oafModernStandard #content.forum_list .oafQuickAction {
    box-sizing: border-box;
    height: auto !important;
    min-width: 0;
    white-space: normal;
}

.oafModernStandard #content.forum_list .sidebar::before {
    display: none;
}

@media (min-width: 801px) {
    /* Keep the editorial Featured Work heading in Standard mode too. OAF's
     * customized forum_list still uses this heading, and hiding it made the
     * lead item look detached from the rest of the forum hierarchy. */
    .oafModernStandard #content.forum_list .mainContent > .ctaFtTitleForumList,
    .oafModernStandard #content.forum_list .mainContent > .oafFeaturedHeading {
        display: block !important;
    }

    /* Render the server-side quick-action row directly over the sidebar column
     * from first paint. This avoids the late JavaScript move/clone that caused
     * New Posts / Submit Work to visibly snap into place after navigation. */
    .oafModernStandard.oafModernQuickActions #content.forum_list .oafQuickActions--early {
        display: flex !important;
        margin: 0 !important;
        position: absolute !important;
        right: 20px !important;
        top: calc(18px + var(--oaf-standard-subnav-clearance, 0px)) !important;
        width: 250px !important;
        z-index: 2;
    }

    /* A server-rendered sidebar copy may still exist as a fallback for unusual
     * templates. Keep that duplicate out of layout while the early row is used. */
    .oafModernStandard #content.forum_list .sidebar .oafQuickActions--sidebar {
        display: none !important;
    }

    /* Reserve exactly the row's height so the first real sidebar block begins
     * below it immediately, with no post-load layout shift. */
    .oafModernStandard.oafModernQuickActions #content.forum_list .sidebar::before {
        content: "";
        display: block !important;
        height: 42px;
        margin: 8px 0 10px;
        visibility: hidden;
    }

    .oafModernStandard.oafStandardNoSidebar #content.forum_list .oafQuickActions--early {
        margin: 0 0 12px !important;
        position: static !important;
        width: 100% !important;
    }

    .oafModernStandard.oafStandardNoSidebar #content.forum_list .sidebar::before {
        display: none !important;
    }

    .oafModernStandard #content.forum_list .mainContent > .ctaFtContainer,
    .oafModernStandard #content.forum_list .mainContent > .ctaFtBlock,
    .oafModernStandard #content.forum_list .mainContent > .featuredWork,
    .oafModernStandard #content.forum_list .mainContent > .featuredThread {
        margin-top: 0 !important;
    }

}

@media (max-width: 800px) {
    /* Keep actions near the top when XenForo hides or stacks the sidebar. */
    .oafModernStandard #content.forum_list .oafQuickActions--early {
        display: flex !important;
    }

    .oafModernStandard #content.forum_list .sidebar .oafQuickActions {
        display: none !important;
    }
}
