:root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 18px;
}

input[type='text'] {
    font-size: inherit;
}

#log {
    width: 30em;
    height: 20em;
    overflow: auto;
    margin: 0.5em 0;

    border: 1px solid black;
}

#status {
    padding: 0 0.2em;
}

#text {
    width: 17em;
    padding: 0.5em;
}

.msg {
    margin: 0;
    padding: 0.25em 0.5em;
}

.msg--status {
    /* a light yellow */
    background-color: #ffffc9;
}

.msg--message {
    /* a light blue */
    background-color: #d2f4ff;
}

.msg--error {
    background-color: pink;
}


button {
    margin: 10px 20px 25px 0;
    vertical-align: top;
    width: 134px;
}

table {
    margin: 200px 10px 0 0;
}

textarea {
    color: #444;
    font-size: 0.9em;
    font-weight: 300;
    height: 20.0em;
    padding: 5px;
    width: calc(100% - 10px);
}

div#getUserMedia {
    padding: 0 0 8px 0;
}

div.input {
    display: inline-block;
    margin: 0 4px 0 0;
    vertical-align: top;
    width: 310px;
}

div.input > div {
    margin: 0 0 20px 0;
    vertical-align: top;
}

div.output {
    background-color: #eee;
    display: inline-block;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 10px 10px 10px 25px;
    position: relative;
    top: 10px;
    white-space: pre;
    width: 270px;
}

div.label {
    display: inline-block;
    font-weight: 400;
    width: 120px;
}

div.graph-container {
    background-color: #ccc;
    float: left;
    margin: 0.5em;
    width: calc(50% - 1em);
}

div#preview {
    border-bottom: 1px solid #eee;
    margin: 0 0 1em 0;
    padding: 0 0 0.5em 0;
}

div#preview > div {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 12px);
}

section#statistics div {
    display: inline-block;
    font-family: 'Inconsolata', 'Courier New', monospace;
    vertical-align: top;
    width: 308px;
}

section#statistics div#senderStats {
    margin: 0 20px 0 0;
}

section#constraints > div {
    margin: 0 0 20px 0;
}

h2 {
    margin: 0 0 1em 0;
}

section#constraints label {
    display: inline-block;
    width: 156px;
}

section {
    margin: 0 0 20px 0;
    padding: 0 0 15px 0;
}

video {
    background: #222;
    margin: 0 0 0 0;
    --width: 100%;
    width: var(--width);
    height: 225px;
    transform: rotateY(180deg);
}

@media screen and (max-width: 720px) {
    button {
        font-weight: 500;
        height: 56px;
        line-height: 1.3em;
        width: 90px;
    }

    div#getUserMedia {
        padding: 0 0 40px 0;
    }

    section#statistics div {
        width: calc(50% - 14px);
    }
}

