/* Modern Forum 1.2.4 maintenance fixes.
 * Component geometry only. Ordinary XenForo presentation remains style-owned.
 */


/* XenForo 1 themes may absolutely position the selected secondary nav.
 * The main Modern Forum script measures the real overlap on every page;
 * consume that clearance everywhere, not only on Forum Home. */
.oafModernStandard #content .pageContent {
    padding-top:calc(10px + var(--oaf-standard-subnav-clearance, 0px))!important;
}

/* Forum-home visitor card is replaced by the header account UI. */
.oafModernQuickActions #content.forum_list .sidebar .visitorPanel,
.oafModernQuickActions #content.forum_list .sidebar #visitorPanel,
.oafModernQuickActions #content.forum_list .sidebar .oafVisitorPanelHidden {
    display:none!important;
}

/* Compact visitor utilities retain native links/counters; the injected SVG is
 * the visible label. */
.oafModernCompactNavIcons .oafNavUsername { display:none!important; }
.oafModernCompactNavIcons .navTabs .visitorTabs .oafNavUtility {
    box-sizing:border-box; min-width:40px!important; width:40px!important;
}
.oafModernCompactNavIcons .navTabs .visitorTabs .oafNavUtility > .oafNavUtilityLink {
    align-items:center; box-sizing:border-box; display:flex!important;
    font-size:0!important; height:100%; justify-content:center;
    min-width:40px!important; padding-left:0!important; padding-right:0!important; width:40px!important;
}
.oafModernCompactNavIcons .navTabs .visitorTabs .oafNavUtility .itemCount { font-size:10px!important; }
.oafModern .oafNavAvatar {
    display:inline-block; flex:0 0 28px; height:28px; margin:0 6px 0 0;
    object-fit:cover; vertical-align:middle; width:28px;
}

/* Never paint the old custom primary-row Search tab. The 1.2.4 compatibility
 * script re-homes XenForo's native #searchBar after the parser completes. */
.oafModernNavSearch .navTabs .oafSearchTab { display:none!important; }

/* Native Quick Search, placed at the right side of the selected secondary row. */
.oafModernNavSearch .navTabs .navTab.selected .tabLinks.oafSubNavSearchHost {
    overflow:visible!important;
}
.oafModernNavSearch .navTabs .navTab.selected .tabLinks.oafSubNavSearchHost .blockLinksList {
    box-sizing:border-box; margin-right:285px!important;
}
.oafModernNavSearch #searchBar.oafSubNavSearch {
    box-sizing:border-box; display:block!important; height:34px!important;
    left:auto!important; margin:0!important; max-width:none!important;
    padding:0!important; position:absolute!important; right:16px!important;
    top:4px!important; width:250px!important; z-index:80!important;
}
.oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearch {
    box-sizing:border-box; display:block; margin:0!important; padding-top:0!important;
    position:absolute!important; right:0!important; top:0!important; width:250px!important;
}
.oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearchQuery {
    box-sizing:border-box; height:32px; margin:0!important; width:250px!important;
}
.oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearch.active {
    padding-top:5px!important;
}

/* Keep the early quick-action fallback in markup for customized templates, but
 * do not let it paint before the normal sidebar copy is confirmed. */
.oafModernStandard #content.forum_list .oafQuickActions--early { display:none!important; }

@media (max-width:1100px) and (min-width:801px) {
    .oafModernNavSearch .navTabs .navTab.selected .tabLinks.oafSubNavSearchHost .blockLinksList {
        margin-right:230px!important;
    }
    .oafModernNavSearch #searchBar.oafSubNavSearch,
    .oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearch,
    .oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearchQuery {
        width:200px!important;
    }
}

@media (max-width:800px) {
    .oafModernNavSearch .navTabs .navTab.selected .tabLinks.oafSubNavSearchHost .blockLinksList {
        margin-right:48px!important;
    }
    .oafModernNavSearch #searchBar.oafSubNavSearch {
        right:8px!important; top:4px!important; width:36px!important;
    }
    .oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearch {
        right:0!important; width:260px!important;
    }
    .oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearchPlaceholder {
        display:block!important; right:0!important; top:8px!important;
    }
    .oafModernNavSearch #searchBar.oafSubNavSearch #QuickSearch.show {
        display:block!important;
    }
}
