/*
 * ============================================================
 * AUSTRALIA GRID - FRONT PAGE SCREEN FIT V1
 *
 * Force ONLY the public front-page artwork to fit exactly
 * inside the current browser/viewer viewport.
 *
 * Do not alter the background used by other PHP pages.
 * ============================================================
 */


html {

    width:100%;

    min-width:0;

    margin:0;

    padding:0;
}


body.australia-home-page,
body.ag-frontpage,
body.australia-home-page.ag-frontpage {

    /*
     * IMPORTANT:
     *
     * 100% auto made the background taller than wide-screen
     * browser windows.
     *
     * Use the actual viewport width AND viewport height so the
     * complete Australia artwork remains on-screen.
     */

    background-size:
        var(
            --ag-site-frontpage-background-size,
            100vw 100vh
        ) !important;

    background-position:
        var(
            --ag-site-frontpage-background-position,
            center center
        ) !important;

    background-repeat:
        no-repeat !important;

    background-attachment:
        fixed !important;

    background-color:
        var(--site-background, #000) !important;

    min-height:
        100vh !important;
}


/*
 * Modern browsers expose dynamic viewport height.
 * Firestorm/CEF browsers that do not support it simply use
 * the 100vh rule above.
 */

@supports (height: 100dvh) {

    body.australia-home-page,
    body.ag-frontpage,
    body.australia-home-page.ag-frontpage {

        background-size:
            var(
                --ag-site-frontpage-background-size-dynamic,
                100vw 100dvh
            ) !important;

        min-height:
            100dvh !important;
    }
}


/*
 * Do not allow the background setup itself to create a
 * horizontal scrollbar.
 */

html,
body.australia-home-page,
body.ag-frontpage {

    max-width:
        100vw;

    overflow-x:
        hidden;
}
