/*html {
    background: url(../background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}*/

html, body {
    touch-action: pan-y;
    margin: 0;
    padding: 0;
    color: #000;
    background: #000;
    background-color: #000;
    height: 100vh;
    height: -webkit-fill-available;
    height: fill-available;
}

#swipeToFullscreen {
    display: none;
    top: -200px;
    width: 100%;
    height: 130vh;
    z-index: 696969;
    position: absolute;
    background: white;
    opacity: 0.75;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
}

@media screen and (orientation: landscape) {
    #swipeToFullscreen {
        height: 500vh !important;
    }

    #fullscreenTrick {
        height: 300vh !important;
    }
}

#swipeIcon {
    display: none;
    width: 100%;
    height: 100%;
    z-index: 696970;
    position: fixed;
    align-items: center;
    justify-content: center;
}

@media screen and (orientation:portrait) {
    #swipeIcon > img {
        width: 80%;
    }
}

@media screen and (orientation:landscape) {
    #swipeIcon > img {
        width: 35%;
    }
}

#fullscreenTrick {
    height: 150vh;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
}

html, body {
    position: relative !important;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

body {
    /*overflow: hidden;*/
    will-change: transform;
    -webkit-user-select: none;
}

#image-holder {
    z-index: -10000;
    height: 100vh;
    width: 100vw;
    position: fixed;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

    #image-holder img {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
        margin: auto;
        -webkit-touch-callout: none; /* iOS Safari */
        -webkit-user-select: none; /* Safari */
        -khtml-user-select: none; /* Konqueror HTML */
        -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
        user-select: none; /* Non-prefixed version, currently
                              supported by Chrome, Edge, Opera and Firefox */
    }


.centerAlignCanvas {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* #region canvas */
/* Safari for iOS fix (for fullscreen on 1st tap handler) */
canvas:not(.responsiveButton) {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    position: absolute !important;
    max-height: 100%;
    -webkit-user-select: none;
}

canvas::selection {
    color: rgba(0, 0, 0, 0);
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0 auto;
    max-height: 100vh; /* Fix overflow wider screens like landscape iPhone X, Galaxy S10 etc */
    -webkit-user-select: none;
}

.icon-bar {
    margin: auto;
    width: 100vw;
    background-color: rgba(85, 85, 85, 0);
    overflow: auto;
    visibility: hidden;
    bottom: 0;
}

    .icon-bar button {
        float: left;
        width: 14.28%;
        text-align: center;
        padding: 4px 0;
        transition: all 0.3s ease;
        color: #FFF;
        background-color: rgba(17, 57, 108, 0.32);
        font-size: 16px;
        font-size: 2vw;
        border: none;
    }

        .icon-bar button:hover {
            color: #000;
            background-color: #328af8;
        }

#buttonWrapper {
    width: 100vw;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0;
}

.lock-screen {
    height: 100vh;
    overflow: hidden;
    width: 100vw;
    position: fixed;
}


#rotationWarning {
    text-align: center;
    height: 100vh;
    width: 100vw;
    background-color: white;
    z-index: 100000;
    position: absolute;
    opacity: 0.6;
    position: fixed;
    overflow: hidden;
    pointer-events: none;
}

#rotationIcon {
    max-height: 100vh;
    max-width: 100vw;
    width: 200px;
    height: 200px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

@media screen and (orientation: landscape) {
    #rotationWarning {
        display: none;
    }
}

#overlay {
    position: absolute;
    width: 100vw;
    height: 150vh;
    top: 0;
    left: 0;
    right: 0px;
    bottom: 0px;
    margin: 0;
    padding: 0;
    z-index: 100001;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;
    display: block;
    background-color: rgba(255,255,255, 0);
}

#bgOverlay {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: rgba(255,255,255,0.75);
    z-index: 100000;
}

#swipe {
    width: 20vw;
    margin-top: 20vh;
    margin-left: 40vw;
    text-align: center;
    display: block;
}

#toggleFullscreen {
    display: none;
}

/* #endregion */


/* #region Media queries*/

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) and (orientation: portrait) {
    #loading #splashDiv {
        width: 45% !important;
        margin-top: -25% !important;
    }

    .floatTop {
        padding-top: 10% !important;
    }

    .floatBottom {
        padding-bottom: 10% !important;
    }
}

@media (max-width: 575.98px) and (orientation: landscape) {
    #loading #splashDiv {
        width: 30% !important;
        margin-top: -5% !important;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (min-width: 576px) and (max-width: 767.98px) and (orientation: portrait) {
    #loading #splashDiv {
        width: 45% !important;
        margin-top: -25% !important;
    }

    .floatTop {
        padding-top: 5% !important;
    }

    .floatBottom {
        padding-bottom: 5% !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) and (orientation: landscape) {
    #loading #splashDiv {
        width: 30% !important;
        margin-top: -5% !important;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    #loading #splashDiv {
        width: 30% !important;
        margin-top: -5% !important;
    }
}

/* Large devices (desktops, less than 1200px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #loading #splashDiv {
        width: 28% !important;
    }

        #loading #splashDiv .splashElementsContainer #progress {
            height: 10px;
            font-size: 10px;
            font-weight: bolder;
        }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    #loading #splashDiv {
        width: 30% !important;
    }

        #loading #splashDiv .splashElementsContainer #progress {
            height: 10px;
            font-size: 10px;
            font-weight: bolder;
        }
}

/* #endregion */


/* #region Keyframes */
@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Firefox < 16 */
@-moz-keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Internet Explorer */
@-ms-keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Opera < 12.1 */
@-o-keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glowing {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

@-moz-keyframes glowing {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

@-webkit-keyframes glowing {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}
/* #endregion */

/* #region Responsive buttons */

#floatBottom, #floatTop {
    /*z-index: 2000;
    position: fixed;*/
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    overflow: hidden;
    /*height: 100%;*/
    width: 100%;
    max-height: 100%;
    grid-column: 1/4;
}

#floatLeft, #floatRight {
    /*z-index: 2000;
    position: fixed;*/
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    overflow: hidden;
    /*height: 100%;*/
    width: 100%;
    max-height: 100%;
}

.floatMiddle {
    /*z-index: 2000;
    position: fixed;*/
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    overflow: hidden;
    -webkit-user-select: none;
}


.responsiveButton {
    position: relative;
    display: block;
    top: 0px;
    bottom: 0px;
    /*margin: auto;*/
    left: 0;
    right: 0;
}
/* #endregion */

#outerGrid {
    display: none;
    grid-template-rows: 0.5fr 2fr 0.5fr;
    grid-template-columns: 1fr;
    gap: 1px 1px;
    grid-template-areas: "." "." ".";
    width: 100%;
    height: 100%;
}

#innerGrid {
    display: grid;
    grid-template-columns: 0.5fr 2fr 0.5fr;
    grid-template-rows: 1fr;
    gap: 1px 1px;
    grid-template-areas: ". . .";
    width: 100%;
    height: 100%;
}

#grid {
    display: none;
    grid-template-columns: 0fr 0fr 0fr;
    grid-template-rows: 0fr 0fr 0fr;
    grid-gap: 1px;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

#debug {
    color: white;
    position: fixed;
    background-color: black;
    font-family: monospace;
    font-size: x-small;
    z-index: 300000;
    opacity: 0.75;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

:root {
    --sat: env(safe-area-inset-top);
    --sar: env(safe-area-inset-right);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
}

/*.grid {
    display: grid;
    grid-gap: 1px;
    grid-template-columns: fit-content(100%);
    width: 100%;
    height: 100%;
}*/
