/*root vaiable*/

:root {
  --color-tone-1: #1a1a1b;
  --color-tone-2: #787c7e;
  --color-tone-3: #878a8c;
  --color-tone-4: #d3d6da;
  --color-tone-5: #edeff1;
  --color-tone-6: #f6f7f8;
  --color-tone-7: #ffffff;
  --color-tone-9: #ffffff;
  --opacity-50: rgba(255, 255, 255, 0.5);
  --color-present: var(--yellow);
  --color-correct: var(--green);
  --color-absent: var(--color-tone-2);

  --color-present-light: var(--lightYellow);
  --color-correct-light: var(--lightGreen);
  --color-absent-light: var(--lightGray);

  --color-present-dark: var(--darkendYellow);
  --color-correct-dark: var(--darkendGreen);
  --color-absent-dark: var(--darkGray);

  --tile-text-color: var(--color-tone-7);
  --key-text-color: var(--color-tone-1);
  --key-evaluated-text-color: var(--color-tone-7);
  --key-bg: var(--color-tone-4);
  --key-bg-present: var(--color-present);
  --key-bg-correct: var(--color-correct);
  --key-bg-absent: var(--color-absent);
  --modal-content-bg: var(--color-tone-7);

  --green: #6aab64;
  --darkendGreen: #538d4e;
  --lightGreen: #9dd698;
  --yellow: #b59f3b;/*#c9b458;*/
  --darkendYellow: #b59f3b;
  --lightYellow: #ded197;
  --lightGray: #d8d8d8;
  --gray: #86888a;
  --darkGray: #1d2838;
  --white: #fff;
  --black: #212121;
  --orange: #f5793a;
  --blue: #85c0f9;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  --header-height: 6vh;

  --header-width: 350px;
  --keyboard-height: 200px;
  --keyboard-width: 50vw;
  --game-max-width: 550px;
}

body.colorblind {
  --color-correct: var(--orange);
  --color-present: var(--blue);
  --tile-text-color: var(--white);
  --key-bg-present: var(--color-present);
  --key-bg-correct: var(--color-correct);
  --key-bg-absent: var(--color-absent);

  --color-present-light: var(--blue);
  --color-correct-light: var(--orange);
  --color-absent-light: var(--lightGray);
}

/* board styles*/
#board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-gap: 5px;
  padding: 10px;
  box-sizing: border-box;
}

#boards {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-gap: 5px;
  padding: 10px;
  box-sizing: border-box;
}

#boarde {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-gap: 5px;
  padding: 10px;
  box-sizing: border-box;
}
.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 1px;
}
.win {
  animation-name: Bounce;
  animation-duration: 1000ms;
}

@keyframes Bounce {
  0%,
  20% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  50% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(-15px);
  }
  80% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes Shake {
  10%,
  90% {
    transform: translateX(-1px);
  }

  20%,
  80% {
    transform: translateX(2px);
  }

  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }

  40%,
  60% {
    transform: translateX(4px);
  }
}

/*tile style */
:host {
  display: inline-block;
}
.tile {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  line-height: 2rem;
  font-weight: bold;
  vertical-align: middle;
  box-sizing: border-box;
  color: var(--tile-text-color);
  text-transform: uppercase;
  user-select: none;
  border-color: grey;
}
.tile::before {
  content: "";
  display: inline-block;
  padding-bottom: 100%;
}

/* Allow tiles to be smaller on small screens */
@media (max-height: 600px) {
  .tile {
    font-size: 1em;
    line-height: 1em;
  }
}

.tile[data-state="empty"] {
  border: 2px solid var(--color-tone-4);
}
.tile[data-state="tbd"] {
  background-color: var(--color-tone-7);
  border: 2px solid var(--color-tone-3);
  color: var(--color-tone-1);
}
.tile[data-state="attempt"] {
  background-color: var(--color-tone-7);
  border: 2px solid var(--color-tone-3);
  color: brown;
}
.tile[data-state="correct_attempt"] {
  background-color: var(--color-tone-7);
  border: 2px solid var(--color-tone-3);
  color: green;
}
.tile[data-state="score"] {
  background-color: var(--color-tone-7);
  border: 2px solid var(--color-tone-3);
  color: green;
  fontsize: 20px;
}
.tile[data-state="correct"] {
  background-color: var(--color-correct);
}
.tile[data-state="present"] {
  background-color: var(--color-present);
}
.tile[data-state="absent"] {
  background-color: var(--color-absent);
}
/*light tile color */
.tile[data-state="correct-light"] {
  background-color: var(--color-correct-light);
}
.tile[data-state="present-light"] {
  background-color: var(--color-present-light);
}
.tile[data-state="absent-light"] {
  background-color: var(--color-absent-light);
}

/* dart tile colors*/
.tile[data-state="correct-dark"] {
  background-color: var(--color-correct-dark);
}
.tile[data-state="present-dark"] {
  background-color: var(--color-present-dark);
}
.tile[data-state="absent-dark"] {
  background-color: var(--color-absent-dark);
}

.tile[data-animation="pop"] {
  animation-name: PopIn;
  animation-duration: 100ms;
}

@keyframes PopIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}
.tile[data-animation="flip-in"] {
  animation-name: FlipIn;
  animation-duration: 250ms;
  animation-timing-function: ease-in;
}
@keyframes FlipIn {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(-90deg);
  }
}
.tile[data-animation="flip-out"] {
  animation-name: FlipOut;
  animation-duration: 250ms;
  animation-timing-function: ease-in;
}
@keyframes FlipOut {
  0% {
    transform: rotateX(-90deg);
  }
  100% {
    transform: rotateX(0);
  }
}

/* keyboard style */

:host {
  height: var(--keyboard-height);
}
#keyboard {
  margin: 0 30px;
  user-select: none;
}

.row {
  display: flex;
  width: 100%;
  margin: 0 auto 5px;
  /* https://stackoverflow.com/questions/46167604/ios-html-disable-double-tap-to-zoom */
  touch-action: manipulation;
}

button {
  font-family: inherit;
  font-weight: bold;
  border: 0;
  padding: 0;
  margin: 0 6px 0 0;
  height: 58px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  background-color: var(--key-bg);
  color: var(--key-text-color);
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
}

button:focus {
  outline: none;
}

button.fade {
  transition: background-color 0.1s ease, color 0.1s ease;
}

button:last-of-type {
  margin: 0;
}

.half {
  flex: 0.5;
}

.one {
  flex: 1;
}

.one-and-a-half {
  flex: 1.5;
  font-size: 12px;
}

.two {
  flex: 2;
}

button[data-state="correct"] {
  background-color: var(--key-bg-correct);
  color: var(--key-evaluated-text-color);
}

button[data-state="present"] {
  background-color: var(--key-bg-present);
  color: var(--key-evaluated-text-color);
}

button[data-state="absent"] {
  background-color: var(--key-bg-absent);
  color: var(--key-evaluated-text-color);
}

button[data-state="header"] {
  appearance: auto;
  -webkit-writing-mode: horizontal-tb !important;
  text-rendering: auto;
  color: -internal-light-dark(black, white);
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  display: inline-block;
  text-align: center;
  align-items: flex-start;
  cursor: default;
  background-color: -internal-light-dark(rgb(239, 239, 239), rgb(59, 59, 59));
  box-sizing: border-box;
  margin: 0em;
  font: 400 13.3333px Arial;
  padding: 1px 6px;
  border-width: 2px;
  border-style: outset;
  border-color: -internal-light-dark(rgb(118, 118, 118), rgb(133, 133, 133));
  border-image: initial;
}

button.icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}

.board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
}

#board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
}

.load {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
}

header .title {
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  height: var(--header-height);
  width: var(--header-width);
  color: var(--color-tone-1);
  border-bottom: 1px solid var(--color-tone-4);
}

#game {
  width: 100%;
  max-width: var(--game-max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.toaster {
  position: absolute;
  top: 20%;
  left: 45vw;
  margin-left: 30px;
  margin-top: 10px;
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 10000;
  border-radius: 2px;
  background: black;
  padding: 10px;
  width: 200px;
  height: 30px;
  font-size: 20;
  background-color: var(--gray);
  color: white;
  text-align: center;
  /* animation-name: Bounce;
    animation-duration: 4s;*/
}

.toaster2 {
  position: absolute;
  top: 20%;
  left: 45vw;
  margin-left: 30px;
  margin-top: 10px;
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 10000;
  border-radius: 2px;
  background: black;
  padding: 10px;
  width: 200px;
  height: 40px;
  font-size: 20;
  background-color: var(--gray);
  color: white;
  text-align: center;
  /* animation-name: Bounce;
    animation-duration: 4s;*/
}

.toaster-win {
  position: absolute;
  top: 10%;
  left: 45%;
  margin-left: 30px;
  margin-top: 10px;
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 1;
  border-radius: 2px;
  background: var(--darkendGreen);
  padding: 10px;
  width: 200px;
  height: 30px;
  font-size: 20;
  background-color: var(--darkendGreen);
  color: var(--white);
  text-align: center;
}

.statistic-container {
  flex: 1;
  flex-direction: row;
  margin-top: 5px;
  margin-bottom: 1px;
  margin-left: 5px;
  margin-right: 5px;
  display: flex;
}

.stats {
  width: 90px;
  margin-left: 10px;
  margin-right: 10px;
}

.load1 {
  margin: auto;
  text-align: left;
  border: 0px solid grey;
  border-radius: 2px;
  margin-top: 10px;
  font-family: inherit;
}

.share {
  height: 30px;
  align-items: center;
  display: flex;
  margin-top: 10px;
}

.share2 {
  height: 30px;
  align-items: center;
  display: flex;
  margin-top: 20px;
}

button#share-button {
  flex: 1;
  background-color: #ea8f7c; /* var(--key-bg-correct);*/
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;

  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 30px;
  margin-top: 10px;
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 50px;
  font-size: 20px;
  height: 40px;
  -webkit-filter: brightness(100%);
}

button#share-button2 {
  flex: 1;
  background-color: var(--key-bg-present);
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;

  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 30px;

  font-size: 20px;
  height: 52px;
  -webkit-filter: brightness(100%);
}

button#share-button3 {
  background-color: var(--key-bg-correct);
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 80%;
  font-size: 20px;
  height: 52px;
  -webkit-filter: brightness(100%);
}

button#share-button4 {
  flex: 1;
  background-color: var(--key-bg-correct);
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 50px;
  margin-top: 20px;
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 50px;
  font-size: 20px;
  height: 52px;
  -webkit-filter: brightness(100%);
}

button.share-button20 {
  flex: 1;
  background-color: var(--color-present);
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 50px;
  margin-top: 0px;
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 10px;
  font-size: 20px;
  height: 52px;
  -webkit-filter: brightness(100%);
}

button#share-button5 {
  flex: 1;
  background-color: var(--key-bg);
  color: var(--black);
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  user-select: none;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 30px;
  margin-top: -10px;
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 50px;
  font-size: 20px;
  height: 40px;
  -webkit-filter: brightness(100%);
}

button.share-button6 {
  flex: 1;
  background-color: var(--key-bg-correct);
  color: var(--key-evaluated-text-color);
  font-family: inherit;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  user-select: none;

  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
  width: 70px;

  font-size: 10px;
  height: 30px;
  -webkit-filter: brightness(100%);
}

.share3 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 12px;
  width: 100%;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  bottom: 100%;
  left: 50%;
  margin-left: -60px;

  /* Position the tooltip text - see examples below! */
  position: absolute;
  z-index: 1;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
  visibility: visible;
}

.overlay {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  justify-content: center;
  background-color: var(--color-background);
  animation: SlideIn 100ms linear;
  z-index: 2000;
}

.overlay2 {
  display: none;
  position: absolute;
  width: 100%;
  height: 50%;
  top: 0;
  left: 0;
  justify-content: center;
  background-color: var(--color-background);
  animation: SlideIn 100ms linear;
  z-index: 2000;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

#statistics,
#guess-distribution {
  padding-bottom: 10px;
}

#statistics2 {
  display: flex;
}

.statistic-container {
  flex: 1;
}

.statistics3 {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  width: 100%;
  height: 80%;
  background-color: white;
  align-content: space-between;
}

.statistic-container .statistic {
  font-size: 36px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.05em;
  font-variant-numeric: proportional-nums;
}
.statistic-container .label {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer {
  display: flex;
  width: 100%;
}
.countdown {
  border-right: 1px solid var(--color-tone-1);
  padding-right: 30px;
  width: 50%;
}

.statistic.timer {
  font-variant-numeric: initial;
}

ul {
  list-style-type: none;
  color: #999999;
}
ul li:before {
  content: "\2014";
  position: absolute;
  margin-left: -20px;
}

a:link {
  color: red;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: red;
  background-color: transparent;
  text-decoration: none;
}

.graph-container {
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  padding-bottom: 4px;
  font-size: 14px;
  line-height: 20px;
}

.graph-container .graph {
  width: 100%;
  height: 100%;
  padding-left: 4px;
}

.graph-container .graph .graph-bar.align-right {
  justify-content: flex-end;
  padding-right: 8px;
}

.graph-container .graph .graph-bar {
  height: 100%;
  width: 0%;
  position: relative;
  background-color: var(--color-absent);
  display: flex;
  justify-content: center;
}

.graph-container .graph .num-guesses {
  font-weight: bold;
  color: var(--tile-text-color);
}

#guess-distribution {
  width: 90%;
}

input[type=text] {
  border: none;
  border-bottom: 2px solid green;
}
