html{
    background: url(img/bi_loader_small.gif) no-repeat center center;
    position: fixed;
    left:0;
    top:0;
    height:100vh;
    width:100vw
}

html.dark_theme{
    background-image: url(img/bi_loader_small_dark.gif);
    background-color: #333;
}

#textarea {
    #padding: 5px;
    font-size: 17px;
    line-height: 24px;
    margin: 0 15px 0 0;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -o-box-sizing: border-box;
    color: #000;
    display: inline-block;
    margin-right: 1%;
    width: 99%;
    background: #fff;
    border: 3px solid #d1e8f3;
    border-radius: 7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    overflow-y: auto;
}

body,samp,textarea,#textarea {
    color: #101717;
    font-family: 'Montserrat', sans-serif;
}

*::-webkit-scrollbar {
    width: 12px;               /* ширина scrollbar */
}

*::-webkit-scrollbar-track {
    background: transparent;        /* цвет дорожки */
}

*::-webkit-scrollbar-thumb {
    background-color: #999;    /* цвет плашки */
    border-radius: 20px;       /* закругления плашки */
    border: 3px solid #666;  /* padding вокруг плашки */
}

#terminal{
    background: #fff;
    position: relative;
    top:0;
    left:0;
    opacity: 1;

    -webkit-transition: opacity 0.5s ease-in-out 0.5s,left 0.5s ease-in-out 0.5s,top 0.1s ease;
    -moz-transition: opacity 0.5s ease-in-out 0.5s,left 0.5s ease-in-out 0.5s,top 0.1s ease;
    transition: opacity 0.5s ease-in-out 0.5s,left 0.5s ease-in-out 0.5s,top 0.1s ease;
}

.loading #terminal{
    opacity: 0;
    left:-50px;
    top:-1000px;

    -webkit-transition: opacity 0.5s ease-in-out,left 0.5s ease-in-out,top 0.1s ease 0.5s;
    -moz-transition: opacity 0.5s ease-in-out,left 0.5s ease-in-out,top 0.1s ease 0.5s;
    transition: opacity 0.5s ease-in-out,left 0.5s ease-in-out,top 0.1s ease 0.5s;
}

input{
    font-family: 'Montserrat', sans-serif;
}

p{
    font-size: 18px;
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.67;
    letter-spacing: normal;
    color: #101717;
}

section{
    width: 100vw;
    height: 100vh;
}

form#tommy_io{
    display: block;
    position: relative;
    height: 100vh;
    background: #fff;
}

.dark_theme form#tommy_io{
    background: #333;
}

nav{
    float: left;
    width: 7%;
    height: 100vh;
    background: #eee;
    display: table;
}

.dark_theme nav{
    background: #999;
}

nav a{
    display: table-row;
    position: relative;
    font-size: 30px;
    color: #101717;
    width: 100%;
    height: 19%;
    text-decoration: none;
}

nav a span{
    display: table-cell;
    position: relative;
    text-align: center;
    vertical-align: middle;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    z-index: 10;
    opacity: 0.7;
    text-decoration: underline dotted;
}

/*nav a[href="#bumblebees"] span:before{
    content: 'Шмели';
    display: inline-block;
    border-left:2px dotted  #101717;
    color: transparent;
    position: absolute;
}*/

nav a:after{
    content: '';
    display: block;
    position: absolute;
    width: 90%;
    height: 100%;
    z-index: 1;
    right:0;
    top: 0;
    border-radius:  15px 0 0 15px;
    -webkit-border-radius: 15px 0 0 15px;
    -moz-border-radius: 15px 0 0 15px;
}


.climate a[href="#climate"] span,
.bumblebees a[href="#bumblebees"] span,
.queens a[href="#queens"] span,
.inventories a[href="#inventories"] span,
.printer a[href="#printer"] span{
    text-decoration: none;
    opacity: 1;
}

.climate a[href="#climate"]:after,
.bumblebees a[href="#bumblebees"]:after,
.queens a[href="#queens"]:after,
.inventories a[href="#inventories"]:after,
.printer a[href="#printer"]:after{
    background: #fff;
    border-left: 0;
}

.dark_theme .climate a[href="#climate"],
.dark_theme .bumblebees a[href="#bumblebees"],
.dark_theme .queens a[href="#queens"],
.dark_theme .inventories a[href="#inventories"],
.dark_theme .printer a[href="#printer"]{
    color: #aaa;
}
.dark_theme .climate a[href="#climate"]:after,
.dark_theme .bumblebees a[href="#bumblebees"]:after,
.dark_theme .queens a[href="#queens"]:after,
.dark_theme .inventories a[href="#inventories"]:after,
.dark_theme .printer a[href="#printer"]:after{
    background: #333;
}

nav a.interface{
    height: 12%;
    /*overflow: hidden;
    text-indent: -1000px;*/
    background: url("img/skins.png") no-repeat center;
    background-size:58px 58px;
}

.dark_theme nav a.interface.dark_theme{
    /*background-color: #333;*/
    transform: rotate(180deg);
}

nav a.interface[href="/"]{
    /*height: 12%;*/
    background-image: url("img/reload.png");
    background-size:52px 52px;
}

nav a.interface:after{
    display: none;
}

#tommy_io>div{
    width: 62%;
    height: 100vh;
    float: left;
    display: none;
}

.climate #climate,
.bumblebees #bumblebees,
.queens #queens,
.inventories #inventories,
.printer #printer{
    display: block;
}


fieldset{
    display: block;
    margin: 0;
    border: 0;
    outline: 0;
    padding: 20px 0 20px 20px;
    float: right;
    width: 31%;
    background: transparent;
}

fieldset#tommy_feedback{
    padding: 20px;
    height: 100%;
}

div fieldset{
    width: 50%;
}

div fieldset:last-of-type{
    /*width: auto;*/
    float: none;
}

legend{
    display: block;
    background: #aeaeae;
    padding: 0px 10px 10px 10px;
    outline: 5px solid #aeaeae;
    border-radius: 7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    border-color: #aeaeae;

    width: -webkit-fill-available;
    float: left;
}

label{
    font-size: 20px;
    line-height: 40px;
}

#tommy_io button{
    display: block;
    width: 100%;
    width: -webkit-fill-available;
    height: 130px;
    background: #f7ecb5;
    padding: 0;
    margin: 0 0 20px 0;
    border-radius: 7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;

    font-size: 35px;
}


#culling button{
    height: 100px;
}

fieldset.open,
fieldset#tommy_feedback,
div fieldset:last-of-type{
    display: block!important;
}

#tommy_io button.red{
    background: #ce8483;
}

#tommy_io button:focus,
#tommy_io.transplant button[value="transplant"],
#tommy_io.shipment button[value="shipment"],
#tommy_io.new_line button[value="new_line"],
#tommy_io.demonstration button[value="demonstration"],
#tommy_io.syrop button[value="syrop"],
#tommy_io.inflow button[value="inflow"],
#tommy_io.outflow button[value="outflow"],
#tommy_io button.focus{
    background: #00cc00;
    outline: 5px solid #aeaeae;
    position: relative;
}

#tommy_io button.red:focus,
#tommy_io button.red.focus{
    background: #e72121;
}

#tommy_io button[disabled]{
    opacity: 0.3;
}

/*
#tommy_io button[disabled].info_block{
    opacity: 1;
    background-color: rgba(150,150,150,.1);
    border-color: transparent;
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
}*/

#tommy_io button[value="syrop"].focus:before,
/*#tommy_io button[value="transplant"].focus:before,
#tommy_io button[value="shipment"].focus:before,*/
#tommy_io button[value="demonstration"].focus:before,
#tommy_io button[value="inflow"].focus:before,
#tommy_io button[value="outflow"].focus:before,
#tommy_io.syrop button[value="syrop"]:before,
#tommy_io.print_shipping_label button[value="print_shipping_label"]:before,
#tommy_io.transplant button[value="transplant"]:before,
#tommy_io.shipment button[value="shipment"]:before,
#tommy_io.new_line button[value="new_line"]:before,
#tommy_io.demonstration button[value="demonstration"]:before,
#tommy_io.inflow button[value="inflow"]:before,
#tommy_io.outflow button[value="outflow"]:before{
    display: block;
    position: absolute;
    right: -15px;
    top: 50%;
    width: 0;
    height: 0;
    background: #aeaeae;
    content: "";
    outline: 10px solid #aeaeae;
}


#tommy_io button[value='transplant-starter']:after{
    content: ' в Бибокс';
}

#tommy_io button[value='transplant-beebox']:after{
    content: ' в Улей';
}

#tommy_io button[data-alt-text='transplant-starter']:after{
    content: ' (St→Bb)';
}

#tommy_io button[data-alt-text='transplant-beebox']:after{
    content: ' (Bb→Улей)';
}

#tommy_io button[data-alt-text='dispatch-hive']:after{
    content: ' (Улей)';
}

#tommy_io button[data-alt-text='dispatch-beebox']:after{
    content: ' (Бибокс)';
}

#tommy_io button[data-alt-text='dispatch-starter']:after{
    content: ' (Стартер)';
}


fieldset#transplant,
fieldset#shipment,
fieldset#new_line,
fieldset#demonstration,
fieldset#syrop,
fieldset#cities_list,
fieldset#inventories_list{
    display: none;
}

fieldset#syrop{
    margin-top: 37px;
}

#tommy_io.transplant fieldset#transplant,
#tommy_io.shipment fieldset#shipment,
#tommy_io.new_line fieldset#new_line,
#tommy_io.demonstration fieldset#demonstration,
#tommy_io.syrop fieldset#syrop,
#tommy_io.print_shipping_label fieldset#cities_list,
#tommy_io.inflow fieldset#inventories_list,
#tommy_io.outflow fieldset#inventories_list{
    display: block;
}

#tommy_io.queens #bumblebees fieldset.middle_column,
#tommy_io.transplant #bumblebees fieldset.middle_column,
#tommy_io.shipment #bumblebees fieldset.middle_column,
#tommy_io.new_line #bumblebees fieldset.middle_column,
#tommy_io.demonstration #bumblebees fieldset.middle_column,
#tommy_io.syrop #inventories fieldset.middle_column,
#tommy_io.inflow #inventories fieldset.middle_column,
#tommy_io.outflow #inventories fieldset.middle_column{
    display: none;
}

#tommy_io textarea,
#tommy_io #textarea,
samp{
    display: block;
    width: 100%;
    height: 95%;
    margin: 0!important;
    /*border: 0;*/
    padding: 5px;
    background: #eee;
    resize: none;
    font-size: 22px;
    line-height: 28px;

    /*border-radius: 0 0 7px 7px;
    -webkit-border-radius: 0 0 7px 7px;
    -webkit-border-radius: 0 0 7px 7px;*/
}

div.msg{
    padding: 3px;
    background-color: rgba(200,200,200,.5);
    border-radius: 7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    margin-bottom: 5px;
    /*margin-bottom: 28px;*/
    display: flow-root;
}

div.msg time{
    float: right;
    font-size: 12px;
    line-height: 14px;
    margin: 12px 3px 0 0;
}

div.msg.command{
    margin-top: 16px;
    margin-bottom: 5px;
}
/*
div.msg.doublerow{
    margin-bottom: 56px;
}
*/
div.msg.error{
    background: #ffbbbb;
}

div.msg.error:before{
    content: '✘';
    color:red;
}

div.msg.success{
    background: rgba(230,250,230,.8);
}

div.msg.success:after{
    content: ' ✔';
    color:green;
}
div.msg.print:before{
    content: '>>';
}

div.mode,div.mode_like{
    margin:20px -5px 5px -5px;
    padding: 0 5px;
    background: #576;
    color: #fff;
    /*background: #ce8483;*/
}

div.mode:first-child{
    margin-top: 0;
}

div.mode:before{
    /*content: "[Режим сканера: ";*/
    content: "Режим сканера: ";
}

div.mode:after{
    /*content: "]";*/
}

#tommy_io textarea,
#tommy_io #textarea{
    position: relative;
    top:-7px;
}

samp{
    position: relative;
    -webkit-box-sizing: border-box;
    height: 50px;
    line-height: 35px;
    border-radius: 7px 7px 0 0;
    -webkit-border-radius: 7px 7px 0 0;
    -webkit-border-radius: 7px 7px 0 0;
    border:0;

    padding-bottom: 45px;
    background: rgba(209, 232, 243, .5);
    font-size: 20px;
}

samp:before{
    position: relative;
    content: "i";
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin: 0 10px 0 10px;
    border:2px solid #000;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -webkit-border-radius: 20px;
    top:-2px;
}

.dark_theme #tommy_io textarea,
.dark_theme #tommy_io #textarea,
.dark_theme samp,
.dark_theme #tommy_io #scanner_input{
    background: #999;
    color: #333;
    border-color: #aaa;
}

.dark_theme samp{
    background: rgba(150,150,150,.3);
    color:#eee;
}

.dark_theme samp:before{
    color: inherit;
    border-color: #eee;
}

samp.err,
.dark_theme samp.err{
    background: red;
}

samp.err:before{
    content: "×";
}


fieldset#inventories_list,
fieldset#cities_list{
    max-height: 100vh;
    /*overflow-y: auto;*/
}

fieldset#inventories_list legend,
fieldset#cities_list legend{
    max-height: 100%;
    overflow-y: auto;
}

fieldset#transplant{
    margin-top: 185px;
}

fieldset#shipment{
    margin-top: 380px;
}

fieldset#breeding{
    margin-top: 487px;
}

fieldset#disposal{
    margin-top: 530px;
}

fieldset#new_line{
    margin-top: 186px;
}

fieldset#new_line label{
    display: block;
}

fieldset#new_line button{
    float: left;
    width: 30%;
    margin-right: 18px;
}


input[type="submit"]{
    display: none;
}

#packing{
    visibility: hidden;
}


#qrs{
    display: none;
}

#scanner_input{
    position: relative;
    top:-1000px;
    /*top: -40px;*/
    width: 100%;
}

@media  (max-width: 1280px) {   /* Windows fullscreen 1280x800; */
    #tommy_io button{
        height: 110px;
        font-size: 30px;
    }

    #tommy_io #textarea,
    #tommy_io textarea{
        font-size: 16px;
        line-height: 22px;
    }

    div.msg.command {
        margin-top: 10px;
    }

    div.msg time {
        font-size: 10px;
        margin-right: 2px;
        margin-top: 5px;
    }

    samp{
        font-size: 16px;
        line-height: 28px;
        padding-bottom: 40px;
        height: 45px;
    }

    samp:before{
        top: 0;
        margin: 0 5px;
        width: 18px;
        height: 18px;
        font-size: 13px;
        line-height: 18px;
    }

    fieldset#transplant{
        margin-top: 155px;
    }

    fieldset#shipment{
        margin-top: 319px;
    }
}

@media  (max-width: 1130px) {   /* Android fullscreen 1130x706; */
    #tommy_io button{
        height: 95px;
        font-size: 28px;
    }
    /*

    #tommy_io #textarea,
    #tommy_io textarea{
        font-size: 16px;
        line-height: 22px;
    }
    */

    div.mode:before {
        content: "Режим: ";
    }

    nav a{
        font-size: 24px;
    }

    nav a:last-child{
        background-size:38px 38px;
    }

    label{
        font-size: 18px;
        line-height: 28px;
    }

    samp{
        font-size: 15px;
    }

    fieldset#transplant{
        margin-top: 147px;
    }

    fieldset#shipment{
        margin-top: 287px;
    }
}