@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/OpenSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Open Sans Bold';
  src: url('../fonts/OpenSans-Bold.ttf') format('truetype');
}

body {
    font-family: "Open Sans", Arial, Tahoma, Geneva, sans-serif;
    margin: 0;
    padding: 0;
    color: #555;
    font-size: 1rem;
}

form {
    width: 100%;
    margin-top: 10px;
}

h1 {
    font-size: 2rem;
    line-height: 1.75rem;
    margin-bottom: 0.2rem;
    text-align: center;
    color: #45c03f;
    background-color: #000;
}

h2 {
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin: 15px;
}

p {
    line-height: 1.5rem;
}

a {
    color: SteelBlue;
}

a:hover {
    color: #36658c;
}

div#container {
    position: relative;
    display: block;
    margin: 10px auto;
    text-align: center;
}

label {
    margin: 1.4rem 0 0.4rem 1rem;
    font-weight: bold;
    clear: both;
    display: inline-block;
}

button {
    background-color: SteelBlue;
    border-radius: 5px;
    border: 1px SteelBlue solid;
    margin: .5rem;
    padding: 0.5rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.6s;
}

button:hover {
    background-color: #36658c;
    border: 1px #36658c solid;
}

.alt {
    background-color: transparent;
    border: 1px SteelBlue solid;
    color: #333;        
}

.alt:hover {
    background-color: transparent;
    border: 1px #36658c solid;
    color: SteelBlue;
}

ul {
    margin: 2rem 0;
    list-style-type: circle;
}

li {
    line-height: 1.8rem;
}

input[type="checkbox"] {
  top: 0.3rem;
  position: relative;
  width: 1.4rem; height: 1.4rem;
}

input[type="radio"] {
    margin: 1.6rem 0 2rem 1rem;
}

hr {
    border: 0;
    height: 1px;
    background: #555;
    margin: 2rem 0;
}

/* Application specific CSS */

header {
    display: block;
    margin: 0 20px;
    text-align: center;
    font-family: "Open Sans Bold", Arial, Tahoma, Geneva, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    border-bottom: solid 1px #666;
}

header img {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

#show-instructions {
    float: left;
    font-size: .5rem;
    vertical-align: top;
    font-weight: normal;
}
#show-settings {
    float: right;
    font-size: .75rem;
    vertical-align: top;
    font-weight: normal;
    margin-left: 1rem;
}
#show-stats {
    float: right;
    font-size: .5rem;
    vertical-align: top;
    font-weight: normal;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.instructions,
.game {
    display: inline-block;
    margin: 0 auto;
}

.keyboard .row {
    display: flex;
    width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap;
    justify-content: center;
    flex-direction: row;
}
.puzzle {
    display: inline-block;
}

#share:focus,
#share:active,
#share,
#challenge:focus,
#challenge:active,
#challenge {
    position: absolute;
    left: -9999em;
    border: none;
    outline: none;
}

.puzzle_link {
    display: none;
}

* {
    user-select: none !important;
    caret-color: transparent;
}

.settings ul {
    margin: 2rem 0;
    list-style-type: none;
    text-align: left;
}

#alert {
    position: absolute;
    top: 20vh;
    display: none;
    margin: 0 auto;
    padding: 1em;
    text-align: left;
    font-family: "Open Sans", Arial, Tahoma, Geneva, sans-serif;
    color: #fff;
    background: #000;
    border-radius: 5px;
    box-shadow: 5px 5px 5px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}


.win,
.lose,
.incorrect,
.settings,
.stats,
.instructions {
    position: absolute;
    top: 10vh;
    left: calc((100vw - 500px) / 2);
    width: 80vw;
    max-width: 500px;
    height: 80vh;
    display: none;
    vertical-align: top;
    text-align: center;
    margin: 0;
    padding: 0;
    font-family: "Open Sans", Arial, Tahoma, Geneva, sans-serif;
    background: #fff;
    border: solid #eee 1px;
    box-shadow: 5px 5px 5px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.graph-container {
    width: 80%;
    height: 1.5rem;
    margin: .25rem auto;
}

.graph-container .guess {
    float: left;
}

.graph-container .graph-bar {
    height: 1.5rem;
    min-width: 1.5rem;
    margin: 0 0 0 1em;
    background-color: #787C7E;
}

.graph-container .graph-bar.current {
    background-color: #6EAA67;
}

.graph-container .graph-bar .num-guesses {
    color: #fff;
    float: right;
    margin: 0 .5em 0 0;
}

.puzzle {
    font-family: "Open Sans Bold", Arial, Tahoma, Geneva, sans-serif;
    font-size: 1rem;
}

.puzzle tbody td {
    text-align: center;
    padding: 0;
    color: #000;
}

.puzzle tbody td div {
    display: block;
    margin: 0;
    border: none;
    outline: none;
    box-sizing: auto;
    border: solid #ccc 2px;
    border-radius: 0;
    text-align: center;
    font-family: "Open Sans Bold", Arial, Tahoma, Geneva, sans-serif;
    font-weight: bold;
    font-size: 2rem;
    height: 60px;
    line-height: 60px;
    width: 60px;
}

.puzzle tbody td div.populated {
    border: solid #999 2px;
}

.puzzle.small tbody td div {
    height: 30px;
    line-height: 30px;
    width: 30px;
}

.solution {
    display: inline-block;
    font-family: "Courier Prime", monotype;
    margin: 10px;
    border: solid #ccc 1px;
}

.solution table {
    float: left;
    padding: 10px;
}

.error {
    color: red;
}

.keyboard button.key.correct,
.puzzle tbody td div.correct {
    color: #fff;
    background-color: #6EAA67;
}

.keyboard button.key.found,
.puzzle tbody td div.found {
    color: #fff;
    background-color: #C9B25D;
}

.keyboard button.key.missing,
.puzzle tbody td div.missing {
    color: #fff;
    background-color: #787C7E;
}

button.key,
button.key:active,
button.key:focus,
button.key:hover {
    display: inline-block;
    color: #000;
    background-color: #CCC;
    line-height: 2.5rem;
    text-align: center;
    border: none;
    margin: .25rem .2rem;
    /* padding: 1rem 1.5rem; */
    font-size: 0.9rem;
    font-weight: bold;
}

button#key-BS,
button#key-BS:active,
button#key-BS:hover {
    line-height: 1rem;
}

.big {
    font-size: 1rem;
}

#winner {
    display: none;
    position: absolute;
    top: 0;
    z-index: 5;
}

/* Allow tiles to be smaller on small screens */
@media (max-height: 650px) {
    .puzzle tbody td div {
        height: 30px;
        line-height: 30px;
        width: 30px;
    }

    .puzzle_link {
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    .win,
    .lose,
    .incorrect,
    .settings,
    .stats,
    .instructions {
        left: 10vw;
    }

    button.key,
    button.key:hover {
        line-height: 2rem;
        padding: .65rem;
        text-align: center;
        border: none;
    }
}

@media (max-width: 430px) {
    .lose .puzzle tbody td div {
        height: 30px;
        line-height: 30px;
        width: 30px;
    }

    .puzzle_link {
        font-size: 14px;
    }
}

td[data-animation='shake'] {
  animation-name: Shake;
  animation-duration: 500ms;
}

@keyframes Shake {
  0% {
    transform: translateX(-10px)
  }

  10% {
    transform: translateX(0)
  }

  10% {
    transform: translateX(10px)
  }

  30% {
    transform: translateX(0)
  }

  40% {
    transform: translateX(-10px)
  }

  50% {
    transform: translateX(0)
  }

  60% {
    transform: translateX(10px)
  }

  70% {
    transform: translateX(0)
  }

  80% {
    transform: translateX(-10px)
  }

  90% {
    transform: translateX(0)
  }

  100% {
    transform: translateY(0)
  }
}

td[data-animation='jump'] {
  animation-name: Jump;
  animation-duration: 250ms;
}

@keyframes Jump {
  0% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(-20px)
  }

  100% {
    transform: translateY(0)
  }
}

td[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);
  }
}
td[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);
  }
}

div[data-animation='populate'] {
  animation-name: Populate;
  animation-duration: 100ms;
  animation-timing-function: ease-in;
}
@keyframes Populate {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

