/* 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-mathgame-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-mathgame-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-mathgame-elementor-widget {
  background-color: var(--background);
}

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

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

.lwd-smartfloor-mathgame-elementor-widget .calculator {
  position: relative;
  width: 70%;
}

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

.lwd-smartfloor-mathgame-elementor-widget .calculator .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-mathgame-elementor-widget .calculator .game-intro .game-title {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 5%;
}

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

.lwd-smartfloor-mathgame-elementor-widget .calculator .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-mathgame-elementor-widget .calculator .game-intro .intro-description p:last-child {
  margin-bottom: 0;
  font-weight: bold;
}

/* Calculator */
.lwd-smartfloor-mathgame-elementor-widget .calculator {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 10;
  background-color: transparent;
  background-image: url(../img/screen.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .interface {
  margin-top: -4%;
  opacity: 0;
  transition: opacity 0.3s ease;
  min-width: 33%;
  background-color: #555;
  border: 2px solid #fff;
  cursor: not-allowed;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .display {
  background: var(--card-background);
  color: #fff;
  font-size: 32px;
  text-align: right;
  padding: 15px;
  width: 100%;
  display: flex;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .display .total,
.lwd-smartfloor-mathgame-elementor-widget .calculator .display .correctResult {
	display: flex;
  flex-direction: column;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .display .total .label,
.lwd-smartfloor-mathgame-elementor-widget .calculator .display .correctResult .label {
	font-size: 14px;
	text-transform: uppercase;
  margin-bottom: 5px;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .display .correctResult {
  text-align: left;
  color: #000;
	border-radius: 10px;
  padding: 15px;
  background: rgba(255,255,255,0.75);
  line-height: 1;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .display .total {
  width: 100%;
  text-align: right;
  line-height: 1;
  padding: 15px 0 15px 15px;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 15px 60px;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .btn {
  font-size: 24px;
  color: #000;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: #fff;
  border: none;
  border-radius: 4px;
  pointer-events: none;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .btn.operator {
  background: #f9a825;
  color: #fff;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .btn.equal {
  background: #27AB66;
  color: #fff;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator .btn:disabled,
.lwd-smartfloor-mathgame-elementor-widget .calculator button[disabled].btn:disabled {
  background: grey;
  opacity: 0.5;
}

.lwd-smartfloor-mathgame-elementor-widget .calculator button.btn.active {
    animation: pulse 1s infinite;
}

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

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

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

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

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

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

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

.lwd-smartfloor-mathgame-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-mathgame-elementor-widget .smartfloor .btn:focus {
  outline: none;
  box-shadow: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.lwd-smartfloor-mathgame-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-mathgame-elementor-widget .smartfloor .btn:nth-child(4n).active::before,
.lwd-smartfloor-mathgame-elementor-widget .smartfloor .btn:nth-last-child(-n+4):not(:nth-child(4n)).active::before {
  background-image: url(../img/footprint-light.svg);
}

.lwd-smartfloor-mathgame-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-mathgame-elementor-widget .wrapper {
    gap: 50px;
  }
}

@media (max-width: 1024px) {

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

  .lwd-smartfloor-mathgame-elementor-widget .calculator {
    width: 100%;
  }

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

@media (max-width: 767px) {

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

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

  .lwd-smartfloor-mathgame-elementor-widget .calculator {
    background-image: url(../img/screen-mobile.svg);
    aspect-ratio: 1/1;
  }

  .lwd-smartfloor-mathgame-elementor-widget .calculator .interface {
    margin-top: 0;
  }

  .lwd-smartfloor-mathgame-elementor-widget .calculator .display {
    font-size: 24px;
  }

  .lwd-smartfloor-mathgame-elementor-widget .calculator .display .total .label,
  .lwd-smartfloor-mathgame-elementor-widget .calculator .display .correctResult .label {
    font-size: 12px;
  }

  .lwd-smartfloor-mathgame-elementor-widget .calculator .btn {
    font-size: 18px;
  }

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

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

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

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

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