﻿@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
video {
    width: 100%;
    max-width: 500px;
    height: auto;
}


.app {
    width: 100%;
    min-height: 200px;
}

    .app #start-camera {
        display: none;
        border-radius: 3px;
        max-width: 100%;
        height: auto;
        max-height: auto;
        color: #fff;
        background-color: #448AFF;
        text-decoration: none;
        padding: 15px;
        opacity: 0.8;
        margin: 50px auto;
        text-align: center;
    }

    .app video#camera-stream {
        display: none;
        width: 100%;
        height: auto;
        max-height: auto;
    }

    .app img#snap {
        position: absolute;
        top: 0;
        left: 0%;
        width: 100%;
        height: auto;
        max-height: auto;
        z-index: 10;
        display: none;
    }

    .app #error-message {
        width: 100%;
        background-color: #ccc;
        color: #9b9b9b;
        font-size: 28px;
        padding: 200px 100px;
        text-align: center;
        display: none;
    }

    .app .controls {
        position: absolute;
        bottom: 1px;
        left: 10%;
        width: 80%;
        height: 100%;
        height: auto;
        max-height: auto;
        z-index: 20;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        padding: 30px;
        display: none;

    }

        .app .controls a {
            border-radius: 50%;
            color: #fff;
            background-color: #111;
            text-decoration: none;
            padding: 15px;
            line-height: 0;
            opacity: 0.7;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }

            .app .controls a:hover {
                opacity: 1;
            }

            .app .controls a.disabled {
                background-color: #555;
                opacity: 0.5;
                cursor: default;
                pointer-events: none;
            }

                .app .controls a.disabled:hover {
                    opacity: 0.5;
                }

            .app .controls a i {
                font-size: 18px;
            }

        .app .controls #take-photo i {
            font-size: 32px;
        }

    .app canvas {
        display: none;
        width: 100%;
        min-height: 200px;
        overflow:hidden;
    }

.parent {
    display: flex;
    justify-content: center;
    align-items: center;
}

.child {
    display: inline-block;
}

    .app video#camera-stream.visible,
    .app img#snap.visible,
    .app #error-message.visible {
        display: inline-block;
    }

    .app .controls.visible {
        display: flex;
    }



@media(max-width: 1000px) {
    .container {
        margin: 40px;
    }

    .app #start-camera.visible {
        display: block;
    }

    .app .controls a i {
        font-size: 16px;
    }

    .app .controls #take-photo i {
        font-size: 24px;
    }
}


@media(max-width: 600px) {
    .container {
        margin: 10px;
    }

    .app #error-message {
        padding: 80px 50px;
        font-size: 18px;
    }

    .app .controls a i {
        font-size: 12px;
    }

    .app .controls #take-photo i {
        font-size: 18px;
    }
    .app .controls {
        left: 0;
        width: 100%;
    }
