/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html, body {
    font-family: 'Roboto', 'Helvetica', sans-serif;
}
a {
    text-decoration: underline;
    color: #039BE5;
}
.hidden{
    display: none;
}
.mdl-menu a {
    text-decoration: none;
}
.content {
    max-width: 1024px;
}
.mdl-card {
    display: block;
}
.marginauto {
    margin: auto;
}
h3 {
    background: url('firebase-logo.png') no-repeat;
    background-size: 40px;
    padding-left: 50px;
    background-position-y: -2px;
}
/* Fixes an MDL bug where the header does not scroll on small devices */
.mdl-layout__container .mdl-layout--fixed-header .mdl-layout__content {
}
.mdl-textfield__input {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.scoreboard {
    background-color: #2C2C2C;
    color: white;
    max-height: 80px;
    min-height: 60px;
    max-width: 100%;

    text-align: center;
    font-family: 'Roboto Condensed', 'American Typewriter Condensed', 'Helvetica', sans-serif;
}


.scoreboard .scoreboard-block {
    display: inline-block;
    vertical-align: middle;
    padding: auto;
    max-height: 80px;
    line-height: 80px;
}

.scoreboard .scoreboard-block.scoreboard-playername {
    font-size: 2em;
    min-width: 350px;
}

.scoreboard .scoreboard-block.scoreboard-playerscore {
    width: 80px;
    font-size: 4em;
    padding-top: 10;
}


.scoreboard .scoreboard-block.scoreboard-playerscore.scoreboard-player1 {
    background-color: #199064;
    color: white;
}
.scoreboard .scoreboard-block.scoreboard-playerscore.scoreboard-player2 {
    background-color: #0551AE;
    color: white;
}
.scoreboard .scoreboard-block.scoreboard-playername.scoreboard-player1 {
    text-align: right;
    padding-right: 16px;
}
.scoreboard .scoreboard-block.scoreboard-playername.scoreboard-player2 {
    text-align: left;
    padding-left: 16px;
}
.scoreboard .scoreboard-block .status-block-number{
    font-size: 0.75em;
}
.scoreboard .scoreboard-block .scoreboard-winrate {
    color: #F9AA5F;
}
.scoreboard .scoreboard-block .scoreboard-rating {
    color: #7297CE;
}
.status-block-number {
    width: 72px;
}

.scoreboard .scoreboard-block.scoreboard-race{
    width: 60px;
    line-height: 1em;
}
.scoreboard .scoreboard-block.scoreboard-race .scoreboard-racenumber {
    margin-top: 3px;
    font-size: 2em;
    line-height: 1.1em;
}

#scoreboard {
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#scoreboard-separater{
    height: 80px;
}

#toggle-session-btn {
    margin-top: 20px;
    margin-bottom: 20px;
}
#session-container {
  display: flex;
  flex-direction: row;
}
#mode-container {
    display: flex;
    flex-direction: row;
}
#mode-container .left {
    width: 50%;
}
#mode-container .right {
    width: 50%;
}

#session-container .left {
  width: 48px;
}
#session-container .right {
    width: -webkit-fill-available;
}
#session-container .right .mdl-textfield{
    width: -webkit-fill-available;
}

#dashboard .title {
    background-color: #09A568;
    color: white;
}
#dashboard .title .title-image {
    width: 150px;
}
#dashboard .manual {
    background-color: #09A568;
    color: white;
}
#dashboard .credit {
    background-color: #555555;
    color: white;
}

#dashboard .control-title {
    font-weight: bold;
}

#dashboard hr {
    margin: 24px;
    border: 0;
    text-align: center;
    height: 24px;
}
#dashboard hr:before {
    content: "\2B28\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\2B28\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\00A0\2B28";
    font-size: 22px;
    color: rgba(0,0,0,.25);
}

.float-right-legend {
    float: right;
    padding-bottom: 0;
    margin-top: 8px;
    height: 0;
    margin-bottom: -22px;
    padding-top: 14px;
}

.score-panel {
    margin-top: 4px;
    margin-bottom: 12px;
}

.snooker-btn-add {
    height: 32px;
    width: 32px;
    min-width: 32px;
    font-size: 18px;
    color: white;
    margin-right: 2px;
}

.snooker-btn-add1 {
    background-color: red;
}

.snooker-btn-add2 {
    background-color: rgb(143, 143, 3);
}

.snooker-btn-add3 {
    background-color: green;
}

.snooker-btn-add4 {
    background-color: rgb(150, 68, 31);
}
.snooker-btn-add5 {
    background-color: rgb(0, 0, 170);
}
.snooker-btn-add6 {
    background-color: rgb(212, 75, 98);
}
.snooker-btn-add7 {
    background-color: black;
}

.status-legend {
    float: left;
    height: 0;
    font-size: 0.4em;
    position: absolute;
    margin-top: -16px;
}
.status-block{
    display: inline;

}
.rating-legend {

}
.winrate-legend{

}
#video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
}
#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#camera-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.cueball-canvas {
    z-index: 100;
    position: absolute;
}

#cueball-canvas-small {
    display: none;
    top: 80px;
    right: 0;
}

#cueball-canvas-large {
    display: block;
    top: 80px;
    right: 0;
}

#btn-camera-mode
{
    position: absolute;
    right: 8px;
}

.camera-btns
{
    position: absolute;
    float: left;
    z-index: 1000;
    width: 32px;
    bottom: 8px;
}

#video-container .camera-btns {
    color: #AAA;
}

#btn-camera-close {
    left: 4px;
}

#btn-camera-switch{
    left: 44px;
}

#btn-camera-clear {
    left: 84px;
}

#player1name {
    padding-left: 4px;
}
#player2name {
    padding-right: 4px;
}


@media only screen and (max-width: 980px) {
    #cueball-canvas-small {
        top: 60px;
        display: block;
    }
    #cueball-canvas-large{
        display: none;
    }
    #scoreboard {
        zoom: 0.75;
    }
    #scoreboard-separater {
        height: 60px;
    }
}
@media only screen and (max-width: 739px) {
    #cueball-canvas-small {
        top: 40px;
    }
    #scoreboard {
        zoom: 0.5;
    }
    #scoreboard-separater {
        height: 40px;
    }
}

@media only screen and (max-width: 540px) {
    #cueball-canvas-small {
        top: 60px;
    }
    .scoreboard .scoreboard-block .scoreboard-winrate {
        font-size: 1em;
    }
    .scoreboard .scoreboard-block .scoreboard-rating {
        font-size: 1em;
    } 
    .status-block{
        margin-right: 4px;
        margin-left: 4px;
    }
    .status-legend{
        font-size: 0.75em;
    }
    #player1name {
        position: absolute;
        top: 18px;
        left: 8px;
    }
    #player2name{
        position: absolute;
        top: 18px;
        right: 8px;
    }
    #scoreboard-separater{
        height: 60px;
    }
    .mdl-grid {
        padding: 0;
    }
    .mdl-card {
        font-size: 14px;
        width: 100%;
    }
    .mdl-cell {
        width: 100%;
    }

    #dashboard{
        width: 100%;
    }

    .mdl-textfield{
        width: 100%;
    }

    .scoreboard {
        height: 60px;
        line-height: 1em;
        max-height: 60px;
    }
    .scoreboard .scoreboard-block {
        height: 60px;
        padding-top: 0;
        max-height: 60px;
    }
    .scoreboard .scoreboard-block.scoreboard-playername {
        min-width: 50px;
        font-size: 1em;
        padding: 0;
        line-height: 60px;
    }
    .scoreboard .scoreboard-block.scoreboard-playerscore {
        width: 40px;
        font-size: 2em;
        line-height: 60px;
    }

    .scoreboard .scoreboard-block.scoreboard-race{
        font-size: 12px;
        line-height: 20px;
    }

    .scoreboard .scoreboard-block.scoreboard-race .scoreboard-racenumber {
        font-size: 26px;
        line-height: 26px;
    }
    #scoreboard {
        zoom: 1;
    }
}

@media only screen and (min-width: 390px) and (max-width: 844px) and (orientation: landscape) {
    html {
        overflow: hidden;
    }
    #scoreboard {
        zoom: 0.5;
    }
}