canvas {
    margin-left: 1em;
    width: 100%;
    max-width: 100%;
    border: 1px solid #ccc;
    cursor: pointer;
}

#settings label,
#controls label {
    min-width: 10em;
    display: inline-block;
}

input[type="number"] {
    width: 4em;
}

input[type="range"] {
    width: 8em;
}

input[type="number"] {
    width: 4em;
}

input[type="range"] {
    width: 8em;
}

#container {
    margin-left: 1em;
}

#settings {
    padding: 1em;
    /*margin-top: 1em;*/
    background-color: #f0f0f0;
    border-radius: 5px;
    box-shadow: 0px 0px 3px 1px #878484;
    font-size: 0.9em;
}

/*#settings input[type="text"],
#settings input[type="number"],
#settings input[type="time"],
#settings select {
    min-width: 12em;
}*/

#settings label,
#controls label {
    min-width: 10em;
    display: inline-block;
    max-width: 12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


#settings label.compact,
#controls label.compact {
    min-width: auto;
    vertical-align: middle;
}

#settings .actions {
    text-align: center;
    /* margin-top: 0.2em; */
    padding-top: 1em;
}

input[type="number"] {
    width: 4em;
}

input[type="range"] {
    width: 8em;
}

.field {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.field.checkbox {
    margin-top: 0;
    margin-bottom: 0;
}

#settings input[type="checkbox"] {
    vertical-align: middle;
}

#settings label[for="desaturate"], 
.field.checkbox label {
    font-size: 0.95em;
    min-width: auto;
    vertical-align: middle;
}

#settings .tabbar label {
    max-width: none;
    min-width: auto;
}

#settings.whole-mode .field.floor-mode,
#settings.whole-mode .fieldset.floor-mode {
    display: none;
}
#object-info .close-btn {
    display: none;
}

.fieldset {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.fieldset h3 {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}

#room-light-intensity-field, #light-intensity-field {display: none}

ul#object-info, ul#small-screen-controls {
    display: inline-block;
    list-style-type: none;
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
    font-size: 0.95em;
    color: #555;
    min-height: 18.5px;
}

ul#small-screen-controls {
    display: none;
}

ul#small-screen-controls .control {
    cursor: pointer;
}

ul#object-info li, ul#small-screen-controls li {
    display: inline-block;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

ul#object-info li {
    display: inline-block;
    border-left: 1px solid #aaa;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

ul#object-info li label {
    /* margin-right: 0.5em; */
    font-weight: bold;
}

ul#object-info li .value {
    margin-left: 0.5em;
    /*margin-right: 0.5em;*/
}

ul#object-info li:first-of-type {
    padding-left: 0;
    margin: 0;
    border-left: 0 none;
}

ul#object-info li.type label {
    display: none;
}

ul#object-info li.type .value {
    margin-left: 0;
}

#object-info .close-btn {
    display: none;
}

#object-settings {
    display: inline-block;
    margin-left: 1em;
    padding-left: 1.5em;
    border-left: 1px solid #333;
    white-space: nowrap;
    max-width: 100%;
    overflow: scroll;
    line-height: 1;
    vertical-align: middle;
}

#object-settings .field {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 1em;
    vertical-align: middle;
}

#object-settings .field label {
    vertical-align: middle;
    margin-right: 0.5em;
}

/*#object-settings .color-field {
    width: 3em;
    height: 1em;
    display: inline-block;
    cursor: pointer;
}*/

#object-settings .color-field {
    display: inline-block;
    width: 3em;
    height: 1em;
    border: 1px solid #000;
    vertical-align: middle;
    cursor: pointer;
}

#settings .fieldset.room-lights {
    display: none;
}

#settings.has-room-lights .fieldset.room-lights {
    display: initial;
}

#settings .fieldset.lights {
    display: none;
}

#settings.has-lights .fieldset.lights {
    display: initial;
}

/* Smartphones (landscape) ----------- */

@media only screen and (max-width: 600px), (min-width: 320px) and (max-width: 767px)  and (orientation: landscape) {

    main aside {
        display: none;
        position: fixed;
        left: 10px;
        right: 10px;
    }

    main aside.visible {
        display: initial !important;
    }

    canvas#main {
        margin-left: 0.25px;
        margin-right: 0.25px;
    }

    ul#object-info {
        position: fixed;
        top: 120px;
        right: 0;
        height: 300px;
        width: 200px;
        background-color: #ffffffc7;
        padding: 1em;
        border: 1px solid #333;
        display: none;
    }

    ul#object-info.visible {
        display: block;
    }

    ul#object-info li {
        display: list-item;
        border-left: 0 none;
    }

    ul#object-info li:first-of-type {
        padding-left: initial;
    }

    ul#object-info li.type{
        padding-left: 0;
        padding-right: 0;
        text-align: center;
        font-weight: bold;
        margin-bottom: 0.7em;
        background-color: #eee;
        padding-bottom: 5px;
        padding-top: 5px;
    }

    #object-info .close-btn {
        position: absolute;
        right: 0.5em;
        /*top: 0.5em;*/
        background-color: #333;
        color: #fff;
        padding: 1px;
        border-radius: 8px;
        display: inline-block;
        width: 16px;
        height: 16px;
        line-height: 14px;
        vertical-align: middle;
        font-size: 16px;
        font-weight: bold;
    }

    ul#small-screen-controls {
        display: block;
    }

    ul#small-screen-controls .control {
        font-size: 2em;
        font-weight: bold;
    }

    ul#small-screen-controls .control.side-panel-toggle.active {
        color: #09acb9;
    }

    #settings {
        background-color: #f0f0f0c9;
        max-height: 65vh;
        overflow: auto;
        margin: auto;
        padding: 1em;
    }

    .field.configuration-widget {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: space-evenly;
    }

    #conf-field {
        max-width: 8em;
    }

    label[for="conf-field"] {
        display: none;
    }

}

@media only screen and (min-width: 320px) and (max-width: 767px)  and (orientation: landscape) {

    header {
        margin-bottom: 0.5em;
        padding-bottom: 0;
    }

    header h1{
        margin-top: 0.3em;
        margin-bottom: 0.3em;
    }

    header .left-header {
        display: grid;
        align-content: center;
        align-items: center;
    }

    header .left-header h1 {
        grid-column: 2;
        grid-row: 1;
    }

    ul#small-screen-controls {
        font-size: 0.8em;
        grid-column: 1;
        grid-row: 1;
    }

    nav.navigation-menu ul {
        margin-top: 0.25em;
        margin-bottom: 0.25em;
    }

    canvas#main {
        max-height: 73vh;
    }

}
