/*
 * Copyright (C) 2016 Jan-Dirk van Dingenen
 *
 * This program 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 3 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, see <http://www.gnu.org/licenses/>.
 */

#test {
    width:100px;
    height:100px;
    background:rgba(255,0,0,0.7);
    position:absolute;
    top:100px;
    left:100px;
}

body {
    background-color: #0E0E57;
    background-repeat: no-repeat;
    background-size:cover;
    padding:0;
    margin:0;
    font-family: monospace;
    overflow: scroll;
}

#game {
    position:relative;
}

#canvasContainer {
    display:inline-block;   
    box-sizing: border-box;
}

#tabContainer {
    width:25px; 
    position:fixed; 
    top:25px; 
    left:0px; 
    pointer-events: none;
    display:none;
}

#mapControlsContainer {
    width: 25px;
    position: fixed;
    top: 25px;
    right: 0px;
    pointer-events: none;
}

div#timeControlscontainer {
    position: fixed;
    top: 30px;
    left: 50%;
    background-color: rgb(240, 240, 240);
    transform: translate(-50%,0);
    opacity: 0.9;
    padding: 5px;
    display:none;
}

button#endTurn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    display:none;
    background-color: #DDDDDD;
}

button#endTurn:hover {
    background-color: rgb(200, 0, 0);
    color: rgb(255, 255, 255);
}

button#startTurn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    display:none;
    background-color: #DDDDDD;
}

button#startTurn:hover {
    background-color: rgb(0, 200, 0);
    color: rgb(255, 255, 255);
}

.army {
    position:absolute;
    background-image:url('map.png');
    background-position: 0,0;
    background-repeat:no-repeat;
    cursor:pointer;
}

.army .armyData {
    width: 100%;
    text-align: center;
    font-size: 10px;
    font-variant: small-caps;
    color: rgb(255, 255, 255);
    font-family: arial;
}

.animation {
    position:absolute;
    background-image:url('map_invert.png');
    background-position: 0,0;
    background-repeat:no-repeat;
    pointer-events: none;
}

div.tabPopup {
    position: relative;
    pointer-events: all;
    margin-bottom: 25px;
    display: inline-block;
    clear: both;
}

div.tabPopup.active.enabled {
    z-index:100;
    width: 229px;
}

.tab {
    width: 25px;
    height: 50px;
    border-radius: 0px 5px 5px 0px;   
    border: solid 2px rgb(0, 0, 0);    
    cursor:pointer;
    float:right;
    border-left: 0;
    margin-left: -2px;
    background-color:rgb(225, 225, 200);
    background-repeat: no-repeat;   
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    background-image: url(tabs.png);  
}

#armyTab {
    background-position: 0px 0px;  
}

#campTab {
    background-position: -25px 0px;  
}

#terrainTab { 
    background-position: -50px 0px;  
}

#empireTab { 
    background-position: -75px 0px;  
}

div.tabPopup.enabled .tab {
    border: solid 2px rgb(255, 255, 255);
    border-left: 0;
    -webkit-filter: initial;
    filter:initial;
}

div.tabPopup.enabled:not(.active) .tab:hover {
    filter: contrast(175%) !important;
    -webkit-filter: contrast(175%) !important;
}

.tabInfoBlock {
    float:left;
    background: rgb(240, 240, 240);
    height: 200px;
    width: 200px;
    border: solid 2px rgb(255, 255, 255);
    border-radius: 0 0 20px 0;    
    display:none;
    cursor:pointer;
}

#empireInfo.tabInfoBlock {
    height: 375px;
}

div.tabPopup.active.enabled .tabInfoBlock{
    display:block;
}

.tabHead {
    width:100%;
    height:50px;
    text-align: center;
    line-height: 50px;
    font-weight: bold;
    text-transform: uppercase;
    position:relative;
    border-radius: 0px 0px 3px 3px;
}

#terrainPopup .tabHead {
    line-height: 25px;
}

.tabHeadIcon {
    width: 50px;
    height: 50px;
    position: absolute;
    top: 0px;
    left: 0px;
    background-image: url(map.png);
    background-repeat: no-repeat;
    background-size: 550px 100px;
    background-position-y: -50px;
    margin: 0px -5px;
}

#campInfo .tabHeadIcon, #empireInfo .tabHeadIcon {
    background-position-y: 0px;
}

#campInfo .tabRow {
    margin-top: 15px;
    position: relative;
}

#campInfo .tabRow button.recruit {
    position: absolute;
    top: -10px;
    left: 10px;
    width: 80px;
    height: 40px;
    border-radius: 5px;
    cursor:pointer;
    background-color:rgb(221, 252, 199);
    outline:none;
}

#campInfo .tabRow button.recruit:hover,  #campInfo .tabRow button.recruit:focus {
    background-color:#00A300;
    color:#fff;
}

.tabHeadIcon.no2 {
    right: 0px;
    left: initial;
}

.tabRow {
    width: 100%;
}

.tabRowUnder {
    position: absolute;
    bottom: 2px;
    width: 200px;
    text-align: center;
    font-size: 85%;
    color: rgba(0,0,0,0.6);
}

span.tabLabel {
    width: 100px;
    display: inline-block;
    text-align: right;
    box-sizing: border-box;
    padding-right: 15px;
}

span.tabValue {
    font-weight: bold;
}

.tabIcon {
    width: 100px;
    height: 100px;
    background-image: url(map.png);
    background-repeat: no-repeat;
    float:left;
}

.tabAmount {
    float: left;
    line-height: 110px;
    text-align: center;
    font-size: 42px;
    font-family: arial;
    font-weight: bold;
    color: rgb(255, 255, 255);
    text-shadow: 0px 0px 2px rgb(0, 0, 0);
    width: 100px;
    height: 100px;
}

#empireInfo .tabHead {
    line-height:25px;
}

#empireInfo .tabIcon {
    width: 30px;
    height: 30px;
    background-image: url(map.png);
    background-repeat: no-repeat;
    background-size: 330px 60px;
    background-position-y: -30px;
    margin: 0px 5px;
}

#empireInfo .tabAmount {
    float: left;
    line-height: 30px;
    text-align: center;
    font-size: 12px;
    font-family: arial;
    font-weight: bold;
    color: #333;
    width: 155px;
    height: 30px;
    text-shadow: none;
}

#empireInfo .armiesCount {
    width: 30px;
    height: 30px; 
    margin: 0px 5px;
    float: left;
    line-height: 30px;
}

#armyInfo .starHead {
    width: 90px;
    display: inline-block;
    padding-left: 10px;
    line-height: 14px;
    margin-right: 10px;
}

#armyInfo .star {
    display: inline-block;
    box-sizing: border-box;
    width: 16px;
}

#armyInfo .star.fullStar:before {
    content: "\2605";
    font-size: 13px;
    text-shadow: 0px 1px rgb(0, 0, 0);
    color:gold;
}

#armyInfo .tabText {
    margin-top: -3px;
}

#terrainInfo .starHead {
    display: inline-block;
    width: 90px;
    line-height: 15px;
    margin-left: 10px;
}

#terrainInfo .stars {
    width:200px;
    overflow:hidden;
    margin-top: 0.5px;
}

#terrainInfo .speedInfo, #terrainInfo .combatInfo {
    display:inline-block;
    width:50px;
}

#terrainInfo .speedInfo .speedStar {
    width: 11px;
    height: 11px;
    display: inline-block;
    margin-right: 0px;
    background-image: url(map.png);
    background-repeat: no-repeat;
    background-position: -197px -22px;
    background-size: 242px 44px;
}

#terrainInfo .combatInfo .combatStar {
    width:5.2px;
    height:11px;
    margin-right:1px;
    display: inline-block;
    background-image: url(map.png);
    background-repeat: no-repeat;
    background-position: -212px -22px;
    background-size: 242px 44px;
}

.mapPopup {
    height: 50px;
    overflow: hidden;
    pointer-events: all;
    width:25px;
}

.mapPopup.open {
    width: 225px;
    height: 180px;
    position: relative;
    left: -60px;     
}

.maptab {
    width:25px;
    height:50px;
    float:left;
    background-color:#fff;
    cursor:pointer;
    background: rgb(225, 225, 200);
    border: solid 2px rgb(255, 255, 255);
    border-radius: 5px 0px 0px 5px;   
    border-right: 0;
    margin-right: -2px;
    background-repeat: no-repeat;  
    background-image: url(tabs.png);
    background-position: -100px 0px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.mapPopup:not(.open) .maptab:hover {
    filter: contrast(175%) !important;
    -webkit-filter: contrast(175%) !important;
}

.maptabInfo {
    float: left;
    width: 100px;
    height: 180px;
    background-color: rgb(240, 240, 240);
    box-sizing: border-box;
    padding: 5px 0px 5px 8px;
    border-radius: 0px 0px 0px 15px;
    border: solid 2px rgb(255, 255, 255);
    border-right: 0;
}

#mapControlsContainer .mapmode {
    background-image: url(mapmodes.png);
    background-repeat: no-repeat;
    background-position: 0px 0px;
    width:50px;
    height:50px;
    cursor:pointer;    
    margin: 5px 0px;
}

#mapControlsContainer .mapmode.showClans {
    background-position: -100px 0px;
}

#mapControlsContainer .mapmode.showBorders {
    background-position: -50px 0px;
}

#mapControlsContainer .mapmode:hover {
     filter:contrast(200%);
     -webkit-filter: contrast(175%) !important;
}

div#zoomControls {
    width: 22px;
    margin-bottom: 25px;
}

div#zoomLevels {
    margin-bottom: 5px;
    margin-top: 5px;
}

#zoomMin {
    width: 22px;
    height: 22px;
    background-color: #96C477;
    text-align: center;
    color: #000;
    pointer-events: all;
    cursor: pointer; 
    border-radius: 0px 0px 10px 10px;    
    font-weight: bold;
    font-size: 40px;
    line-height: 20px;
    box-sizing: border-box;
        display: inline-block;
}

.zoomLevel {
    width: 22px;
    height: 15px;
    background-color: rgb(221, 252, 199);
    margin: 2px 0px;
    box-sizing: border-box;
    cursor: pointer;
    border: solid 1px rgb(150, 196, 119);
    border-radius: 2px;
    pointer-events: all;
    box-sizing: border-box;
    display: inline-block;
}

#zoomPlus {
    width: 22px;
    height: 22px;
    background-color: #96C477;
    text-align: center;
    color: #000;
    pointer-events: all;
    cursor: pointer;
    border-radius: 10px 10px 0px 0px;   
    font-weight: bold;
    font-size: 30px;
    line-height: 20px;
    box-sizing: border-box;
    display: inline-block;
}

.zoomLevel.activated {
    background-color: #006B00;
}

#zoomMin:hover, #zoomPlus:hover, .zoomLevel:hover {
    background-color:#006B00;
    color:#fff;
}

.zoomLevel.activated:hover {
    background-color:#00a300;
}

.questionPopup {
    position: absolute;
    background-color: rgb(240, 240, 240);
    border: solid 2px rgb(255, 255, 255);
    border-radius: 3px;
    width:300px;
    color: rgb(30,30,30);
}

.questionTitle {
    font-size: 125%;
    text-transform: uppercase;
    text-align: center;
    padding: 5px;
    border-bottom: solid 2px rgb(255, 255, 255);
    background: rgb(225, 225, 201);
}

.questionText {
    padding:10px;
}

.questionButton {
    margin-bottom: 15px;
}

.leftButton {
    float:left;
}

.rightButton {
    float:right;
}


.readOnly {
    pointer-events: none;    
}

.hidden {
    display:none;
}

::selection, button::selection {
  background: transparent;
}


#empireInfo hr {
    clear:both;
    margin-bottom: 4px;
}

div#showTurn {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    pointer-events: none;
    transform: translate(-50%,-50%);
    font-size: 250px;
    font-weight: bold;
    text-shadow: 1px 1px rgb(255, 255, 255);
    text-align:center;
    font-family: "Times New Roman", Times, serif
}

#vicBar {
    width: 115px;
    height: 10px;
    background-color: rgba(0,0,0,0.1);
    box-sizing: border-box;
    float: right;
    margin-top: 10px;
    margin-right: 10px;
    border: solid 1px rgba(0,0,0,0.5);
    position:relative;
}

#vicBar div {
    height: 100%;
}

#vicBar span {
    position: absolute;
    top: -10px;
    font-size: 9px;
}

#statistics {
    width: 80%;
    height: 80%;
    position: fixed;
    top: calc(-80% - 20px);
    left: 50%;
    background-color: rgba(255, 255, 255,0.95);
    transform: translate(-50%,0%);
    border: inset 4px rgba(0, 0, 0,0.8);
    border-radius:4px;
    padding: 5px;
    display:none;
}

#statistics #graph {
    width: 100%;
    height: 80%;    
}

.morris-hover-row-label {
    display:none;
}

.morris-hover {
    margin-left: 10px;
}

.morris-hover-point {
    float: left;
    padding: 10px;
    border: solid 1px rgb(0, 0, 0);
    margin: 5px;
}

.topTab {
    position: absolute;
    width: 100px;
    height: 29px;
    background-color: rgb(244, 244, 247);
    text-align: center;
    bottom: -30px;
    border: solid 1px rgb(0, 0, 0);
    border-top: none;
    border-radius: 0 0 4px 4px;
    line-height: 33px;
    padding-left: 25px;
    background-image: url('map_invert.png');
    background-position: -198px -93px;
    background-repeat: no-repeat;
    cursor:pointer;
}

.topTab.tab1 {
    left:10px;
}

.topTab.tab2 {
    left:210px;
}

.topTab.tab3 {
    left:410px;
}

.activeTopTab {
    font-weight:bold;
}

div#startHelp {
    position: fixed;
    top: 0px;
    background-color: rgba(255, 255, 255,0.8);
    padding: 20px;
    width: 50%;
    padding-top: 0px;
    left: 50%;
    transform: translate(-50%,0%);
    border-radius: 0 0 10px 10px;
    pointer-events: none;
}

#other, #high {
    position:fixed;
    top:0px;
    right:50px;
    padding: 1px 10px 5px 10px;
    background-color:#F4F4F7;
    color:#000;
    border-radius: 0 0 4px 4px;
}

#high {
    right:200px;
}

#other a, #high a {
    text-decoration: none;
    color:#000;
}

#other a:hover, #high a:hover {
    color:#a00;
}

#inputscore {
    display: none;
    z-index: 999;
    width: 400px;
    height: 120px;
    padding: 10px;
    border: solid 1px rgb(200, 200, 0);
    box-shadow: 0px 0px 20px 3px rgba(200, 200, 0, 0.9);
    background-color: rgb(255, 255, 255);
    position: fixed;
    top: calc(50% - 50px);
    left: calc(50% - 150px);
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
}

input#yourname {
    height: 30px;
    width: 385px;
    margin-top: 8px;
    margin-bottom: 8px;
    line-height: 30px;
    font-size: 30px;
    padding: 5px;
    outline-color: rgb(250, 250, 250);
}

button#okbutton {
    width: 399px;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    height: 25px;
    cursor: pointer;
    font-size: 20px;
    border: solid 1px rgb(0, 0, 0);
    outline:none;
}

button#okbutton:hover {
    background-color: rgb(60, 60, 60);
}