@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-style: normal;
  src: url('/fonts/Poppins-Medium.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-style: normal;
  src: url('/fonts/Poppins-SemiBold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  font-style: normal;
  src: url('/fonts/Poppins-Bold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 800;
  font-style: normal;
  src: url('/fonts/Poppins-ExtraBold.ttf');
}

:root {
  --background: floralwhite;

  @media (prefers-color-scheme: dark) {
    --background: #333;
  }
  
}

* {
  padding: 0;
  margin: 0;
}

html {
  overflow: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;

  @media (orientation: landscape) {
    padding: 30px 20px;
  }

  @media (orientation: portrait) {
    padding: 60px 20px 30px;
  }

}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 70px;
  box-sizing: border-box;
  overflow: hidden;

  @media (max-width: 450px) {
    gap: 60px;
  }

}

.wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}

.brick {
  display: inline-block;
  position: relative;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  transition: all .5s cubic-bezier(0.83, 0, 0.17, 1);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--brick-size);
  height: var(--brick-size);
  line-height: var(--brick-size);
  font-size: var(--brick-font-size);
  box-sizing: border-box;

  &[data-transition="slow"] {
    transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1);
    transition-duration: 5s;
    transition-delay: 5s;
  }

  &[data-group="0"] {
    color: var(--color-0);
  }

  &[data-group="1"] {
    color: var(--color-1);
  }

  &[data-group="2"] {
    color: var(--color-2);
  }

  &[data-group="3"] {
    color: var(--color-3);
  }

  &[data-group="4"] {
    color: var(--color-4);
  }

  &[data-group="5"] {
    color: var(--color-5);
  }

  &[data-group="6"] {
    color: var(--color-6);
  }

  &.disable {
    color: grey;
  }

  &[data-selected="true"]:after {
    display: block;
    content: attr(data-pos);
    position: absolute;
    top: -40px;
    right: -15px;
    font-size: 25px;
    font-weight: 700;

    @media (max-width: 450px) {
      top: -22px;
      right: -10px;
      font-size: 18px;
    }
    
  }

  /* &[data-mismatch="true"] {
    border-radius: 100%;
    background-color: black;
  } */

}

[data-hints="false"] [data-selected="true"]:after {
  display: none;
}

button {
  border-radius: 4px;
  background-color: grey;
  padding: 10px 25px;
  font-size: 20px;
  font-family: inherit;
  font-weight: 700;
  color: white;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .25s;
  border: solid 1px rgba(0, 0, 0, 0.25);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;

  @media (max-width: 450px) {
    font-size: 18px;
    padding: 5px 15px;
  }
  
  &[data-group="0"] {
    background-color: var(--color-0);
  }

  &[data-group="1"] {
    background-color: var(--color-1);
  }

  &[data-group="2"] {
    background-color: var(--color-2);
  }

  &[data-group="3"] {
    background-color: var(--color-3);
  }

  &[data-group="4"] {
    background-color: var(--color-4);
  }

  &[data-group="5"] {
    background-color: var(--color-5);
  }

  &[data-group="6"] {
    background-color: var(--color-6);
  }

  &:active {
    transform: scale(0.9);
  }

  &.disable {
    background-color: grey;
  }
  
  &[data-type="choice"] {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    appearance: none;
    padding: 0;
    text-align: center;
    color: transparent;
    text-shadow: none;
    box-shadow: inset 0 2px rgba(0, 0, 0, 0.25);

    @media (max-width: 450px) {
      width: 38px;
      height: 38px;
    }

  }

  &[data-type="hidden"],
  &[data-type="mode"] {
    background-color: transparent;
    /* background-color: rgba(255, 0, 0, 0.1); */
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  &[data-type="mode"] {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;

    @media (orientation: landscape) {
      display: none;
    }

  }

}

.brick,
button {

  &.disable {
    opacity: 0.25;
    pointer-events: none;
  }

}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 40px;

  @media (orientation: landscape) {
    display: none;
  }

}

.buttons-top,
.buttons-bottom {
  display: flex;
  gap: 25px;
  justify-content: center;

  @media (max-width: 450px) {
    gap: 12px;
  }

}

.hidden-buttons {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  left: -250px;
  right: -250px;
  
  button {
    width: 100%;
    height: var(--brick-size);
  }

  @media (orientation: portrait) {
    display: none;
  }

}
