html, body
{
    height: 100%;
    margin: 0;

    background: ${preloader.backgroundColorTop};
    background: -moz-linear-gradient(top, ${preloader.backgroundColorTop}, ${preloader.backgroundColorBottom} 100%);
    background: -webkit-linear-gradient(top, ${preloader.backgroundColorTop}, ${preloader.backgroundColorBottom} 100%);
    background: linear-gradient(to bottom, ${preloader.backgroundColorTop}, ${preloader.backgroundColorBottom} 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='${preloader.backgroundColorTop}', endColorstr='${preloader.backgroundColorBottom}', GradientType=0);
}

div.loadingBackground
{
    position: absolute;
    /*
        div needs to stay on top of the page before bundle.js is loaded.
        there is a "absolute" - collision between this div and .cpSlotGame
     */
    z-index: 1;
    height: 100%;
    width: 100%;

    background-image: url("../resources/multigem-machine/bitmaps/splash.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

@media screen and (orientation: portrait)
{
    div.loadingBackground
    {
        background-size: contain;
    }
}

.preloader
{
    position: absolute;
    height: 30px;
    width: calc(100% - 32px);
    left: 16px;
    bottom: 16px;
    z-index: 9999;
    border-radius: 7px;
    text-shadow: 1px 2px 1px #000;
}

.preloader > .loaded, .preloader > .not_loaded
{
    position: absolute;
    box-sizing: border-box;
    border: 3px solid #ff4200;
    height: 100%;
    border-radius: 7px;
}

.preloader > .loadText
{
    font-size: 0;
}

.preloader > .loaded
{
    width: 0;
    transition: width .3s linear;

    background: #9cd8fe;
    background: -moz-linear-gradient(top, #9cd8fe 0%, #002aff 100%);
    background: -webkit-linear-gradient(top, #9cd8fe 0%, #002aff 100%);
    background: linear-gradient(to bottom, #9cd8fe 0%, #002aff 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9cd8fe', endColorstr='#002aff', GradientType=0);
}

.preloader > .not_loaded
{
    width: 100%;
    background-color: #170125;
}

@media only screen and (max-width: 709px), screen and (max-height: 499px)
{
    .preloader
    {
        border-radius: 5px;
    }

    .preloader > .loaded, .preloader > .not_loaded
    {
        border-radius: 5px;
        border-width: 2px;
    }

    .preloader
    {
        height: 20px;
    }

    @media (orientation: portrait)
    {
        .preloader
        {
            height: 50px;
        }
    }
}

.complete .preloader
{
    animation: loadingComplete 1.8s;
}

@keyframes loadingComplete
{
    0%, 15%
    {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }

    30%
    {
        box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.5);
    }

    100%
    {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
}

.hide .preloader:after
{
    font-family: 'Montserrat', sans-serif;
    display: block;
    content: attr(label-text);
    animation: tabToStart 1.3s infinite;
    text-align: center;
    font-size: 25px;
    font-weight: bold;
    color: white;
}

.hide .preloader .loaded, .hide .preloader .not_loaded{
    display: none;
}

@keyframes tabToStart
{
    0%, 50%
    {
        opacity: 1;
    }
    51%, 99%
    {
        opacity: 0;
    }
}
