/* PressFly 20260627 - global sidebar/menu first-paint stability */
:root{
    --pf-admin-sidebar-stable-width:268px;
    --pf-admin-sidebar-mini-width:4.6rem;
    --pf-member-sidebar-stable-width:312px;
}
html.pf-layout-preload *,
body.pf-sidebar-preloading .main-sidebar,
body.pf-sidebar-preloading .content-wrapper,
body.pf-sidebar-preloading .main-header,
body.pf-sidebar-preloading .main-footer,
body.pf-sidebar-preloading .pf-member-sidebar,
body.pf-sidebar-preloading .pf-member-content,
body.pf-sidebar-preloading .pf-member-menu{
    transition:none!important;
    animation-duration:0s!important;
}

/* Admin panel: keep sidebar size fixed from first paint and prevent hover-expansion flicker. */
@media (min-width:768px){
    body.pf-admin-flat .main-sidebar,
    body.pf-admin-flat .main-sidebar::before{
        width:var(--pf-admin-sidebar-stable-width)!important;
        min-width:var(--pf-admin-sidebar-stable-width)!important;
        max-width:var(--pf-admin-sidebar-stable-width)!important;
    }
    body.pf-admin-flat .brand-link{
        width:var(--pf-admin-sidebar-stable-width)!important;
        max-width:var(--pf-admin-sidebar-stable-width)!important;
    }
    body.pf-admin-flat:not(.sidebar-collapse) .content-wrapper,
    body.pf-admin-flat:not(.sidebar-collapse) .main-header,
    body.pf-admin-flat:not(.sidebar-collapse) .main-footer{
        margin-left:var(--pf-admin-sidebar-stable-width)!important;
    }
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .main-sidebar,
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .main-sidebar::before,
    body.pf-admin-flat.sidebar-collapse .main-sidebar,
    body.pf-admin-flat.sidebar-collapse .main-sidebar::before,
    body.pf-admin-flat.sidebar-collapse .main-sidebar:hover,
    body.pf-admin-flat.sidebar-collapse .main-sidebar:hover::before,
    body.pf-admin-flat.sidebar-collapse .main-sidebar.sidebar-focused,
    body.pf-admin-flat.sidebar-collapse .main-sidebar.sidebar-focused::before{
        width:var(--pf-admin-sidebar-mini-width)!important;
        min-width:var(--pf-admin-sidebar-mini-width)!important;
        max-width:var(--pf-admin-sidebar-mini-width)!important;
    }
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .content-wrapper,
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .main-header,
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .main-footer,
    body.pf-admin-flat.sidebar-collapse .content-wrapper,
    body.pf-admin-flat.sidebar-collapse .main-header,
    body.pf-admin-flat.sidebar-collapse .main-footer{
        margin-left:var(--pf-admin-sidebar-mini-width)!important;
    }
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .brand-link,
    body.pf-admin-flat.sidebar-collapse .brand-link,
    body.pf-admin-flat.sidebar-collapse .main-sidebar:hover .brand-link,
    body.pf-admin-flat.sidebar-collapse .main-sidebar.sidebar-focused .brand-link{
        width:var(--pf-admin-sidebar-mini-width)!important;
        min-width:var(--pf-admin-sidebar-mini-width)!important;
        max-width:var(--pf-admin-sidebar-mini-width)!important;
        padding-left:0!important;
        padding-right:0!important;
        text-align:center!important;
    }
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .brand-link .brand-text,
    html.pf-admin-sidebar-collapsed-preload body.pf-admin-flat .nav-sidebar .nav-link p,
    body.pf-admin-flat.sidebar-collapse .brand-link .brand-text,
    body.pf-admin-flat.sidebar-collapse .nav-sidebar .nav-link p,
    body.pf-admin-flat.sidebar-collapse .main-sidebar:hover .brand-link .brand-text,
    body.pf-admin-flat.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p,
    body.pf-admin-flat.sidebar-collapse .main-sidebar.sidebar-focused .brand-link .brand-text,
    body.pf-admin-flat.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .nav-link p{
        max-width:0!important;
        width:0!important;
        opacity:0!important;
        visibility:hidden!important;
        overflow:hidden!important;
    }
    body.pf-admin-flat .sidebar,
    body.pf-admin-flat .os-host,
    body.pf-admin-flat .os-viewport,
    body.pf-admin-flat .os-content,
    body.pf-admin-flat .nav-sidebar{
        overflow-x:hidden!important;
        max-width:100%!important;
    }
}
@media (max-width:767.98px){
    body.pf-admin-flat .main-header,
    body.pf-admin-flat .content-wrapper,
    body.pf-admin-flat .main-footer{
        margin-left:0!important;
        width:100%!important;
        max-width:100%!important;
    }
    body.pf-admin-flat .main-sidebar,
    body.pf-admin-flat .main-sidebar::before{
        width:268px!important;
        min-width:268px!important;
        max-width:268px!important;
    }
    body.pf-admin-flat:not(.sidebar-open) .main-sidebar,
    body.pf-admin-flat.sidebar-collapse:not(.sidebar-open) .main-sidebar{
        margin-left:-268px!important;
        transform:none!important;
    }
    body.pf-admin-flat.sidebar-open .main-sidebar,
    body.pf-admin-flat.sidebar-collapse.sidebar-open .main-sidebar{
        margin-left:0!important;
        transform:none!important;
    }
}

/* Member/user panel: show desktop sidebar at its final width immediately; keep mobile collapsed cleanly. */
@media (min-width:992px){
    body[class*="member-"] .pf-member-layout{
        display:flex!important;
        flex-wrap:nowrap!important;
        align-items:flex-start!important;
        gap:0!important;
    }
    body[class*="member-"] .pf-member-sidebar{
        flex:0 0 var(--pf-member-sidebar-stable-width)!important;
        width:var(--pf-member-sidebar-stable-width)!important;
        min-width:var(--pf-member-sidebar-stable-width)!important;
        max-width:var(--pf-member-sidebar-stable-width)!important;
        padding-left:15px!important;
        padding-right:15px!important;
    }
    body[class*="member-"] .pf-member-content{
        flex:1 1 auto!important;
        width:calc(100% - var(--pf-member-sidebar-stable-width))!important;
        max-width:calc(100% - var(--pf-member-sidebar-stable-width))!important;
        min-width:0!important;
        padding-left:15px!important;
        padding-right:15px!important;
    }
    body[class*="member-"] .pf-member-menu-toggle{
        display:none!important;
    }
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse,
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse:not(.show){
        display:block!important;
        height:auto!important;
        visibility:visible!important;
        opacity:1!important;
    }
}
@media (min-width:768px) and (max-width:991.98px){
    body[class*="member-"] .pf-member-layout{display:block!important;}
    body[class*="member-"] .pf-member-sidebar,
    body[class*="member-"] .pf-member-content{
        width:100%!important;
        max-width:100%!important;
        flex:0 0 100%!important;
    }
    body[class*="member-"] .pf-member-menu-toggle{display:flex!important;}
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse:not(.show){display:none!important;}
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse.show,
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapsing{display:grid!important;}
}
@media (max-width:767.98px){
    body[class*="member-"] .pf-member-layout{display:block!important;}
    body[class*="member-"] .pf-member-sidebar,
    body[class*="member-"] .pf-member-content{
        width:100%!important;
        max-width:100%!important;
        flex:0 0 100%!important;
        min-width:0!important;
    }
    body[class*="member-"] .pf-member-menu-toggle{display:flex!important;}
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse:not(.show){display:none!important;}
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse.show,
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapsing{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        width:100%!important;
        max-width:100%!important;
        height:auto!important;
    }
}
@media (max-width:420px){
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapse.show,
    body[class*="member-"] #memberFlatMenu.pf-member-menu.collapsing{grid-template-columns:1fr!important;}
}

/* Front/top menu: prevent desktop navbar collapse flash and mobile menu width jumps. */
@media (min-width:992px){
    #navbarSupportedContent.collapse,
    #navbarSupportedContent.collapse:not(.show){
        display:flex!important;
        height:auto!important;
        visibility:visible!important;
        opacity:1!important;
    }
}
@media (max-width:991.98px){
    #navbarSupportedContent.collapse:not(.show){display:none!important;}
    #navbarSupportedContent.collapse.show,
    #navbarSupportedContent.collapsing{
        width:100%!important;
        max-width:100%!important;
        overflow:hidden!important;
    }
}


/* PressFly 20260627 - member sidebar wider and first-paint stable */
:root{--pf-member-sidebar-stable-width:312px;}
@media (min-width:1200px){
    body[class*="member-"] .pf-member-shell{max-width:1480px!important;}
    body[class*="member-"] .pf-member-sidebar{flex-basis:312px!important;width:312px!important;min-width:312px!important;max-width:312px!important;}
    body[class*="member-"] .pf-member-content{width:calc(100% - 312px)!important;max-width:calc(100% - 312px)!important;}
}
@media (min-width:992px) and (max-width:1199.98px){
    body[class*="member-"] .pf-member-shell{max-width:100%!important;}
    body[class*="member-"] .pf-member-sidebar{flex-basis:292px!important;width:292px!important;min-width:292px!important;max-width:292px!important;padding-left:12px!important;padding-right:12px!important;}
    body[class*="member-"] .pf-member-content{width:calc(100% - 292px)!important;max-width:calc(100% - 292px)!important;padding-left:10px!important;padding-right:10px!important;}
}

/* PressFly 20260627 - final admin sidebar natural page scroll and wider member menu */
:root{--pf-member-sidebar-stable-width:330px;--pf-admin-sidebar-stable-width:268px;}
@media (min-width:1200px){
    body[class*="member-"] .pf-member-sidebar{flex-basis:330px!important;width:330px!important;min-width:330px!important;max-width:330px!important;}
    body[class*="member-"] .pf-member-content{width:calc(100% - 330px)!important;max-width:calc(100% - 330px)!important;}
}
@media (min-width:992px) and (max-width:1199.98px){
    body[class*="member-"] .pf-member-sidebar{flex-basis:300px!important;width:300px!important;min-width:300px!important;max-width:300px!important;}
    body[class*="member-"] .pf-member-content{width:calc(100% - 300px)!important;max-width:calc(100% - 300px)!important;}
}
@media (min-width:768px){
    body.pf-admin-flat.layout-fixed,
    body.pf-admin-flat.layout-fixed .wrapper{
        min-height:100vh!important;
        height:auto!important;
        overflow-x:hidden!important;
    }
    body.pf-admin-flat.layout-fixed .main-sidebar,
    body.pf-admin-flat.layout-fixed .main-sidebar::before{
        position:absolute!important;
        top:0!important;
        bottom:auto!important;
        left:0!important;
        min-height:100%!important;
        height:auto!important;
        max-height:none!important;
        overflow:visible!important;
    }
    body.pf-admin-flat.layout-fixed .sidebar,
    body.pf-admin-flat.layout-fixed .os-host,
    body.pf-admin-flat.layout-fixed .os-host-overflow,
    body.pf-admin-flat.layout-fixed .os-host-overflow-y,
    body.pf-admin-flat.layout-fixed .os-padding,
    body.pf-admin-flat.layout-fixed .os-viewport,
    body.pf-admin-flat.layout-fixed .os-content,
    body.pf-admin-flat.layout-fixed .nav-sidebar{
        position:relative!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        overflow:visible!important;
    }
    body.pf-admin-flat.layout-fixed .sidebar{
        padding-bottom:34px!important;
        scrollbar-width:none!important;
    }
    body.pf-admin-flat.layout-fixed .sidebar::-webkit-scrollbar,
    body.pf-admin-flat.layout-fixed .os-scrollbar,
    body.pf-admin-flat.layout-fixed .os-scrollbar-vertical,
    body.pf-admin-flat.layout-fixed .os-scrollbar-horizontal{
        display:none!important;
        width:0!important;
        height:0!important;
    }
}
@media (max-width:767.98px){
    body.pf-admin-flat.layout-fixed .sidebar{height:auto!important;max-height:calc(100vh - 64px)!important;overflow-y:auto!important;}
}
