/* easter2024 memory */

/* -------------- */
/* DESKTOP */
/* TABLET */
/* MOBILE */
/* SPECIAL BREAKPOINTS */
/* -------------- */



/* DESKTOP ****************************************************************************************/

.slim-af {
  max-width: 800px;
  margin: 0 auto;
}

.teaser-text {
  padding-top: 50px;
}


/* MEMORY */

/***** board */
#memory-container {
  position: relative;
  margin: 50px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: 100px;
  z-index: 2;
}

.memory-container__inner {
  width: 850px;
  margin: 0 auto;
  position: relative;
  display: block;
}

.deck {
  position: relative;
  width: 100%;
  margin: 0;
}

.deck .card {
  width: 150px;
  height: 150px;
  margin: 10px;
  float: left;
  position: relative;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 4px 3px 15px -2px rgba(0, 0, 0, 0.3);

  background: url('/wp-content/themes/buechelicenter/inc/easter-game-2024/media/bc_ostern_karte_rueckseite.jpg');
  background-size: 100% 100%;

  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

.deck .card img {
  visibility: hidden;
}

.deck .card.open {
  transform: rotateY(0);
  cursor: default;
  animation-name: flipInX;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  animation-duration: .75s;
}

.deck .card.open img,
.deck .card.match img {
  visibility: visible;
}


.deck .card.match {
  cursor: default;
  background: #E5F720;
  font-size: 33px;
  animation-name: pulse;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  animation-duration: .65s;
}

.deck .card.unmatched {
  animation-name: rubberBand;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  animation-duration: .4s;
  background: #e2043b;
}

.deck .card.disabled {
  pointer-events: none;
  cursor: default;
}


/****** score panel */
#score-panel {
  float: right;
  width: 93px;
  margin-bottom: 10px;
  overflow-x: visible;
  white-space: nowrap;
}


/****** congratulations popup */
.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 0.5s;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.overlay:target {
  visibility: visible;
  opacity: 1;
}

.overlay.visible {
  visibility: visible !important;
  opacity: 1;
  z-index: 9999;
  pointer-events: all;
}


.popup {
  margin: 70px auto;
  padding: 50px;
  background: #309FAD;
  /* Old browsers */
  background: -moz-radial-gradient(center, ellipse cover, #a8dfe6 27%, #309FAD 100%);
  /* FF3.6-15 */
  background: -webkit-radial-gradient(center, ellipse cover, #a8dfe6 27%, #309FAD 100%);
  /* Chrome10-25,Safari5.1-6 */
  background: radial-gradient(ellipse at center, #a8dfe6 27%, #309FAD 100%);
  width: 50%;
  height: calc(100vh - 140px);
  overflow-y: scroll;
  max-width: 950px;
  min-width: 700px;
  position: relative;
  text-align: center;
  border: 5px solid #0e2e31;
  box-shadow: 10px 10px 30px -5px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.popup h2 {
  margin-top: 0;
}

.popup .close {
  position: absolute;
  display: block;
  top: 10px;
  right: 25px;
  transition: all 0.2s;
  font-size: 50px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  line-height: 1em;
}

.popup .close:hover {
  color: #b90303;
}

button#play-again {
  margin-bottom: 50px;
}


/***** tombola signup */
#tombola-signup-wrap {
  background: #0a636e;
  margin: 50px;
  padding: 20px;
}

#tombola-signup-wrap * {
  color: #fff;
}

#tombola-signup-wrap input,
#tombola-signup-wrap button {
  color: #000;
}

button#send-tombola-signup {
  margin-bottom: 30px;
}


/****** confetti */
.confetti {
  position: absolute;
  pointer-events: none;
}

.confetti.red {
  background-color: #E94A3F;
}

.confetti.yellow {
  background-color: #FAA040;
}

.confetti.blue {
  background-color: #5FC9F5;
}



/****** animations */
@keyframes flipInX {
  from {
    transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
    animation-timing-function: ease-in;
  }

  40% {
    transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
    animation-timing-function: ease-in;
  }

  60% {
    transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
  }

  80% {
    transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
  }

  to {
    transform: perspective(400px);
  }
}

@keyframes rubberBand {
  from {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(1.2, 0.8, 1);
  }

  40% {
    transform: scale3d(0.8, 1.2, 1);
  }

  50% {
    transform: scale3d(1.1, 0.9, 1);
  }

  65% {
    transform: scale3d(0.9, 1.1, 1);
  }

  75% {
    transform: scale3d(1.05, .95, 1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

@keyframes pulse {
  from {
    transform: scale3d(1, 1, 1);
  }

  50% {
    transform: scale3d(1.1, 1.1, 1.1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}




/* TABLET ****************************************************************************************/

@media only screen and (max-width: 800px) {

  .teaser-text {
    padding-top: 100px;
  }

  .memory-container__inner {
    width: 100%;
    margin: 0;
  }

  /***** memory board */
  .deck .card {
    width: 18%;
    height: 18%;
    margin: 1%;
  }

  /***** popup */
  .popup {
    margin: 50px auto;
    height: calc(100vh - 100px);
    padding: 40px;
    width: 90%;
    min-width: unset;
  }

  #tombola-signup-wrap {
    margin: 0;
    margin-bottom: 40px;
  }

}


/* MOBILE ****************************************************************************************/


@media only screen and (max-width: 480px) {

  .memory-container__inner {
    width: 100%;
    margin: 0;
  }

  /***** memory board */
  .deck .card {
    width: 21%;
    height: 21%;
    margin: 2%;
  }

  /***** popup */
  .overlay {
    overflow-y: scroll;
  }

  .popup {
    margin: 0 auto;
    padding: 15px 0 0 0;
    width: 100%;
    overflow: hidden;
    height: auto;
  }

  .popup__inner {
    padding: 25px;
  }

  #tombola-signup-wrap {
    margin: 0;
    padding: 25px;
  }

  button#play-again {
    margin-bottom: 0;
  }

}


/* SPECIAL BREAKPOINTS ****************************************************************************************/

@media only screen and (min-width: 801px) and (max-width: 900px) {

  .memory-container__inner {
    width: 750px;
  }

  .deck .card {
    width: 130px;
    height: 130px;
    margin: 10px;
  }

}