/*
 * PPSF Fullscreen Layout
 * Keeps the game independent from WordPress theme width, header, footer,
 * breadcrumbs, sidebars and page-builder spacing.
 */
:root{
    --ppsf-viewport-offset:0px;
}

/* The stylesheet is enqueued only on PPSF screens, so these root resets are safe. */
html{
    width:100%!important;
    max-width:none!important;
    min-height:100%!important;
    margin:0!important;
    padding:0!important;
    background:#030d18!important;
    overflow-x:hidden!important;
}

body.ppsf-standalone-template #ppsf-fullscreen-root{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    margin:0!important;
    padding:0!important;
    overflow-x:clip!important;
    background:#030d18!important;
}

body.ppsf-standalone-template #ppsf-fullscreen-root > *{
    width:100%!important;
    max-width:none!important;
    margin-right:0!important;
    margin-left:0!important;
}

body.admin-bar.ppsf-fullscreen-page{
    --ppsf-viewport-offset:32px;
}

body.ppsf-fullscreen-page{
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
    background:#030d18!important;
}

body.ppsf-fullscreen-page,
body.ppsf-fullscreen-page #page,
body.ppsf-fullscreen-page .website-wrapper,
body.ppsf-fullscreen-page .site,
body.ppsf-fullscreen-page .site-content,
body.ppsf-fullscreen-page .main-page-wrapper,
body.ppsf-fullscreen-page .page-wrapper{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
}

/* Woodmart, WordPress core and common theme chrome. */
body.ppsf-fullscreen-page .whb-header,
body.ppsf-fullscreen-page .top-bar,
body.ppsf-fullscreen-page #masthead,
body.ppsf-fullscreen-page > .site-header,
body.ppsf-fullscreen-page #page > .site-header,
body.ppsf-fullscreen-page .main-header,
body.ppsf-fullscreen-page .page-title,
body.ppsf-fullscreen-page .page-title-default,
body.ppsf-fullscreen-page .breadcrumbs,
body.ppsf-fullscreen-page .woocommerce-breadcrumb,
body.ppsf-fullscreen-page .wd-prefooter,
body.ppsf-fullscreen-page .woodmart-prefooter,
body.ppsf-fullscreen-page #colophon,
body.ppsf-fullscreen-page > .site-footer,
body.ppsf-fullscreen-page #page > .site-footer,
body.ppsf-fullscreen-page .footer-container,
body.ppsf-fullscreen-page .copyrights-wrapper,
body.ppsf-fullscreen-page #secondary,
body.ppsf-fullscreen-page .sidebar-container,
body.ppsf-fullscreen-page .wd-sidebar,
body.ppsf-fullscreen-page .scrollToTop{
    display:none!important;
}

/* Remove theme/page-builder width and whitespace without touching plugin cards. */
body.ppsf-fullscreen-page .main-page-wrapper,
body.ppsf-fullscreen-page .site-content,
body.ppsf-fullscreen-page .content-layout-wrapper,
body.ppsf-fullscreen-page .content-area,
body.ppsf-fullscreen-page .site-main,
body.ppsf-fullscreen-page article.page,
body.ppsf-fullscreen-page article.ppsf_case,
body.ppsf-fullscreen-page .entry-content,
body.ppsf-fullscreen-page .wp-block-post-content,
body.ppsf-fullscreen-page .elementor-location-single,
body.ppsf-fullscreen-page .elementor-location-archive,
body.ppsf-fullscreen-page .elementor-section-wrap,
body.ppsf-fullscreen-page .wpb-content-wrapper,
body.ppsf-fullscreen-page .wp-site-blocks{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
}

body.ppsf-fullscreen-page .main-page-wrapper > .container,
body.ppsf-fullscreen-page .site-content > .container,
body.ppsf-fullscreen-page .content-layout-wrapper > .container,
body.ppsf-fullscreen-page .elementor-section.elementor-section-boxed > .elementor-container,
body.ppsf-fullscreen-page .e-con.e-con-boxed > .e-con-inner{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
}

body.ppsf-fullscreen-page .wp-block-group.has-global-padding,
body.ppsf-fullscreen-page .wp-block-group.is-layout-constrained,
body.ppsf-fullscreen-page .wpb-content-wrapper > .vc_row,
body.ppsf-fullscreen-page .vc_row > .vc_column_container,
body.ppsf-fullscreen-page .vc_column_container > .vc_column-inner,
body.ppsf-fullscreen-page .vc_column-inner > .wpb_wrapper,
body.ppsf-fullscreen-page .elementor-widget-shortcode > .elementor-widget-container{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
}

body.ppsf-fullscreen-page .content-layout-wrapper,
body.ppsf-fullscreen-page .row.content-layout-wrapper{
    display:block!important;
}

body.ppsf-fullscreen-page .entry-header,
body.ppsf-fullscreen-page .post-single-page .entry-header,
body.ppsf-fullscreen-page .article-inner > .entry-header{
    display:none!important;
}

/* Landing/archive screen. */
body.ppsf-fullscreen-archive-page .ppsf-archive{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
}

body.ppsf-fullscreen-archive-page .ppsf-archive-inner{
    width:100%!important;
    max-width:none!important;
    min-height:inherit;
}

body.ppsf-fullscreen-archive-page .ppsf-standalone-leaderboard{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    margin:0!important;
    padding:clamp(20px,4vw,56px)!important;
    border-radius:0!important;
    box-shadow:none!important;
}

/* Individual case/game screen. */
body.ppsf-fullscreen-case-page .ppsf-game-shell{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
}

body.ppsf-fullscreen-case-page .ppsf-members-gate,
body.ppsf-fullscreen-case-page .ppsf-notice{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    margin:0!important;
    border-radius:0!important;
    box-shadow:none!important;
}

body.ppsf-fullscreen-case-page .ppsf-members-gate{
    display:flex!important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

body.ppsf-fullscreen-case-page .ppsf-notice{
    display:grid;
    place-items:center;
    text-align:center;
}

body.ppsf-fullscreen-case-page .ppsf-start-screen,
body.ppsf-fullscreen-case-page .ppsf-play-screen,
body.ppsf-fullscreen-case-page .ppsf-result-screen,
body.ppsf-fullscreen-case-page .ppsf-start-grid{
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
}

body.ppsf-fullscreen-case-page .ppsf-play-screen{
    padding-bottom:max(28px, env(safe-area-inset-bottom))!important;
}

/* Dedicated community/profile/league pages. */
body.ppsf-fullscreen-community-page #ppsf-fullscreen-root{
    min-height:calc(100dvh - var(--ppsf-viewport-offset))!important;
    padding:clamp(16px,3vw,44px)!important;
    background:
        radial-gradient(circle at 12% 10%,rgba(85,230,193,.12),transparent 26%),
        radial-gradient(circle at 88% 88%,rgba(98,112,255,.12),transparent 30%),
        #030d18!important;
}

body.ppsf-fullscreen-community-page .ppsf-club-card,
body.ppsf-fullscreen-community-page .ppsf-community-strip,
body.ppsf-fullscreen-community-page .ppsf-duel-banner{
    width:min(1280px,100%)!important;
    max-width:none!important;
    margin-right:auto!important;
    margin-left:auto!important;
}

/* Phones with notches and browser UI. */
@media(max-width:782px){
    body.admin-bar.ppsf-fullscreen-page{
        --ppsf-viewport-offset:46px;
    }
}

@media(max-width:680px){
    body.ppsf-fullscreen-archive-page .ppsf-archive,
    body.ppsf-fullscreen-archive-page .ppsf-standalone-leaderboard,
    body.ppsf-fullscreen-case-page .ppsf-game-shell,
    body.ppsf-fullscreen-case-page .ppsf-start-screen,
    body.ppsf-fullscreen-case-page .ppsf-play-screen,
    body.ppsf-fullscreen-case-page .ppsf-result-screen{
        border-radius:0!important;
    }
}

/* Fallback for browsers without dynamic viewport units. */
@supports not (height:100dvh){
    body.ppsf-fullscreen-page,
    body.ppsf-fullscreen-page #page,
    body.ppsf-fullscreen-page .website-wrapper,
    body.ppsf-fullscreen-page .site,
    body.ppsf-fullscreen-page .site-content,
    body.ppsf-fullscreen-page .main-page-wrapper,
    body.ppsf-fullscreen-page .page-wrapper,
    body.ppsf-standalone-template #ppsf-fullscreen-root,
    body.ppsf-fullscreen-archive-page .ppsf-archive,
    body.ppsf-fullscreen-case-page .ppsf-game-shell,
    body.ppsf-fullscreen-case-page .ppsf-start-screen,
    body.ppsf-fullscreen-case-page .ppsf-play-screen,
    body.ppsf-fullscreen-case-page .ppsf-result-screen,
    body.ppsf-fullscreen-case-page .ppsf-start-grid,
    body.ppsf-fullscreen-case-page .ppsf-members-gate,
    body.ppsf-fullscreen-case-page .ppsf-notice{
        min-height:calc(100vh - var(--ppsf-viewport-offset))!important;
    }
}
