/*
 * TuxMath JS
 * 
 * Author: Julien Marin - projet Afrikalan  
 * Contact: julien.marin@afrikalan.org
 * Licence: AGPL-3.0-or-later, see COPYING file
 */



/*
 * Comets
 * 
 */

.obj_commet
{
  position: absolute;
  z-index: 10;
}

.obj_commet__question {
    color: white;
    font-size: 1.5rem;
    font-family: sans;
    position: absolute;
    font-weight: bold;
    
/*     background: #000000b3; */
    padding: .5rem;
/*     border-radius: 2rem; */
    transform: translate(-25%, 0%);
/*     text-shadow: 3px 3px 2px black, -3px -3px 2px black, 3px -3px 2px black, -3px 3px 2px black; */
    text-shadow: 3px 0px 2px #787878, -3px 0px 2px #787878, 0px 3px 2px #787878, 0px -3px 2px #787878;
    white-space: nowrap;
}

.anim-cometfall
{
  animation-name: cometfall;
  animation-duration: 3s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
}

body.gamePaused .anim-cometfall
{
  animation-play-state: paused;
}
  
@keyframes cometfall {
  from {bottom: 100%; }      
  to { bottom: 4rem; bottom: calc(1rem + 57px); }      
}

/*
 * Igloos
 * 
 */

.obj_igloo {
    position: absolute;
    bottom: 1rem;
    z-index: 0;
}

.obj_igloo__imgigloo {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 1;
}

.obj_igloo__imgpenguin{
    position: absolute;
    transform: translate(-43%, -113%);
    z-index: 0;
}

.theme-afrikalan .obj_igloo__imgpenguin {
  transform: translate(-52%,-114%);
}

/*
 * Leaving penguins
 * 
 * */

@keyframes penguinleave--left {
  from { margin-left: 0px; }      
  to { margin-left: -900px; }      
}

.obj_penguinleave--left
{
  position:absolute;
  animation-name: penguinleave--left;
  animation-duration: 13s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
  transform: scaleX(-1);
}

@keyframes penguinleave--right {
  from { margin-left: 0px; }      
  to { margin-left: 900px; }
}

.obj_penguinleave--right
{
  position:absolute;
  animation-name: penguinleave--right;
  animation-duration: 13s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
}


@keyframes penguindance {
  from { margin-left: 0px; transform: scaleX(1); }      
  22% { transform: scaleX(1); }
  25% { margin-left: -200px; transform: scaleX(-1); }      
  75% { margin-left: 200px; transform: scaleX(-1); }      
  78% { transform: scaleX(1); }
  to { margin-left: 0px; }      
}

.obj_penguindance
{
  position:absolute;
  animation-name: penguindance;
  animation-duration: 12s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}


/*
 * Console
 * 
 */

.obj_console {
    bottom: 0px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);
}

.obj_console__tux {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translate(-50%, 0%);
  z-index: 10;
}

.obj_console__display {
  position: absolute;
  top: 5;
  left: 24px;
  width: 118;
  height: 46;
  color: white;
  font-family: fixed;
  background-color: black;
  text-align: right;
  font-size: 40;
  z-index: 1;
}

@keyframes redblink {
  from  { background-color: black; }      
  10%   { background-color: black; }      
  30%   { background-color: red; }      
  50%   { background-color: black; }      
  70%   { background-color: red; }
  90%   { background-color: black; }
  to    { background-color: black; }      
}
.obj_console__display--redblink
{
  animation-name: redblink;
  animation-duration: 0.75s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
}

@keyframes yellowblink {
  from  { background-color: black; }      
  10%   { background-color: black; }      
  30%   { background-color: #fbcd16; }      
  50%   { background-color: black; }      
  70%   { background-color: #fbcd16; }
  90%   { background-color: black; }
  to    { background-color: black; }      
}
.obj_console__display--yellowblink
{
  animation-name: yellowblink;
  animation-duration: 0.75s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
}



/*
 * Lasers
 * 
 */

.obj_laser { 
  height: 0px;
  border-bottom: 3px solid #fffb00;
  position: absolute;
  transform-origin: top left;
  -webkit-transform-origin: top left;
  box-shadow: 0px 0px 3px 3px #ffb300;
  border-radius: 3px;
}


/*
 * Toast messages
 * 
 */

.o-toast {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 1000;
  padding: 1rem;
  background: #0009;
  border-radius: 2rem;
  display: flex;
}

.o-toast__text {
  color: white;
  font-family: sans;
  font-size: 1.25rem;
}

.o-toast__icon { margin-right: .66rem; }

.o-toast__icon img { height: 3rem; }


/*
 * Game end messages
 * 
 */


.o-overlay-messagegameend
{
  z-index: 1000;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
}

.o-overlay-messagegameend__message
{
  position: relative;
  display: inline-block;
  margin-top: 21%;
  background: rgba(102, 102, 102, 0.66);
  width: 75%;
  border-radius: 2rem;
}

.o-overlay-messagegameend__message__main
{
  color: white;
  font-size: 4rem;
  margin: 2rem;
  font-family: sans;
}


.o-overlay-messagegameend__message__sub
{
  color: white;
  font-size: 1.5rem;
  margin: 2rem;
}

@media (max-width: 1000px)
{
  .obj_igloo__imgpenguin {
    max-width: 50;
    max-height: 47;
  }
  .obj_igloo__imgigloo {
    width: 75;
  }
  .obj_commet img {
    width: 42;
  }
  .obj_commet__question {
    font-size: 1.15rem;
    padding: 0.15rem;
    transform: translate(-19%, 0%);
  }
  
  .layout-game__commetsIgloosColmuns__col > * {
    transform: translate(-39%, 0%);
  }
  
  .obj_penguinleave--left {
    height: 48px;
    padding-top: 81;
  }
  
  .obj_penguinleave--right {
    height: 48px;
     padding-top: 81;
  }
  
  .obj_penguindance {
    max-height: 54px;
  }

}

@media (max-width: 850px)
{
  .o-overlay-messagegameend__message {
    margin: 2rem;
    width: auto;
  }
}

@media (max-width: 700px)
{
  .obj_igloo__imgpenguin {
    max-width: 34;
    max-height: 32;
  }
  .obj_igloo__imgigloo {
    width: 51;
  }
  .obj_commet img {
    width: 28;
  }
  .obj_commet__question {
    font-size: 1rem;
    padding: 0;
  }
  
  .layout-game__commetsIgloosColmuns__col > * {
    transform: translate(-39%, 0%);
  }
  
  .obj_console__display {
    top: 3;
    left: 18px;
    width: 85;
    height: 34;
    font-family: fixed;
    font-size: 32;
  }
  
  .obj_console__tux {
    height: 48px;
  }
  
  .obj_console {
    background-size: contain;
    width: 122px !important;
    height: 80px !important;
  }
  
    .obj_penguinleave--left {
    height: 35px;
    padding-top: 13;
  }
  
  .obj_penguinleave--right {
    height: 35px;
     padding-top: 13;
  }
  
  .obj_penguindance {
    max-height: 35px;
  }
}

@media (max-width: 520px)
{
  .o-overlay-messagegameend__message {
    margin: 2rem;
    width: auto;
  }
  .o-overlay-messagegameend__message__main {
    font-size: 3rem;
    margin: 1rem;
  }
  .o-overlay-messagegameend__message__sub {
    font-size: 1.15rem;
    margin: 1.5rem;
  }
}
