﻿@import "icono.min.css";

body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: calibri, sans-serif;
    font-size: 14px;
    line-height: 1.2em;
}

* {
    box-sizing: border-box;
}

//Debug

#scene-explorer-host {
    & + div {
        position: relative;
    }
}

//WebGL Viewer
.webglViewer {
    position: relative;
    overflow: hidden;
    background-color: rgba(0,0,0,.6);

    > div {
        overflow: hidden;
    }

    #scene-explorer-host, #inspector-host {
        overflow: unset;
    }

    .webglViewerLoader {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all ease-in .3s;
        opacity: 0;
        visibility: hidden;
        touch-action: none;
        background-color: #FFF;
        z-index: 9000;

        p {
            font-size: 1.4rem;
        }

        &.show {
            transition: none;
            opacity: 1;
            visibility: visible;
            // touch-action: all;
            //display: flex;
        }
    }

    .webglViewerCanvas {
        height: 100%;
        width: 100%;
        transition: all ease-in .3s;
        outline: none;
        touch-action: none;
    }

    .webglViewerControls {
        padding: 15px;
        position: absolute;
        top: 30px;
        left: 30px;
        display: flex;
        width: 200px;
        flex-direction: column;
        border-radius: 5px;
        background-color: #adadad;

        .control {
            display: flex;
            flex-direction: column;

            .label {
                margin: .5rem 0rem;
                font-weight: bold;
                font-size: 1.4rem;
                line-height: 1.4rem;
            }

            .select, .input {
                margin: 0.25rem 0rem;
                padding: .75rem .25rem;
                border: 0 none;
            }

            .checkbox {
                display: block;
                position: relative;
                padding-left: 40px;
                margin-bottom: 5px;
                cursor: pointer;
                font-size: 1.4rem;
                line-height: 2rem;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;

                input {
                    position: absolute;
                    opacity: 0;
                    cursor: pointer;
                    height: 0;
                    width: 0;
                }

                .checkmark {
                    position: absolute;
                    top: 0;
                    left: 0;
                    height: 25px;
                    width: 25px;
                    background-color: #eee;

                    &:after {
                        content: "";
                        position: absolute;
                        display: none;
                        left: 9px;
                        top: 5px;
                        width: 5px;
                        height: 10px;
                        border: solid white;
                        border-width: 0 3px 3px 0;
                        -webkit-transform: rotate(45deg);
                        -ms-transform: rotate(45deg);
                        transform: rotate(45deg);
                    }

                    &.icon {
                        opacity: 0.2;
                        background-color: transparent;
                        transition: all ease-in .3s;

                        &:after {
                            border: none;
                        }
                    }
                }

                &:hover input ~ .checkmark {
                    background-color: #ccc;

                    &.icon {
                       // opacity: 1;
                        background-color: transparent;
                    }
                }

                input:checked ~ .checkmark {
                    background-color: #2196F3;

                    &.icon {
                        opacity: 1;
                        background-color: transparent;
                    }
                }

                input:checked ~ .checkmark:after {
                    display: block;
                }
            }
        }

        button {
            margin: 5px;
            padding: 8px 24px;
            flex: 1 0 auto;
        }
    }

    .webglViewerInfo {
        padding: 20px;
        background-color: rgba(60,60,60,1);
        color: #FFF;
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 400px;
        transition: all ease-in .3s;
        opacity: 0;
        transform: translate(400px,0);

        &__header {
            margin-bottom: 30px;
            font-size: 2.5em;
        }

        &__body {
            margin-bottom: 30px;
            font-size: 1.1em;
            line-height: 1em;
        }

        &__back {
            a, button {
                padding: 10px 18px;
                background-color: rgba(40,40,40,1);
                color: #FFF;
                border: 0 none;
                text-decoration: none;

                &:hover {
                    background-color: rgba(50,50,50,1);
                }
            }
        }
    }

    &.showInfo {
        .webglViewerCanvas {
            transform: translate(-200px,0);
        }

        .webglViewerInfo {
            opacity: 1;
            transform: translate(0px,0);
        }
    }
}
