
body {
  --font-family: "Lexend Deca", sans-serif;
  --font-weight: 350;
  --game-console-height: 30px;
  --line-height: 1.3em;

  background-color: white; /* Or #fff or #ffffff */
  font-family: var(--font-family);
  font-weight: var(--font-weight);
  font-size: 14px;
}

* {
  box-sizing: content-box;
}

.bigbut {
  width:100%; height:100%; display:block;
}

.shake {
  animation: shake 0.5s;
  animation-iteration-count: 1;
}

.shake.partial-match {
  background-color: rgb(255, 2, 99);
}

.red {
  color: red;
}

.game-bar {
  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-size: 14px;
  font-weight: var(--font-weight);

  padding: .2em .5em;
  display: flex;
  flex-direction: row;
  gap: 2em;

  position: fixed;
  z-index: 999;
  left: 0;
  right: 0;

  background-color: lightblue;

  button {
    font-family: var(--font-family);
    font-size: .9em;
    padding: .2em .5em;
    font-weight: var(--font-weight);
  }
}

#game_console {
  top: 0;
  box-shadow: 0px -5px 20px hsl(0, 0%, 45.1%);
}

#game_control {
  bottom: 0;
  box-shadow: 0px 5px 20px hsl(0, 0%, 45.1%);
}


.instructions {
  line-height: var(--line-height);
  margin-bottom: 1em;
  padding: 0 .5em;

  .two-at-a-time {
    white-space: nowrap;
    font-size: .8em;
  }
}


.score {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: .5em;
  white-space: nowrap;
  align-items: center;

  .item {
    line-height: var(--line-height);
  }
}

#selection {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .5em;
  flex: 1;
  min-width: 0;
}
#selected {
  font-size: .9em;
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: bold;
  flex: 1;
}
#deselect {
  font-size: .9em;
}

#board {
  padding-top: 20px;
  padding-bottom: 20px;

  /* Make the board the scroll container so the top bar stays visually fixed. */
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--game-console-height);
  top: var(--game-console-height);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#the_table {
  /* takes the scale (default 1 and updates the buttons */
  font-size: calc(var(--board-scale, 1) * 1em);
  --cell-gap: .2em;

  display: flex;
  flex-direction: column;
  gap: var(--cell-gap);

  .row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--cell-gap);
  }

  .cell {
    transition: all 0.2s ease;

    display: flex;
    flex-direction: row;
    align-items: center;

    &::before {
      transition: all 0.3s ease;
      content: 'Place Here';
      text-align: center;
      display: inline-block;
      width: 0em;
      height: 1em;
      pointer-events: none;
      opacity: 0;
    }

    &.drag-over{
      &:before {
        border: 1px dashed hsl(194.7, 53.3%, 42%);
        padding: .5em;
        margin-right: .5em;
        width: 12em;
        opacity: 1;
      }
      /* padding-left: 13em; */
    }
  }

  button {
    font-size: inherit;
    margin: .2em;

    font-family: var(--font-family);
    width: 12em;
    padding: .3em;
    margin: .1em;
    font-weight: var(--font-weight);

    &[disabled] {
      border: 1px solid hsl(0, 0%, 40%);
      color: hsl(0, 0%, 35%);
      border-radius: 5px;
    }
    &.end-button {
      outline: 3px solid red;
      visibility: hidden;
    }
  }
}

/*
Scale
*/
#reset_board_scale {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  min-width: auto;

  svg {
    fill: hsl(194.7, 53.3%, 42%);
    width: 2em;
    height: 2em;
  }
}

/*
Fireworks
*/
#fireworks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

@keyframes shake {
  0% { transform: translateX(1px) rotate(0deg); }
  10% { transform: translateX(-1px) rotate(-1deg); }
  20% { transform: translateX(-3px) rotate(1deg); }
  30% { transform: translateX(3px) rotate(0deg); }
  40% { transform: translateX(1px) rotate(1deg); }
  50% { transform: translateX(-1px) rotate(-1deg); }
  60% { transform: translateX(-3px) rotate(0deg); }
  70% { transform: translateX(3px) rotate(-1deg); }
  80% { transform: translateX(-1px) rotate(1deg); }
  90% { transform: translateX(1px) rotate(0deg); }
  100% { transform: translateX(1px) rotate(-1deg); }
}

.setting-window {
    display: none;
    position: absolute;
    right: 0;
    width: 150px;
    line-height: 2em;
    list-style: none;
    background-color: white;
    border: 2px solid lightblue;
    padding: 1em;

  &.top {
    top: 10px;
  }

  &.bottom {
    bottom: 20px;
  }

  a {
    color: hsl(194.7, 53.3%, 42%);

    &:hover {
      color: hsl(194.7, 53.3%, 22%);
    }
  }

  li.hidden {
    display: none;
  }

  li.disabled a {
    color: hsl(0, 0%, 40%);
    pointer-events: none;
  }

  li[data-tooltip] {
    position: relative;

    &::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 0;
      right: 100%;
      transform: translateX(-1em);
      background-color: black;
      color: white;
      padding: 5px;
      border-radius: 3px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease-in-out;
    }

    &:hover::after {
      opacity: 1;
    }
  }
}

.settings-container {
  position: relative;
}
.settings-container:focus-within {
  .setting-window {
    display: block;
  }
}

#board_scale {
 width: 200px;
}


/* .settings {
  position: relative;

  #board_sizes {
    display: none;
    position: absolute;
    top: 10px;
    right: 0;
    width: 150px;
    line-height: 2em;
    list-style: none;
    background-color: white;
    border: 2px solid lightblue;
    padding: 1em;

    a {
      color: hsl(194.7, 53.3%, 42%);

      &:hover {
        color: hsl(194.7, 53.3%, 22%);
      }
    }
  }
}
.settings:focus-within {
  #board_sizes {
    display: block;
  }
} */

dialog {
  padding: 1em;
  border: 2px solid lightblue;

  &::backdrop {
    background-color: rgba(0, 0, 0, 0.3);
  }
}