/* fix css */

:root {
    --header-height: 2.2rem;
    --header2-height: 2.6rem;
    --header-color: rgba(48, 25, 124, 0.8);
    --output-width: 150px;
    --toolbox-min-width: 45px;
    --toolbox-border-width: 3px;
    --btn-bar-size: 40px;

}

* {
    -webkit-tap-highlight-color: transparent;
}

.blocklySvg {
    background-color: rgba(109,214,241,0.110);
}


.deviceList{
    top: calc(var(--header-height)*1.05);
    position: absolute;
    padding-left: 5px;
    padding-right: 5px;
    z-index: 10;
    border: 2px solid rgba(115,173,33,1);
    list-style: square inside;
}



#devices {
    -webkit-padding-start: 0px;
    -webkit-margin-before: 5px;
    -webkit-margin-after: 5px;
}

#deviceItem {
    opacity: 0.6
}

#deviceItem:hover {
    cursor: pointer;
    opacity: 1
}

.warn {
    color: red;
    margin: 0px;
    margin-left: 5px;
}

.blocklyTreeIcon {

    background: none;

    margin: 0 .15em;
    width: 25px;

    font-weight: 300;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    font-size: 1.2rem;
    height:auto;

}
.blocklyToolboxDiv {
    background: rgba(255,255,255,1);
    border-right: solid 3px rgba(85,0,232,0.180);
    min-width: var(--toolbox-min-width);
}
.blocklyTreeRoot {
    padding: 0;
    background: rgba(255,255,255,1);
    padding-bottom: 1px;
}


div.blocklyTreeRow {
    box-shadow: inset 0 -1px 0 0 rgba(236,240,241,1);
    margin-bottom: 0!important;
    transition-property: background-color;
    transition-duration: 1s;
    min-height: var(--toolbox-min-width);
    line-height: var(--toolbox-min-width);
    border-left-width: 12px!important;
}

/*.blocklyTreeRow:not(:last-child) {
    margin-bottom: 1px;
}*/

.blocklyTreeRow:last-child {
    background: rgba(255,0,0,1);
}

.blocklyTreeLabel {
    font-size: 1rem;
}







.blocklyTreeRow.blocklyTreeSelected .blocklyTreeIcon {
    color:rgba(255,255,255,1);
}


.blocklyFlyoutLabelBackground{
    opacity: 1;
    width: 90%;
    fill: black;    
}
.labelStyle>.blocklyFlyoutLabelText {
  fill: white;
}
/* */




html, body {
    margin:0;
    padding:0;
    height:100%;
}
body {
    display: flex;
    justify-content:flex-start;
    align-items:center;
    flex-flow: column nowrap;
}
body > div {
    align-self: stretch;
}
.header {
    height: var(--header-height);
    flex-shrink:0;
    background-color: var(--header-color);
    display: flex;
    justify-content:space-between;
    align-items:center;
    z-index: 20;
}
.header a {
    height:70%;
}

.hd_divider {
  border-right: solid 2px hsla(0,0%,100%,.3);
  margin-right: 10px;
  padding-right: 10px;
}

#logo {
    height:100%;
    margin-left:5px;
}

.target {
  display: none;
  margin: auto;
  color: #37c4f0;
  vertical-align: middle;
  font-size: medium;
  text-align: center;
  padding-left: 1em;
}

.target .option{
    color: #212529;
    background-color: #ccc;
    font-size: medium;
}

.googlelogo{
  display: none; /*#inline-flex*/
  position: relative;

}


.googlelogo img {
  height: calc(var(--btn-bar-size)*0.6);
}


.btn-file{
    display: inline-flex;
    float:left;
    /*border-left: solid 2px hsla(0,0%,100%,.3);*/
    /*border-right: solid 2px hsla(0,0%,100%,.3);*/
}

.btn-file img {
  height: calc(var(--btn-bar-size)*0.6);
}

.btn-file .item {
    position: relative;
    width: calc(var(--header-height)*0.8);
    height: : calc(var(--header-height)*0.45);

    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: none;
    color: white;
    text-align: center;
}

.btn-file .gclass {
  display: flex;
  margin: auto;
  color: white;
  vertical-align: middle;
  font-size: 10px;
  text-align: center;
  padding-left: 0.25em;
  padding-right: 0.25em;
}





.btn-file .item:hover {
    cursor: pointer;
    background-color: hsla(0,0%,100%,.3);
    color:rgba(255,255,255,1);
}

.btn-file .item .fa {
    margin-top: 0px;
    font-size: calc(var(--btn-bar-size)*0.6);
}

.btn-file .item:hover {
    cursor: pointer;
    background-color: hsla(0,0%,100%,.3);
    color:rgba(255,255,255,1);
}


.btn-file .logo {
  position: relative;
  width: calc(var(--header-height)*0.65);
  height: calc(var(--header-height)*0.45);

  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background: none;
  color: white;
  text-align: center;
  padding-right: 0.25em;
}

.btn-file .logo .fa {
  margin-top: 0px;
  font-size: calc(var(--btn-bar-size)*0.6);
  color: #BBBBBB;
}

.btn-file .divider {
  border-right: solid 2px hsla(0,0%,100%,.3);
  margin-right: 10px;
  padding-right: 10px;
}


.btn-bar {
    display: flex;
    justify-content:space-around;
    align-items:center;
    margin-left: 15px;
}
.btn-bar .item {
    width:var(--btn-bar-size);
    height:var(--btn-bar-size);
    border-radius: calc(var(--btn-bar-size)/2);
    background-color: rgba(229,229,229,1);
    margin-right:8px;
    display: flex;
    justify-content:center;
    align-items:center;
    color:var(--header-color);
}
.btn-bar .item:hover {
    cursor: pointer;
    background-color: hsla(0,0%,100%,.3);
    color:rgba(255,255,255,1);
}
.btn-bar .item .fa {
    margin-top: 0px;
    font-size: calc(var(--btn-bar-size)*0.6)
}

.bar-function {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    /*background: #abc;*/
    flex-grow: 1;
}

.btn-signin img {
  height: var(--btn-bar-size);
  vertical-align: middle;
}

.btn-shop {
    position: relative;
    width: calc(var(--header-height)*0.7);
    height: : calc(var(--header-height)*0.5);

    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: none;
    text-align: center;
    padding-right:2px;
}

.btn-shop:hover {
    cursor: pointer;
    background-color: hsla(0,0%,100%,.3);
    color:rgba(255,255,255,1);
}

.btn-shop .item .fa {
    color: white;
    font-size: calc(var(--btn-bar-size)*0.7);
}




.btn-gamepad {
    position: relative;
    /*width: calc(var(--header-height)*0.7);*/
    /*height: : calc(var(--header-height)*0.5);*/

    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: none;
    text-align: center;
    padding-right:2px;
}

.btn-gamepad:hover {
    cursor: pointer;
    background-color: hsla(0,0%,100%,.3);
    color:rgba(255,255,255,1);
}

.btn-gamepad .item .fa {
    color: white;
    /*font-size: calc(var(--btn-bar-size)*0.7);*/
    font-size: 50px;
}

.bar-box .progress {
    padding: 0 10px;
    color: #fff;
    font-weight: bold;
    user-select: none;
}

.content {
    /*border:1px solid #f00;*/
    flex-grow:1;
    margin-bottom: 0;
    margin-right: var(--output-width);

}

#debug-win {
    /*display: flex;*/
    /*align-items:center;*/
    position: absolute;
    width:var(--output-width);
    bottom: 0;
    top: calc(var(--header-height) + var(--header2-height));
    right: 0;
    border: 1px solid rgba(206, 206, 206, 1);
    background-color: white;
    z-index:9999;

    transition:height 0.7s;
    -moz-transition:height 0.7s; /* Firefox 4 */
    -webkit-transition:height 0.7s; /* Safari and Chrome */
    -o-transition:height 0.3s; /* Opera */
}


#debug-win textarea {
    /*border: 0px solid #ffc;*/
    width:100%;
    height:100%;
}

#output {
    z-index: auto;
    cursor: auto;
    font-family: Courier;
    font-size: 16px;
    overflow-y: scroll
}

#debug-win #debug-btn {
    display: none;
}

.bar-box {
    display: flex;
    justify-content: center;
    align-items: center;
    /*background: #abc;*/
    flex-grow: 1;
}

.header2 {
    padding: 0 12px;
    flex-shrink: 0;
    background: #4dd1fe;
    display: flex;
    align-items: center;
    height: var(--header2-height);
    /*width: 100%;*/
    z-index: 20;
}

.menu {
    padding: 0 12px;
}

.menu a {
    color: #fff;
    text-decoration: none;
    margin: 0 12px;
    font-weight: bold;
}

.menu a:hover
{
  background-color: #4dd1fe;
}


/*@media all and (max-width: 768px){ }
@media all and (max-width: 400px){

}*/
@media all and (max-width: 500px){
    .header {
    }
    .alink {
    }
}

@media all and (max-width: 800px) {
    .blocklyTreeLabel {
        display: none;
    }

    .blocklyTreeRow {
        padding-right: 2px;
    }
}


#blocklyDiv {
    height:calc(100% - var(--header-height));
}

@media all and (orientation: portrait) {
    .menu .alink:nth-child(3) {
        display: none;
    }

    .menu a {
        font-size: 60%
    }

    #blocklyDiv {
        width: 100%;
    }

    .blocklyTreeRow {
        padding-right: 2px;
    }
    #debug-win {
        width:auto;
        top:auto;
        display: flex;
        align-items:center;
        left:calc(var(--toolbox-min-width) + var(--toolbox-border-width));
        height: 40px;
    }
    #debug-win.expand {
        height: 50%;
    }
    #debug-win #debug-btn {
        display: block;
        width: 30px;
        height: 30px;
        border-radius: 15px;
        position: absolute;
        right:8px;
        top: 3px;
        background-color: rgba(0,0,0, 0.3);
        color:white;
        display: flex;
        justify-content:center;
        align-items:center;
    }
    #debug-win #debug-btn:hover {
        cursor: pointer;
        background-color: rgba(0,0,0, 0.6);
    -webkit-transition-property: background-color;
    -webkit-transition-duration: 0.3s;
    transition-property: background-color;
    transition-duration: 0.3s;
    }
}





@media all and (orientation : landscape){

    .content {
        /*border:1px solid #f00;*/
        flex-grow:1;
        margin-bottom: 0;
    }

    #blocklyDiv {
        /*width: calc(100% - var(--output-width));*/
        width: 100%;
    }


    #debug-win {
        height: auto;
    }

    .menu a {
        font-size: 100%
    }

    #debug-win #debug-btn {
        display: none;
    }
}


