/*
 * This file is part of YunWebUI.
 *
 * YunWebUI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * As a special exception, you may use this file as part of a free software
 * library without restriction.  Specifically, if other files instantiate
 * templates or use macros or inline functions from this file, or you compile
 * this file and link it with other files to produce an executable, this
 * file does not by itself cause the resulting executable to be covered by
 * the GNU General Public License.  This exception does not however
 * invalidate any other reasons why the executable file might be covered by
 * the GNU General Public License.
 *
 * Copyright 2013 Arduino LLC (http://www.arduino.cc/)
 */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* GENERIC */

select {
    margin-top: .3125em;
}

a {
    color: #0087b1;
}

p {
    margin-bottom: 1.5em;
}

div p:last-child {
    margin-bottom: 0;
}

.highlight {
    background: #d2ecf0;
    color: #555;
    padding: .5em .8em;
}

.highlight.alert {
    background: #ffd0bf;
    color: #491b0e;
    padding: .5em .8em;
}

ul {
    list-style: none;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.wrapper {
    position: relative;
    padding: 2em;
}

.divide {
    border-bottom: 1px solid #ddd;
    clear: both;
}

.img_container {
    padding-bottom: 0;
}

.clear {
    clear: both;
}

.nomargin {
    margin: 0 !important;
}

.req {
    color: #0087b1;
    font-size: 1.2em;
    line-height: .1em;
}

.left {
    float: left;
}

li {
    margin-bottom: 1.25em;
}

ul li:last-child {
    margin-bottom: 0;
}

input.error {
    background-color: #fee3e2;
    border: 1px solid #c37676;
}

body {
    background-color: #0087b1;
    color: #222;
    font: 1em/1.4em "Lucida Grande", Lucida, Verdana, sans-serif;
}

html {
    background: #0087b1;
}

h1 {
    font-size: 3em;
    font-weight: bold;
    text-transform: uppercase;
    display: none;
}

h2 {
    text-transform: uppercase;
    margin-bottom: .1em;
    font: normal 1.125em "Lucida Grande", Lucida, Verdana, sans-serif;
}

h3 {
    text-transform: uppercase;
    margin-bottom: .6em;
    font: normal 1em "Lucida Grande", Lucida, Verdana, sans-serif;
}

img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

label {
    font-size: .75em;
    margin-bottom: .6125em;
    display: block;
    color: #666;
    text-transform: uppercase;
}

label.left {
    padding: .525em .525em .525em 0;
    margin-right: 1em;
}

label.title {
    padding-right: 0;
    font-weight: bold;
    color: #333;
    float: none;
    font-size: .875em;
    margin-bottom: 0;
}

textarea {
    width: 96%;
    font-family: "Courier New", Courier, mono;
    font-size: .9em;
    padding: 2%;
    -webkit-overflow-scrolling: touch;
}

#header {
    color: #FFF;
    width: 30%;
    float: left;
    text-align: right;
}

#logo {
    margin: 0 auto;
    width: 8.5em;
}

#logophone {
    display: none;
}

#content {
    width: 70%;
    float: left;
    background: #f5f5f5;
    position: relative;
    z-index: 2;
}

#error_response {
    padding: 0 0 1em 0;
    margin-bottom: 2em;
    color: #c37676;
}

.error_container {
    padding: 0 0 1em 0;
    margin-bottom: 0em;
    color: #c37676 !important;
    font-size: .875em;
    padding-bottom: 0;
}

.input_message {
    padding-top: 0.35em;
    font-size: .85em;
    color: #666;
}

input[type="checkbox"] {
    -webkit-appearance: checkbox;
    margin-top: 2px;
}

input[type="radio"] {
    -webkit-appearance: radio;
    margin-top: 2px;
    width: auto !important;
}

.radio_container label {
    width: auto;
    float: none;
    display: inline-block;
    margin-right: 1.25em;
}

.input_container input {
    font: .875em "Lucida Grande", Lucida, Verdana, sans-serif;
    color: #444;
    border: 1px solid #ddd;
    padding: 1%;
    width: 98%;
}

.checkbox_container {
    float: left;
    width: 100px;
    padding: .5125em 0;
}

input.submit {
    -webkit-appearance: none;
    display: block;
    padding: .5125em;
    border: 1px solid #ddd;
    margin: 0;
    width: 97.5%;
    color: #555;
    text-transform: uppercase;
    font: .95em "Lucida Grande", Lucida, Verdana, sans-serif;
    border-radius: 3px;
    cursor: pointer;
    height: 38px;
}

input.submit.saveForm {
    border: 1px solid #037691;
    box-shadow: 0 3px 0 #037691;
    background: #0087b1;
    color: #FFF;
    font: .95em "Lucida Grande", Lucida, Verdana, sans-serif;
    width: 100%;
}

input.submit.saveForm.btn {
    border: 1px solid #bbb;
    box-shadow: 0 3px 0 #bbb;
    background: #ddd;
    color: #000;
}

input.submit.saveForm.btn:hover {
    background-color: #eaeaea;
}

input.submit.saveForm.btn:active {
    background-color: #cdcbcb;
}

input.submit.saveForm.alert {
    border: 1px solid #b61717;
    box-shadow: 0 3px 0 #b61717;
    color: #fff;
    background-color: #dd5927;
}

input.submit.saveForm.alert:hover {
    background-color: #f9713e;
}

input.submit.saveForm.alert:active {
    background-color: #c44617;
}

input.submit.saveForm.green {
    border: 1px solid #2c9257;
    box-shadow: 0 3px 0 #2c9257;
    color: #fff;
    background-color: #32ab66;
}

input.submit.saveForm.green:hover {
    background-color: #51c883;
}

input.submit.saveForm.green:active {
    background-color: #2c9257;
}

/* CONFIG PANEL */

a.info_link {
    display: inline-block;
    width: 15px;
    height: 15px;
    text-indent: -999em;
    color: transparent;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QcKDQoet9HfnwAAAXpJREFUKM910z1rFUEchfHfXW8hBiyiBGwshDRKRIQUwjBTqI2N4EuTSgQtBAuxEL+HSBrtLIIKigiSCLLLgp1IGrmgwUIElSgiiQlEY/O/MazXU+3smWdm95yZnlDdtFDhMGZwBGNYxkvMlZyW6qZVclI3rV5AsBezOBvjDTzGAq7hAG7hZslpHVvwPtSY9FffSk7j8VUnMY9NPMOZktNaHztwrwNCv27aKSxhKt71cAK3cbFXN+1pPOqAv2OXFQww3fE/4lwfl0aAA7zHuwjsYIQ31DhmKhzzrz7hbsnpaoQ21vF34mgVq2xXhYT9ddP2cMpo7amwOsJYw1PswvH/wD8qvB5hfC45DbAbeYS/gTcV5kYYz+N5Oqpc78z5iicV7kSqQ/3CfN20/fj3D3jbgV+VnO5XJaeVqOtLGJtYjMqW8RCHtoO4MUxWyekFLkS/a5HwZByGKwF9jyN8ueS0uHUxSk7DmzWB6ziPiej3Z4T6ALMlp9Uh8we7uXY8dvUOjgAAAABJRU5ErkJggg==);
}

a.info_link img {
    margin-top: 3px;
    display: block;
}

input#discard {
    width: 28%;
    float: left;
    margin-right: 2%;
}

#file_name {
    margin-bottom: 1.85em;
}

#wifi_container {
    clear: both;
}

#wifi_container.disabled label {
    color: #ccc;
}

#wifi_container.disabled input {
    background: #f5f5f5;
}

#wifi_container.disabled .req {
    color: #ccc;
}

#rest_api {
    border-top: .2em solid #0087b1;
}

#yun_config {
    border-top: 1em solid #0087b1;
}

input#conf_rest_btn {
    width: 70%;
}

/* REBOOT */

.progress_bar_container {
    width: 100%;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
}

.progress_bar {
    background: #0087b1;
    width: 0;
    -webkit-transition: width .35s ease-out 0s;
    -moz-transition: width .35s ease-out 0s;
    height: 26px;
    border-bottom: 4px solid #037b86;
}

.progress_bar_response {
    display: none;
    color: #559140;
    padding: .5em .8em;
    margin-top: 1em;
    background-color: #e7f1da;
}

/* HOMEPAGE */
#www {
    background: #fff;
}

#currsketch {
    padding-bottom: 1em;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1em;
}

ul#wwwlist li {
    margin-bottom: 0;
}

ul#wwwlist li, ul#wwwotherlist li {
    padding-left: 2.5em;
    line-height: 1.375em;
    margin-bottom: .875em;
}

li.folder {
    padding-left: 2.5em;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAATCAYAAACUef2IAAAASUlEQVR42u3UoQ0AIAxE0S7AWIzEAjg0EkPCoIdENKlpT5BUfPvkFwCU+LC0DqNNgB/ugP0puK6DgDRcxkRACSecsBX9Ff+N/gIGNwu8iBIRGAAAAABJRU5ErkJggg==) no-repeat;
    line-height: 1.375em;
    margin-bottom: .875em;
}

#recap {
    background: #fff;
    padding-bottom: 0;
}

.disconnected {
    color: #eeb01e;
    padding-left: 1em;
}

.connected {
    color: #0087b1;
    padding-left: 1em;
}

span.row {
    font-size: .875em;
    display: block;
    border-bottom: 1px solid #ddd;
}

span.row span {
    display: inline-block;
    line-height: 2em;
}

span.row span.desc {
    width: 33%;
    padding-right: 2%;
    color: #666;
}

span.row span.val {
    color: #333;
    font-weight: bold;
}

#sections_container .section {
    margin-bottom: 2.5em;
}

#welcome_container h2 {
    margin-bottom: 1em;
}

/* SET PASSWORD */
#login_container .saveForm {
    clear: both;
    width: 100%;
    margin-top: 3em;
}

#login_container form {
    width: 70%;
    margin: 0 auto;
}

#login_container label {
    display: block;
    float: none;
    text-align: left;
    margin-bottom: 0;
}

#login_container p.input_message {
    margin: 1em 0;
}

#login_container #password {
    width: 96%;
    padding: 2%;
}

@media only screen and (max-width:320px) {
    body {
        background: #f5f5f5;
        font-size: 1em;
    }

    #container {
        margin-top: 0;
    }

    #header {
        background: #0087b1;
        width: 100%;
        float: none;
        text-align: center;
    }

    #content {
        width: 100%;
        float: none;
    }

    #logo {
        display: none;
    }

    #logophone {
        width: 11em;
    }

}

@media (max-width:767px) {
    body {
        background: #f5f5f5;
        font-size: .9em;
    }

    label.left {
        padding-top: 0;
    }

    #container {
        margin-top: 0;
    }

    #header {
        background: #0087b1;
        width: 100%;
        float: none;
        text-align: center;
    }

    #content {
        width: 100%;
        float: none;
    }

    #logo {
        width: 7em;
        margin: 0 auto;
    }

    label {
        margin-bottom: .45em;
        float: left;
        margin-right: 1em;

    }

    textarea {
        font-size: 1em;
    }

    .checkbox_container {
        padding: .2em;
    }

    select {
        margin-top: 0;
    }

    input.saveForm {
        font-size: 1.2em;
    }

    .input_container input {
        width: 96%;
        padding: 2%;
    }

    input#conf_rest_btn {
        width: 70%;
    }

    #logo {
        display: none;
    }

    #logophone {
        display: block;
        width: 14em;
        margin: 0 auto;
    }

}

@media (min-width:1200px) {
    body {
        background: #0087b1;
        font-size: .875em;
    }

    #header {
        background: transparent;
        text-align: center;
    }

    #container {
        float: none;
        width: 1200px;
        margin: 3em auto;
    }

    #header {
        width: 30%;
    }

    #logo {
        width: 9em;
    }

    #content {
        width: 60%;
    }

    #sections_container {
        width: 100%;
        margin-right: 4%;
        line-height: 1.6em;
    }

    #welcome_container {
        width: 60%;
        float: left;
    }

    #configurebtn_container {
        width: 35%;
        margin-left: 5%;
        margin-bottom: 2em;
        float: left;
    }

    #configurebtn_container input {
        width: 100%;
    }

    label {
        float: left;
        text-align: right;
        padding: .525em;
        padding-right: 1.25em;
        width: 200px;
    }

    input {
        margin: 0 auto;
        -webkit-appearance: none;
    }

    input.submit.saveForm {
        width: 70%;
    }

    .input_container input {
        width: 45%;
    }

    input.saveForm {
        width: 50%;
        margin: 0 auto;
    }

    input#conf_rest_btn {
        width: 70%;
        margin: 0;
    }

    .input_message {
        margin-left: 33%;
    }

    label.title {
        width: 34%;
    }
}