@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  font-size: clamp(0.5rem, 2.5vmin, 1.5rem);
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(20, minmax(auto, 1.25em));
  grid-auto-rows: 3em;
  gap: 0.25em;
  justify-content: center;
  margin-bottom: 40px;
}

.key {
  font-size: inherit;
  grid-column: span 2;
  border: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: hsl(
    var(--hue, 200),
    var(--saturation, 1%),
    calc(var(--lightness-offset, 10%) + var(--lightness, 51%))
  );
  color: black;
  fill: black;
  text-transform: uppercase;
  border-radius: 0.25em;
  cursor: pointer;
  user-select: none;
}

.key.large {
  grid-column: span 3;
}

.key > svg {
  width: 1.75em;
  height: 1.75em;
}

.key.wrong {
  --lightness: 23%;
}

.key.wrong-location {
  --hue: 49;
  --saturation: 51%;
  --lightness: 47%;
}

.key.correct {
  --hue: 115;
  --saturation: 29%;
  --lightness: 43%;
}

.guess-grid {
  display: grid;
  justify-content: center;
  align-content: center;
  flex-grow: 0.8;
  grid-template-columns: repeat(5, 4em);
  grid-template-rows: repeat(6, 4em);
  gap: 0.25em;
}

.tile {
  font-size: 2em;
  color: white;
  border: none;
  border-radius: 0.5rem;
  background-color: #bbb;
  text-transform: uppercase;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  transition: transform 250ms linear;
}

.tile[data-state="active"] {
  border-color: #545859;
}
.active {
  border-color: #545859;
}

.tile[data-state="wrong"] {
  border: none;
  background-color: #39393c;
}

.wrong {
  background-color: #39393c;
}

.tile[data-state="wrong-location"] {
  border: none;
  background-color: #b59f3b;
}

.tile[data-state="correct"] {
  border: none;
  background-color: #538d4e;
}

.tile.shake {
  animation: shake 250ms ease-in-out;
}

.tile.dance {
  animation: dance 500ms ease-in-out;
}

.tile.flip {
  transform: rotateX(90deg);
}

@keyframes shake {
  10% {
    transform: translateX(-5%);
  }

  30% {
    transform: translateX(5%);
  }

  50% {
    transform: translateX(-7.5%);
  }

  70% {
    transform: translateX(7.5%);
  }

  90% {
    transform: translateX(-5%);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes dance {
  20% {
    transform: translateY(-50%);
  }

  40% {
    transform: translateY(5%);
  }

  60% {
    transform: translateY(-25%);
  }

  80% {
    transform: translateY(2.5%);
  }

  90% {
    transform: translateY(-5%);
  }

  100% {
    transform: translateY(0);
  }
}

.alert-container {
  position: fixed;
  top: 10vh;
  left: 50vw;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.alert {
  pointer-events: none;
  background-color: #000000;
  color: whitesmoke;
  padding: 0.75em;
  border-radius: 0.25em;
  opacity: 1;
  transition: opacity 500ms ease-in-out;
  margin-bottom: 0.5em;
}

.alert:last-child {
  margin-bottom: 0;
}

.alert.hide {
  opacity: 0;
}



@media screen and (max-width: 600px) {
  .guess-grid {
    flex-grow: 0.1;
    grid-template-columns: repeat(5, 6em);
    grid-template-rows: repeat(6, 6em);
    gap: 0.5em;
  }
  .keyboard {
    grid-template-columns: repeat(20, minmax(auto, 1.5em));
    /* gap: 0.5em; */
    width: 375px;
    margin-bottom: 5px !important;
    max-width: 100vw;
    /* grid-auto-rows: 4.5em; */
  }
  .web {
    display: none;
  }
  .mobile {
    display: flex;
    width: 80%;
    height: 35px;
  }
  .key.large {
    grid-column: span 6;
  }
  .key{
    font-size: 13px;
  }
}
.mobile{
  display: none;
}
.eng{
  display: grid;
}
.hebrew{
  display: none;
}
@media screen and (max-width: 600px) {
  .web {
    display: none;
  }
  .mobile {
    display: flex;
    width: 50%;
    height: 35px;
  }
  .key.large {
    grid-column: span 4;
  }
  .key.xlarge {
    grid-column: span 6;
  }
  .key.xxlarge {
    grid-column: span 7;
  }
  .key{
    font-size: 13px;
  }
  .enterButton{
    display: flex;
    width: 100%;
    justify-content: flex-end;
    width: 375px;
    max-width: 100vw;
  }
}


h1#title {
  background: #ffffffdb;
  border-radius: 15px;
  padding: 5px;
  margin-bottom: 5px;
}

.keyboard.hebrew .hide-in-hebrew {
  display: none;
}

@media screen and (min-width: 601px) {
  .space{
    display: none;
  }
  button#deleteKey {
    grid-column: span 7;
}
}