/* Styling */
/* 
   Variables converted from SCSS. 
   If you do not want to use CSS variables, 
   simply replace var(--...) with the color codes directly.
*/

/* SweetAlert2 */
.lwd-smartfloor-memogame-elementor-widget .swal2-overlay {
  background-color: rgba(255, 255, 255, 1);
}
.swal2-container {
  z-index: 99999;
}
.swal2-container .swal2-title {
  font-size: 1.875rem !important;
}

.lwd-smartfloor-memogame-elementor-widget {
  --background: transparent;
  --card-background: #3C1D6C;
  --card-open-background: #E8A61D;
  --card-match-background: rgba(39, 171, 102, 0.25);
  --card-match-border: #27AB66;
}

/* Widget Container */
.lwd-smartfloor-memogame-elementor-widget {
  background-color: var(--background);
}

.lwd-smartfloor-memogame-elementor-widget .game-description {
  color: #fff;
  text-align: center;
  margin-bottom: 50px;
}

.lwd-smartfloor-memogame-elementor-widget .wrapper {
  display: flex;
  flex-direction: row;
  gap: 100px;
  justify-content: center;
  align-items: center;
}

.lwd-smartfloor-memogame-elementor-widget .memo {
  position: relative;
  width: 70%;
}

.lwd-smartfloor-memogame-elementor-widget .score-and-floor {
  width: 30%;
}

.lwd-smartfloor-memogame-elementor-widget .memo .game-intro {
  position: absolute;
  display: inline-block;
  left: 50%;
  top: 45%;
  transform: translate(-50%,-50%);
  width: 80%;
  z-index: 1;
  text-align: center;
  color: #000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lwd-smartfloor-memogame-elementor-widget .memo .game-intro .game-title {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 5%;
}

.lwd-smartfloor-memogame-elementor-widget .memo .game-intro .game-title img {
  max-width: 75%;
}

.lwd-smartfloor-memogame-elementor-widget .memo .game-intro .intro-description {
  display: inline-block;
  background-color: rgba(255,255,255,0.75);
  border: 2px solid #FFF;
  border-radius: 10px;
  padding: 2.5%;
  font-size: 16px;
  line-height: 1.5;
}

.lwd-smartfloor-memogame-elementor-widget .memo .game-intro .intro-description p:last-child {
  margin-bottom: 0;
  font-weight: bold;
}

/* Deck */
.lwd-smartfloor-memogame-elementor-widget .deck {
  width: 100%;
  margin: 0 auto;
  background-color: transparent;
  background-image: url(../img/screen.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  padding: 4% 25% 9% 25%;
}

/* Cards */
.lwd-smartfloor-memogame-elementor-widget .deck .card {
  position: relative;
  height: 20%;
  width: 20%;
  aspect-ratio: 1 / 1;
  background-color: var(--card-background);
  background-image: url(../img/memogame/back.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: inline-block;
  margin: 2.5%;
  color: #FFF;
  text-align: center;
  vertical-align: top;
  border: 2px solid #FFF;
  border-radius: 0;
  transform: rotateY(180deg);
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  cursor: not-allowed;
  opacity: 0;
}

.lwd-smartfloor-memogame-elementor-widget .deck .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif1::before {
  background-image: url(../img/memogame/motif1.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif2::before {
  background-image: url(../img/memogame/motif2.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif3::before {
  background-image: url(../img/memogame/motif3.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif4::before {
  background-image: url(../img/memogame/motif4.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif5::before {
  background-image: url(../img/memogame/motif5.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif6::before {
  background-image: url(../img/memogame/motif6.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif7::before {
  background-image: url(../img/memogame/motif7.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.motif8::before {
  background-image: url(../img/memogame/motif8.jpg);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.open,
.lwd-smartfloor-memogame-elementor-widget .deck .card.match {
  transform: rotateY(0);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.show::before,
.lwd-smartfloor-memogame-elementor-widget .deck .card.match::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.match {
  border: 4px solid var(--card-match-border);
}

.lwd-smartfloor-memogame-elementor-widget .deck .card.match::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--card-match-background);
}

/* Score Panel */
.lwd-smartfloor-memogame-elementor-widget .score-panel {
  text-align: left;
  margin-bottom: 20px;
  color: var(--card-background);
  font-size: 18px;
}

.lwd-smartfloor-memogame-elementor-widget .score-panel .stars {
  margin: 0 5px 0 0;
  padding: 0;
  display: inline-block;
}

.lwd-smartfloor-memogame-elementor-widget .score-panel .stars li {
  list-style: none;
  display: inline-block;
  padding: 0;
}

.lwd-smartfloor-memogame-elementor-widget .score-panel .stars li::before {
  display: none;
}

.lwd-smartfloor-memogame-elementor-widget .score-panel .restart {
  float: right;
  cursor: pointer;
}

/* Smartfloor */
.lwd-smartfloor-memogame-elementor-widget .smartfloor {
  width: 100%;
  background: #fff;
  padding: 20px;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.25);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn {
  position: relative;
  aspect-ratio: 1 / 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 0;
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn:focus {
  outline: none;
  box-shadow: none;
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-1 {
  background-image: url(../img/memogame/btn-1.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-2 {
  background-image: url(../img/memogame/btn-2.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-3 {
  background-image: url(../img/memogame/btn-3.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-4 {
  background-image: url(../img/memogame/btn-4.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-5 {
  background-image: url(../img/memogame/btn-5.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-6 {
  background-image: url(../img/memogame/btn-6.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-7 {
  background-image: url(../img/memogame/btn-7.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-8 {
  background-image: url(../img/memogame/btn-8.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-9 {
  background-image: url(../img/memogame/btn-9.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-10 {
  background-image: url(../img/memogame/btn-10.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-11 {
  background-image: url(../img/memogame/btn-11.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-12 {
  background-image: url(../img/memogame/btn-12.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-13 {
  background-image: url(../img/memogame/btn-13.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-14 {
  background-image: url(../img/memogame/btn-14.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-15 {
  background-image: url(../img/memogame/btn-15.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.btn-16 {
  background-image: url(../img/memogame/btn-16.svg);
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-image: url(../img/footprint-dark.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 150%;
  transform: rotate(30deg);
  transition: all 0.2s ease-in;
  opacity: 0;
}

.lwd-smartfloor-memogame-elementor-widget .smartfloor .btn.active::before {
  opacity: 0.5;
  background-size: auto 75%;
}


/* Responsive Adjustments (Optional) */

@media (min-width: 768px) and (max-width: 1280px) {

  .lwd-smartfloor-memogame-elementor-widget .wrapper {
    gap: 50px;
  }
}

@media (max-width: 1024px) {

  .lwd-smartfloor-memogame-elementor-widget .wrapper {
    flex-direction: column;
  }

  .lwd-smartfloor-memogame-elementor-widget .memo {
    width: 100%;
  }

  .lwd-smartfloor-memogame-elementor-widget .score-and-floor {
    width: 50%;
  }
}

@media (max-width: 767px) {

  .lwd-smartfloor-memogame-elementor-widget .game-description {
    margin-bottom: 25px;
  }

  .lwd-smartfloor-memogame-elementor-widget .wrapper {
    gap: 25px;
  }

  .lwd-smartfloor-memogame-elementor-widget .deck {
    background-image: url(../img/screen-mobile.svg);
    padding: 2.5%;
  }

  .lwd-smartfloor-memogame-elementor-widget .memo .game-intro .game-title img {
    max-width: 100%;
  }

  .lwd-smartfloor-memogame-elementor-widget .memo .game-intro .intro-description {
    font-size: 14px;
  }

  .lwd-smartfloor-memogame-elementor-widget .score-and-floor {
    width: 75%;
  }

  .lwd-smartfloor-memogame-elementor-widget .score-panel {
    font-size: 16px;
  }

  .lwd-smartfloor-memogame-elementor-widget .smartfloor .grid {
    gap: 10px;
  }
}
