/*  
Copyright 2014, Daniel Beck and Karin Beck

This file is part of Green Mahjong.

Green Mahjong 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.

Green Mahjong 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 Green Mahjong.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
Groß: 
===
Aussen: 100x80
Innen: 95x75

Klein: 
=====
Aussen:60x48
Innen:57x45*/

body{
  font:   15px "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#timer, .points {
  font-size: 1.4rem;
  color: #ffcc01;
  z-index: 19;
  border-radius: 6px;
  padding: 1px 3px;
  position: absolute;
  bottom: 5px;
}

.points{
  right:120px;
}

#timer{
  right: 9px;
}

div#background {
  z-index:-20;
  background: #2f3d0d url(../../images/games/mahjong/background_fruits.jpg) no-repeat center center;
  background-size: cover;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
}

.scrollable{
  overflow-y:auto;
  height:100%
}

div#winningMessage {
  width: 70%;
  max-width: 800px;
  max-height: 700px;
  height: 85%;
  display: none;
  padding:25px;
  border-width: 2px;
  border-style: solid;
  border-color: #5fdaff;
  background-color: rgba(0,0,0,0.7);
  color:#ececea;
  position: absolute;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  text-align: center;
  margin: auto;
}
div#winningMessage h3, div#loseMessage h3, div#loseMessage h1 {
  color:#ececea;
}

#startScreen{
  z-index:20;
  background: #2f3d0d url(../../images/games/mahjong/background_fruits.jpg) no-repeat center center;
  background-size: cover;
  position: absolute;
  width: 100%;
  height: 100%;
  color:#ececea;
  text-align: center;
  display: block;
  overflow-y:auto;  
}

#layouts  div.layoutSelection{
  display: inline-block;
}
div#layouts div.layoutSelection p {
    position: absolute;
    top: 130px;
    left: 95px;
}
div.scene{
  z-index:81;
  background: rgba(72, 72, 72, 0.5);
  position: absolute;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
  color:#ececea;
  text-align: center;
  display: none;
  overflow-y:auto;
}
div.scene section {
  padding: 2em;
}
div.scene h2, div.scene h3{
  color: #72def9;
}
div#aboutScreen {
  background: #3e4449 url(../../images/games/mahjong/background_classic.jpg) no-repeat center center;
}
div.relativescene{
  z-index:20;
  background-attachment:  fixed;
  background-size: cover;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
  color:#ececea;
  text-align: center;
  display: none;
  overflow-y:auto;
}

div.scene h3,div.relativescene h3, #startScreen h3{
  margin: 2px 0;    
}

div#startScreen h1{
  padding-top: 8px;
}

.mahjong .button {
  border-radius:6px;
  display:inline-block;
  cursor:pointer;
  font-size:20px;
  font-weight:bold;
  padding:6px 24px;
  text-decoration:none;
}


.gameStatisticsScreen a.button, #aboutScreen a.button,#loseMessage a.button,#winningMessage a.button, .popup a.button, #menuScreen a.addBorder, #menuScreen h2.addBorder,#loseMessage h2.addBorder, #winningMessage h2.addBorder{
  border-color: #acf6ff;
  padding:12px;
  max-width: 280px;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 0;
  color: black;
  cursor:pointer;
  display:block;
  font-size: 16px;
  font-weight: bold;
  margin:1.25em auto;
}
.mahjong .button.small{
  border-radius:8px;
  padding:6px;
  margin-bottom:6px;
  border:none;
  box-shadow:none;
}

.mahjong .button span{
  font-size:13px;
  color:black;
  text-shadow:none;
}
.mahjong .button:hover {
  background:-o-linear-gradient(top, #9ce7ff 5%, #c2f3ff 100%);
  background:-ms-linear-gradient(top, #9ce7ff 5%, #c2f3ff 100%);
  background: linear-gradient(to bottom, #9ce7ff 5%, #c2f3ff 100%);
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9ce7ff', endColorstr='#c2f3ff',GradientType=0);
  background-color: #a1e8ff;
  color: #565656;
}
.mahjong .button:active {
  position:relative;
  top:1px;
}

div#loseMessage {
  width: 60%;
  max-width: 700px;
  height: 70%;
  max-height: 350px;
  display: none;
  padding:25px;
  border-width: 2px;
  border-style: solid;
  border-color: #5fdaff;
  background-color: rgba(0,0,0,0.7);
  color:#ececea;
  position: absolute;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  text-align: center;
  margin: auto;
}
div.game-buttons{
  position: absolute;
  z-index: 80;
  display:inline-block;
  top:0;
  left:0;
  width: 100%;
}
div#game-sound-buttons {
  position: absolute;
  z-index: 85;
  top: 5px;
  right: 180px;
}
div#game-sound-buttons div {
  display: inline-block;
}
div#game-coins-display {
  position: absolute;
  z-index: 85;
  top: 0;
  right: 20px;
}
div#game-coins-display .signUpBlock {
    margin-top: .5em;
    height: 40px;
    line-height: 1.4em;
}
div.game-buttons ul{
  list-style: none;
  display:block;
  padding: 0;
  padding-top:8px;
  margin:0;
}

div.game-buttons  ul li a {
  text-decoration: none;
  color: white;
  font-size: 1.0rem;
}

div.game-buttons  ul li{
  width:50px;
  padding: 0 0 0 6px;
  text-decoration: none;
  text-align: center;
  float: left;
  margin-right: .5em;
}
#mahjong-coin-earnings {
  color: #fff;
  margin-left: 12px;
  top: 8px;
  position: relative;
}

.outer {
  display: table;
  position: absolute;
  height: 100%;
  width: 100%;
  height: 92vh;
}

.middle {
  display: table-cell;
  vertical-align: middle;
  padding:0;
}

.inner {
  margin-left: auto;
  margin-right: auto;
}


#game {
  size: auto;
}

.animated.hinge {
  -webkit-animation-duration: 1.1s;
  -moz-animation-duration: 1.1s;
  animation-duration: 1.1s;
  -webkit-filter:none;
  filter: none;
}

@-webkit-keyframes hinge{
  0%{-webkit-transform:rotate(0deg);
     transform:rotate(0deg);
     -webkit-transform-origin:top left;
     transform-origin:top left;
     -webkit-animation-timing-function:ease-in-out;
     animation-timing-function:ease-in-out;
  }
  20%{
    -webkit-transform:rotate(60deg);
    transform:rotate(60deg);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out
  }
  40%{
    -webkit-transform:rotate(40deg);
    transform:rotate(40deg);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out;
  }
  41%{
    -webkit-transform:rotate(40deg) translateY(0);
    transform:rotate(40deg) translateY(0);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out;
    opacity:1;
  }
  100%{
    -webkit-transform:translateY(200px);
    transform:translateY(200px);
    opacity:0;
  }
}


@keyframes hinge{
  0%{
    -webkit-transform:rotate(0deg);
    transform:rotate(0deg);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out;
  }
  20%{
    -webkit-transform:rotate(60deg);
    transform:rotate(60deg);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out
  }
  40%{
    -webkit-transform:rotate(40deg);
    transform:rotate(40deg);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out;
  }
  41%{
    -webkit-transform:rotate(40deg) translateY(0);
    transform:rotate(40deg) translateY(0);
    -webkit-transform-origin:top left;
    transform-origin:top left;
    -webkit-animation-timing-function:ease-in-out;
    animation-timing-function:ease-in-out;
    opacity:1;
  }
  100%{
    -webkit-transform:translateY(200px);
    transform:translateY(200px);
    opacity:0;
  }
}
.hinge{-webkit-animation-name:hinge;animation-name:hinge}

div.layoutSelection {
    border-radius:6px;
    border: 3px solid rgba(0,0,0,0);
    margin-top:20px;
    margin-left: 0px;
    display: inline-block;
    position: relative;
    cursor:pointer;
    background-color: rgba(230, 230, 230, 0.56);
}

div.layoutSelection h3 {
  color: #222222;
  font-weight: bold;
}
div#layouts div.turtle{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: 0px 0px;
}


div#layouts div.flower{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: -300px 0px;
}


div#layouts div.spider{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: -600px 0px;
}


div#layouts div.cloud{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: -900px 0px;
}
div#layouts div.bug{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: -1200px 0px;
}

div#layouts div.fourHills{
  width: 300px;
  height: 220px;
  background-image: url('../../images/games/mahjong/layouts_thumbs.png');
  background-position: -1500px 0px;
}


div.layoutSelection:hover{
    border: 3px solid #89e3ff;
    -webkit-box-shadow: 0 0 21px 5px #000000d9;
    box-shadow: 0 0 21px 5px #000000bf;
}

div.newline{
  display:none;
}

@media (min-width: 651px) and (max-width:1009px){
  div.newline.even{
    display:block;
  }
}

@media (min-width: 1010px){
  div.newline.threeDivisible{
    display:block;
  }
}

#cards {
  position: relative; 
  margin-left: auto;
  margin-right: auto;
  display: block;
  width:200px;
}

.card {
  opacity: 1;
  left: 72px;
  top: 0px;
  position: absolute;
  box-shadow: -5px -5px 11px 0 #00000024;
}
div.card-selected, div.card-selected[data-selectable=true]:hover {
  -webkit-box-shadow: 0 0 5px 7px orange;
  box-shadow: 0 0 5px 7px orange;
}
body.hint-on li#activateHints .image{
  filter:grayscale(80%);
  -webkit-filter:grayscale(80%);
}

.button.small{
  background: #444445;
}
body[data-theme=classic][data-resolution=verysmallscreen] .card,
body[data-theme=classic][data-resolution=verysmallscreen].hint-on .card.card-matching,
body[data-theme=classic][data-resolution=verysmallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_classic.png);
}
body[data-theme=classic][data-resolution=verysmallscreen].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_classic_bw.png);
}

body[data-theme=classic][data-resolution=smallscreen] .card,
body[data-theme=classic][data-resolution=smallscreen].hint-on .card.card-matching,
body[data-theme=classic][data-resolution=smallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_classic.png);
}
body[data-theme=classic][data-resolution=smallscreen].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_classic_bw.png);
}

body[data-theme=classic][data-resolution=normal] .card,
body[data-theme=classic][data-resolution=normal].hint-on .card.card-matching,
body[data-theme=classic][data-resolution=normal].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong-210-classic.png);
}
body[data-theme=classic][data-resolution=normal].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong-210-classic-bw.png);
}

body[data-theme=classic][data-resolution=bigscreen] .card,
body[data-theme=classic][data-resolution=bigscreen].hint-on .card.card-matching,
body[data-theme=classic][data-resolution=bigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_classic.png);
}
body[data-theme=classic][data-resolution=bigscreen].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_classic_bw.png);
}

body[data-theme=classic][data-resolution=verybigscreen] .card,
body[data-theme=classic][data-resolution=verybigscreen].hint-on .card.card-matching,
body[data-theme=classic][data-resolution=verybigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_classic.png);
}
body[data-theme=classic][data-resolution=verybigscreen].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_classic_bw.png);
}


body[data-theme=fruits][data-resolution=verysmallscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_fruits_bw.png);
}
body[data-theme=fruits][data-resolution=verysmallscreen] .card,
body[data-theme=fruits][data-resolution=verysmallscreen].hint-on .card.card-matching,
body[data-theme=fruits][data-resolution=verysmallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=smallscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_fruits_bw.png);
}
body[data-theme=fruits][data-resolution=smallscreen] .card,
body[data-theme=fruits][data-resolution=smallscreen].hint-on .card.card-matching,
body[data-theme=fruits][data-resolution=smallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=normal] .card,
body[data-theme=fruits][data-resolution=normal].hint-on .card.card-matching,
body[data-theme=fruits][data-resolution=normal].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong-210-fruits.png);
}
body[data-theme=fruits][data-resolution=normal].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong-210-fruits-bw.png);
}


body[data-theme=fruits][data-resolution=bigscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_fruits_bw.png);
}
body[data-theme=fruits][data-resolution=bigscreen] .card,
body[data-theme=fruits][data-resolution=bigscreen].hint-on .card.card-matching,
body[data-theme=fruits][data-resolution=bigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=verybigscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_fruits_bw.png);
}
body[data-theme=fruits][data-resolution=verybigscreen] .card,
body[data-theme=fruits][data-resolution=verybigscreen].hint-on .card.card-matching,
body[data-theme=fruits][data-resolution=verybigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_fruits.png);
}

body[data-theme=highvisibility][data-resolution=verysmallscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_highvisibility_bw.png);
}
body[data-theme=highvisibility][data-resolution=verysmallscreen] .card,
body[data-theme=highvisibility][data-resolution=verysmallscreen].hint-on .card.card-matching,
body[data-theme=highvisibility][data-resolution=verysmallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verysmallscreen_highvisibility.png);
}

body[data-theme=highvisibility][data-resolution=smallscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_highvisibility_bw.png);
}
body[data-theme=highvisibility][data-resolution=smallscreen] .card,
body[data-theme=highvisibility][data-resolution=smallscreen].hint-on .card.card-matching,
body[data-theme=highvisibility][data-resolution=smallscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_smallscreen_highvisibility.png);
}

body[data-theme=highvisibility][data-resolution=normal] .card,
body[data-theme=highvisibility][data-resolution=normal].hint-on .card.card-matching,
body[data-theme=highvisibility][data-resolution=normal].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong-210-highvisibility.png);
}
body[data-theme=highvisibility][data-resolution=normal].hint-on .card{
  background-image: url(../../images/games/mahjong/mahjong-210-highvisibility-bw.png);
}

body[data-theme=highvisibility][data-resolution=bigscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_highvisibility_bw.png);
}
body[data-theme=highvisibility][data-resolution=bigscreen] .card,
body[data-theme=highvisibility][data-resolution=bigscreen].hint-on .card.card-matching,
body[data-theme=highvisibility][data-resolution=bigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_bigscreen_highvisibility.png);
}



body[data-theme=highvisibility][data-resolution=verybigscreen].hint-on  .card{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_highvisibility_bw.png);
}
body[data-theme=highvisibility][data-resolution=verybigscreen] .card,
body[data-theme=highvisibility][data-resolution=verybigscreen].hint-on .card.card-matching,
body[data-theme=highvisibility][data-resolution=verybigscreen].hint-on .card.animated.hinge{
  background-image: url(../../images/games/mahjong/mahjong_verybigscreen_highvisibility.png);
}

body[data-theme=fruits] div#background{
  background-image: url(../../images/games/mahjong/background_classic.jpg);
}

body[data-theme=classic] div#background{
  background-image: url(../../images/games/mahjong/background_classic.jpg);
}

body[data-theme=highvisibility] div#background{
  background-image: url(../../images/games/mahjong/background_highvisibility.jpg);
}


.menu {background-position: 0 0}
.undo {background-position: -150px 0}
.new {background-position: -200px 0}
.hint {background-position: -250px 0}
.theme {background-position: -250px 0}

div#game-container {
    position: relative;
}