/*  
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*/


html {
  /*background: #2f3d0d url(../images/background_fruits.jpg) no-repeat center center;*/
  /*background-attachment:  fixed;*/
  /*background-size: cover;*/
}

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

#timer,.points{
  position:fixed;
  font-size: 1.4rem;
  color: #ffcc01;
  z-index:19;
  border-radius: 6px;
  padding:1px 3px;
  /*left: 16px;*/
}

.points{
  right:120px;
}
#points{
  /*text-align: center;*/
  /*right: 30px;*/
}

#timer{
  /*bottom:85px;*/
  right: 9px;
}

div#background {
  z-index:-20;
  background: #2f3d0d url(../images/background_fruits.jpg) no-repeat center center;
  /*background-attachment:  fixed;*/
  background-size: cover;
  position: fixed;
  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: 65%;
  display: none;
  background-color: red;
  padding:25px;
  border-width: 2px;
  border-style: solid;
  border-color:#ffcc01;
  background-color: rgba(0,0,0,0.7);
  color:#ececea;
  position: fixed;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  text-align: center;
  margin: auto;
}

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

#layouts  div.layoutSelection{
  display: inline-block;
}

div.scene{
  z-index:20;
  background: #2f3d0d url(../images/background_fruits.jpg) no-repeat center center;
  /*background-attachment:  fixed;*/
  background-size: cover;
  position: fixed;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
  color:#ececea;
  text-align: center;
  display: none;
  overflow-y:auto;
}

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 h1,  div.scene h2,  div.scene h3, 
div.relativescene h1,  div.relativescene h2,  div.relativescene h3,
#startScreen h1, #startScreen h2, #startScreen h3{
  color:#ffcc01;
}

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

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

.button {
  -moz-box-shadow: 0px 1px 0px 0px #fff6af;
  -webkit-box-shadow: 0px 1px 0px 0px #fff6af;
  box-shadow: 0px 1px 0px 0px #fff6af;
  background:-o-linear-gradient(top, #ffec64 5%, #ffab23 100%);
  background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffec64', endColorstr='#ffab23',GradientType=0);
  background-color:#ffec64;
  border-radius:6px;
  border:1px solid #ffaa22;
  display:inline-block;
  cursor:pointer;
  color:#333333;
  font-family:arial;
  font-size:20px;
  font-weight:bold;
  padding:6px 24px;
  text-decoration:none;
  text-shadow:0px 1px 0px #ffee66;
}

div.scene.gameStatisticsScreen, #aboutScreen{
  z-index:90;
}

.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:1px solid #ffcc01;
  padding:12px;
  /*margin:20px 40px;*/
  max-width: 280px;
  /*text-align: center;*/
  /*  margin-left: auto;
    margin-right: auto;*/
  text-decoration: none;
  background:rgba(255, 200,01,1);
  border-radius: 0;
  color: black;
  cursor:pointer;
  display:block;
  font-size: 16px;
  font-weight: bold;
  margin:12px auto;
  /*font*/
}
.button.small{
  color:#ffcc01;
  border-radius:8px;
  padding:6px;
  margin-bottom:6px;
  /*background:rgba(190,190,190,0.4);*/
  background:rgba(30, 60, 15, 1);
  border:none;
  box-shadow:none;

  text-shadow:0px 1px 0px #ffee66;
}

.button span{

  font-size:13px;

  color:black;
  text-shadow:none;

}
.button:hover {
  /*    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffab23), color-stop(1, #ffec64));
      background:-moz-linear-gradient(top, #ffab23 5%, #ffec64 100%);
      background:-webkit-linear-gradient(top, #ffab23 5%, #ffec64 100%);*/
  background:-o-linear-gradient(top, #ffab23 5%, #ffec64 100%);
  background:-ms-linear-gradient(top, #ffab23 5%, #ffec64 100%);
  background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffab23', endColorstr='#ffec64',GradientType=0);
  background-color:#ffab23;
}
.button:active {
  position:relative;
  top:1px;
}

div#loseMessage {
  width: 60%;
  max-width: 700px;
  height: 70%;
  max-height: 350px;
  display: none;
  background-color: red;
  padding:25px;
  border-width: 2px;
  border-style: solid;
  border-color:#ffcc01;
  background-color: rgba(0,0,0,0.7);
  color:#ececea;
  position: fixed;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  text-align: center;
  margin: auto;
}

div#versionInformationDialog{
  width: 80%;
  height: 70%;
  display: none;
  background-color: red;
  padding:15px;
  border-width: 2px;
  border-style: solid;
  border-color:#ffcc01;
  background-color: rgba(0,0,0,0.7);
  color:#ececea;
  position: fixed;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  /*text-align: center;*/
  margin: auto;
  font-size: 1.3rem;
}

div#versionInformationDialog section{ 
  width: 98%;
  height: 90%;
  padding: 10px;
  overflow-y: auto;
  padding:15px;
  /*font-size: 1.8rem;*/
}

div#versionInformationDialog section ul{ 
  font-size: 1.2rem;
}


div.game-buttons{
  position: fixed;
  z-index: 80;
  top:0;
  display:inline-block;
  top:0px;
  left:0px;
}

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;
  /*font-weight: bold;*/
}

div.game-buttons  ul li{
  width:50px;
  /*float: right;*/
  padding: 0 0 0 6px;
  text-decoration: none;
  text-align: center;
}

/*div.game-buttons  ul li:first-child{
  width:50px;
  float: left;
  padding: 0 6px;
  text-decoration: none;
  text-align: center;
}*/

div.game-buttons ul li img{
  width:24px;
  height: 24px;
}

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

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

.inner {
  margin-left: auto;
  margin-right: auto; 
  /*width: whatever width you want;*/
}


#game {
  size: auto;
  /*padding:9px;*/
}


/*@-moz-document url-prefix() { 
    #game {
        bottom:0;
    }
}*/
.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}

@media (min-height:405){
  #game{   
    bottom:0;
  }
}

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;
  /*overflow-y: auto;*/
  /*ffcc01*/
  /*height: 100%;*/
  background-color: rgba(0,0,0,0.4);
}

/*div#layouts{
  overflow-y:visible;
  position: absolute;
  width: 100%;
  height: 100%;
  top:0;
  left:0;
  color:#ececea;
  text-align: center;
  display: none;
  overflow-y:auto;
}*/
div#layouts div.turtle{
  width: 300px;
  height: 220px;
  background-image: url('../images/layouts_thumbs.png');
  background-position: 0px 0px;
}


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


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


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

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


div.layoutSelection:hover{
  border: 3px solid #ffcc01;
  -webkit-box-shadow: 0 0 12px 12px black;
  box-shadow: 0 0 21px 5px black;
}

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;
}

.shadow {
  position: absolute;
}



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 .card {
  filter:grayscale(80%);
  -webkit-filter:grayscale(100%);
  filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");  Firefox 3.5+ 
}
body.hint-on .card.card-matching,body.hint-on .card.animated.hinge {
  filter:grayscale(0%);
  -webkit-filter:none;
  filter: none;
}*/

body.hint-on li#activateHints .image{
  filter:grayscale(80%);
  -webkit-filter:grayscale(80%);
}
/*.card-matching {
  -webkit-filter: saturate(2) contrast(2);
  -moz-filter: saturate(2) contrast(2);
  filter: saturate(2) contrast(2);    
}*/

.image {
  /*border-radius: 15px;*/
  height: 46px;
  width: 50px;
  border: none;
  /*background: transparent url('../images/mahjong_bigscreen.png');*/
  background-color: transparent;
  background-image:  url('../images/application_icons.png');
}


body[data-theme=turtle] .button.small{
  background: rgb(30, 60, 15);
}
body[data-theme=classic] .button.small{
  background: #383227;
}
body[data-theme=highvisibility] .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/mahjong_verysmallscreen_classic.png);
}
body[data-theme=classic][data-resolution=verysmallscreen].hint-on .card{
  background-image: url(../images/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/mahjong_smallscreen_classic.png);
}
body[data-theme=classic][data-resolution=smallscreen].hint-on .card{
  background-image: url(../images/mahjong_smallscreen_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/mahjong_bigscreen_classic.png);
}
body[data-theme=classic][data-resolution=bigscreen].hint-on .card{
  background-image: url(../images/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/mahjong_verybigscreen_classic.png);
}
body[data-theme=classic][data-resolution=verybigscreen].hint-on .card{
  background-image: url(../images/mahjong_verybigscreen_classic_bw.png);
}


body[data-theme=fruits][data-resolution=verysmallscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_verysmallscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=smallscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_smallscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=bigscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_bigscreen_fruits.png);
}

body[data-theme=fruits][data-resolution=verybigscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_verybigscreen_fruits.png);
}

body[data-theme=highvisibility][data-resolution=verysmallscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_verysmallscreen_highvisibility.png);
}

body[data-theme=highvisibility][data-resolution=smallscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_smallscreen_highvisibility.png);
}


body[data-theme=highvisibility][data-resolution=bigscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_bigscreen_highvisibility.png);
}



body[data-theme=highvisibility][data-resolution=verybigscreen].hint-on  .card{
  background-image: url(../images/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/mahjong_verybigscreen_highvisibility.png);
}

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

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

body[data-theme=highvisibility] div#background{
  background-image: url(../images/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}