/*
Copyright (C) 2018 Alkis Georgopoulos <alkisg@gmail.com>.
SPDX-License-Identifier: CC-BY-SA-4.0
*/
* {
  box-sizing: border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html, body {  /* flexbox needs this to center the main div */
  width: 100%;
  height: 100%;
}

body {
  background-image: url('resource/background.svg') center center;
  background-size: 100% 100%;
  background-color: rgb(0,0,0);
  color: rgb(255,255,255);
  font-size: 10px;
  margin: 0;
  display: flex;
  align-items: center;  /* vertically center main div */
  justify-content: center;  /* horizontally center main div */
/*  overflow: hidden;  /* avoid scrollbars when dragging outside */
}

#sounds{
  display: none;
}

#main {
  /* SVG backgrounds need preserveAspectRatio="none" in many browsers. */
  background: rgb(255,255,255) url('resource/background.svg');
  -webkit-background-size: 100% 100%;
  -moz-background-size: 100% 100%;
  -o-background-size: 100% 100%;
  background-size: 100% 100%;
  height: 36em;
  width: 64em;
  text-align: center;
  /*overflow: hidden;*/
  padding-bottom: 5em; /* space for the menubar */
  display: flex;
  align-content: space-around;
  justify-content: space-around;
  flex-wrap: wrap;
  position: relative;
}

#animals {
  display:none;
}

#backcards{ 
  display:none;
}

#emptycards{
  display:none;
}
/* IE doesn't support @supports, so declare its style in the initial rule.
 Edge claims to support space-evenly but it doesn't, use space-around:
 https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15947692/
 Finally, old android webviews don't support space-evely at all.
*/
@supports (align-content: space-evenly) and (not (-ms-ime-align: auto)) {
  #main {
    align-content: space-evenly !important;
    justify-content: space-evenly !important;
  }
}

#original, #clone, #stock {
  display: flex;
  flex-wrap: wrap;
  /*overflow: hidden;*/
  padding: 0.2em 0 0 0.2em; /* Omit the right/bot padding for miscalculations */
}

#original {
  background-color: rgba(240,192,192,0.5);
  width: 26.84em;
}

#clone {
  background-color: rgba(192,240,192,0.5);
  width: 26.84em;
}

#stock {
  background-color: rgba(192,192,240,0.5);
  width: 53.24em;
}

#original img, #clone img, #stock img {
  width: 4.4em;
  height: 4.4em;
  /* Use padding instead of margin to minimize annoying cursor shape changes */
  padding: 0.2em; /* padding = width/20 */
}

#stock img {
  cursor: move;
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;
}

#stock img:hover {
  -webkit-filter: brightness(120%) contrast(1.2);
  filter: brightness(120%) contrast(1.2);
  transform: scale(1.1);
}

#stock img:active {
  opacity: 0.5;
}

@-webkit-keyframes menubar_animation {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menubar_animation {
  from { opacity: 0; }
  to { opacity: 1; }
}

#menubar {
  display: flex;
  align-items: center;
  background-color-: rgba(127,127,127,0.5);
  position: absolute;
  left: 0em;
  bottom: 0.5em;
  padding: 0 0.5em 0 0.5em;
  border-: 0.1em solid rgba(255,255,255,0.5);
  border-radius: 0 1em 1em 0;
  -webkit-animation: menubar_animation;
  animation-name: menubar_animation;
  -webkit-animation-duration: 4s;
  animation-duration: 4s;
}

#menubar img {
  width: 3.5em;
  height: 3.5em;
  margin: 0.5em;
  cursor: pointer;
}

#menubar img:hover {
  -webkit-filter: brightness(120%) contrast(1.2);
  filter: brightness(120%) contrast(1.2);
  transform: scale(1.1);
}

#menubar img:active {
  -webkit-filter: brightness(80%) contrast(1.2) !important;
  filter: brightness(80%) contrast(1.2) !important;
  transform: scale(1);
}

#menubar p {
  display: inline;
  font-size: 3em;
  margin: 0;
}

#dragimg {
  display: none;
  position: absolute;
  width: 6em;
  height: 6em;
  opacity: 0.5;
}

#help {
  display: none;  /* javascript toggles that to flex */
  align-items: center;
  justify-content: center;
  position: fixed;
  background-color: rgba(63,63,63,0.5);
  width: 100%;
  height: 100%;
  top: 0;  /* IE and old webview ignore "fixed" for flex childs */
  left: 0;
}

#help .dialog {
  text-align: center;
  width: 19em;
  background-color: rgb(255,255,255);
  color: rgb(0,0,0);
  padding: 1em;
  border: 0.2em solid rgb(80,80,80);
  border-radius: 0.5em;
  -webkit-filter: drop-shadow(0.5em 0.5em 0.5em rgb(80,80,80));
  filter: drop-shadow(0.5em 0.5em 0.5em rgb(80,80,80));
  font-size: 2em;
}

.cards {
  display: table;
}

.card {
  perspective: 1000px;
}
.row {
  display: table-row;
  /*overflow: visible;*/
}

.col {
  display: table-cell;
  position: relative;
  cursor : pointer;
}

.animal {
  position:absolute;
  margin-top:1em;
  left:0;
  width:120%;
}

#level {
  color: #FF5626;
}

#balloongood{
  transform: scale(0.5);
}
@keyframes flipithide {
     0%   {transform: rotateY(0deg);}
   100% {transform: rotateY(90deg);}  
}

@keyframes flipitshow {
     0%   {transform: rotateY(90deg);}
   100% {transform: rotateY(0deg);}  
}


@keyframes reset {
     0%   {transform: rotateY(0deg);}
   100% {transform: rotateY(0deg);}  
}

@keyframes balloon {
     0%   {transform: scale(0.5);}
     100% {transform: scale(1);}
}