body {
  font-family: commuters-sans, sans-serif;
}

.header {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 2rem;
  margin-bottom: 2rem;
}

.correct-word-message {
  font-size: 1.5rem;
  padding: 1rem;
  text-align: center;
  display: none;
}

.utility-nav {
  position: relative;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

.utility-nav__item {
  padding: 0;
  margin: 0 0 0 1rem;
  float: right;
  display: block;
  height: 40px;
  width: 40px;
  position: relative;
}

.utility-nav__item a {
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
}

.utility-nav__item img {
  width: 40px;
}

.utility-nav__item--logo {
  float: left;
  height: 32px;
  display: block;
  position: relative;
  margin: 0 0 0 0;
}

.utility-nav__item--logo img {
  position: relative;
  height: 100%;
  width: auto;
  margin-top: 3px;
}

@media screen and (max-width: 850px) {
  .header {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 12px;
  }
}

.wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

#game-board {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.letter-box {
  border: 2px solid gray;
  border-radius: 3px;
  margin: 2px;
  font-size: 2.5rem;
  font-weight: 700;
  height: 3rem;
  width: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
}

/* .filled-box {
    border: 2px solid black;
} */

.letter-row {
  display: flex;
}

#keyboard-cont {
  margin: 1rem 0 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#keyboard-cont div {
  display: flex;
}

.second-row {
  margin: 4px 0;
}

.keyboard-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 2px;
  min-width: 40px;
  min-height: 52px;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
  outline: none;
  border-radius: 5px;
  background-color: #464646;
}

@media screen and (max-width: 500px) {
  .keyboard-button {
    min-width: 30px;
    padding: 0;
  }
}

/* FLIP ANIMATION */
@keyframes flip-correct {
  0% {
    transform: rotateX(0deg);
  }

  50% {
    background-color: initial;
    border-color: #383023;
    transform: rotateX(90deg);
  }

  51% {
    background-color: #538d4e;
    border-color: #538d4e;
  }

  100% {
    background-color: #538d4e;
    border-color: #538d4e;
    transform: rotateX(0deg);
  }
}

@keyframes flip-present {
  0% {
    transform: rotateX(0deg);
  }

  50% {
    background-color: initial;
    border-color: #383023;
    transform: rotateX(90deg);
  }

  51% {
    background-color: #feb131;
    border-color: #feb131;
  }

  100% {
    background-color: #feb131;
    border-color: #feb131;
    transform: rotateX(0deg);
  }
}

@keyframes flip-wrong {
  0% {
    transform: rotateX(0deg);
  }

  50% {
    background-color: initial;
    border-color: #383023;
    transform: rotateX(90deg);
  }

  51% {
    background-color: #787c7e;
    border-color: #787c7e;
  }

  100% {
    background-color: #787c7e;
    border-color: #787c7e;
    transform: rotateX(0deg);
  }
}

.flip-wrong {
  animation: flip-wrong 0.5s linear;
  animation-fill-mode: forwards;
}

.flip-correct {
  animation: flip-correct 0.5s linear;
  animation-fill-mode: forwards;
}

.flip-present {
  animation: flip-present 0.5s linear;
  animation-fill-mode: forwards;
}

/* STATISTICS AND MODALS */

.modal {
  position: fixed;
  width: 100%;
  height: 100vh;
  background-color: rgba(25, 25, 25, 0.5);
  display: none;
  overflow: auto;
  z-index: 50;
}

@keyframes modal-fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.modal.modal--fade-in {
  animation: modal-fade-in 0.25s ease forwards;
  display: block;
}

.modal-container {
  position: absolute;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #ffffff;
  max-width: 650px;
  width: 90%;
}

@keyframes modal-container-slide-up {
  0% {
    transform: translate(-50%, 50%);
  }

  100% {
    transform: translate(-50%, 0%);
  }
}

.modal.modal--fade-in .modal-container {
  animation: modal-container-slide-up 0.25s ease;
}

.modal-close-surface {
  position: absolute;
  display: block;
  background-color: transparent;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mg-close-btn-wrapper {
  position: absolute;
  top: 0;
  right: 0;
}

.mg-close-btn-wrapper button {
  outline: 0;
  border: 0;
  background-color: transparent;
  padding: 12px;
  margin: 0;
}

.mg-close-btn-wrapper button:active {
  outline: 1px solid #464646;
}

.modal h1 {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

#statistics {
  display: flex;
}

.statistic-container {
  flex: 1;
}

.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.timer {
  font-variant-numeric: initial;
}

.statistic-container .label {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#guess-distribution {
  width: 80%;
}

.guess {
  width: 2rem;
  text-align: right;
}

.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 {
  height: 100%;
  /* Assume no wins */
  width: 0%;
  position: relative;
  background-color: #212121;
  display: flex;
  justify-content: center;
}

.graph-container .graph .graph-bar.highlight {
  background-color: #feb131;
}

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

.graph-container .graph .num-guesses {
  font-weight: bold;
  color: #ffffff;
}

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

.footer {
  display: flex;
  width: 100%;
}

#promo {
  margin-top: 12px;
  width: 100%;
}

.promo-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  padding-top: 16px;
}

.promo-text {
  font-family: nyt-franklin;
  font-size: 14px;
  line-height: 16px;
  color: #000000;
  flex-grow: 2;
}

@media (max-width: 500px) {
  .promo-text-primary {
    display: block;
  }

  .promo-text-secondary {
    display: block;
  }
}

.promo-cta {
  display: block;
  font-family: nyt-franklin-700;
  margin-top: 4px;
}

.promo-link:hover .promo-cta {
  text-decoration: underline;
}

.promo-icon {
  width: 40px;
  height: 40px;
  margin-right: 16px;
  border-radius: 0px;
  padding: 0px;
}

.promo-arrow {
  justify-self: flex-end;
}

.promo-link:hover {
  --svg-arrow-fill: #000000;
  --svg-arrow-stroke: #ffffff;
}

.rule {
  margin-left: -16px;
  height: 1px;
  position: absolute;
  width: 100%;
  background-color: #d3d6da;
}

.countdown {
  border-right: 1px solid #000000;
  padding-right: 12px;
  width: 50%;
}

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

.no-data {
  text-align: center;
}

button#share-button {
  background-color: #feb131;
  color: #ffffff;
  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-button:hover {
  opacity: 0.9;
}

button#share-button game-icon {
  width: 24px;
  height: 24px;
  padding-left: 8px;
}

@media screen and (min-width: 600px) {
  .modal-container {
    width: auto;
    min-width: 550px;
  }
}

/* HELP */

.help .instructions {
  font-size: 14px;
  color: #000000;
}

.help .examples {
  border-bottom: 1px solid #d3d6da;
  border-top: 1px solid #d3d6da;
}

.help .example {
  margin-top: 24px;
  margin-bottom: 24px;
}

.help .tile {
  width: 40px;
  height: 40px;
}

.help :host([page]) section {
  padding: 16px;
  padding-top: 0px;
}

.help .tile :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: #ffffff;
  text-transform: uppercase;
  user-select: none;
}

.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 #d3d6da;
}

.tile[data-state="tbd"] {
  background-color: #ffffff;
  border: 2px solid #878a8c;
  color: #000000;
}

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

.tile[data-state="present"] {
  background-color: #ffcd00;
  color: #000000;
}

.tile[data-state="absent"] {
  background-color: #787c7e;
}

.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);
  }
}

/* Hamburger menu animation */

#mobile-menu-btn {
  width: 60px;
  height: 28px;
  border: none;
  background-color: transparent;
  position: absolute;
  display: none;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  z-index: 10;
  padding: 0;
  margin: 0;
}

@media screen and (max-width: 850px) {
  #mobile-menu-btn {
    display: block;
  }
}

#mobile-menu-icon {
  width: 60px;
  height: 28px;
  position: relative;
  transform-origin: center;
  transform: rotate(0deg);
  transition: 0.5s ease-in-out;
}

#mobile-menu-icon span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #000000;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

#mobile-menu-icon span:nth-child(1) {
  top: 0px;
  transform-origin: left center;
}

#mobile-menu-icon span:nth-child(2) {
  top: 12px;
  transform-origin: left center;
}

#mobile-menu-icon span:nth-child(3) {
  top: 24px;
  transform-origin: left center;
}

#mobile-menu-btn.open #mobile-menu-icon span:nth-child(1) {
  transform: rotate(25deg);
  /* top: -3px;
    left: 8px; */
}

#mobile-menu-btn.open #mobile-menu-icon span:nth-child(2) {
  width: 0%;
  opacity: 0;
}

#mobile-menu-btn.open #mobile-menu-icon span:nth-child(3) {
  -webkit-transform: rotate(-25deg);
  -moz-transform: rotate(-25deg);
  -o-transform: rotate(-25deg);
  transform: rotate(-25deg);
  /* top: 39px;
    left: 8px; */
}

/* Utilities/Colors */

.brand-primary {
  color: #ffcd00;
}

.brand-primary-bg {
  background-color: #ffcd00;
}

.brand-secondary {
  color: #000000;
}

.brand-secondary-bg {
  background-color: #000000;
}

.page-bg {
  background-color: #121213;
}

.letter-tile-border-color {
  border-color: #383023;
}

.letter-tile-bg {
  background-color: #121213;
}

.text-white {
  color: #ffffff;
}

.uppercase {
  text-transform: uppercase;
}

.letter-space {
  letter-spacing: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hide {
  display: none;
}

.overflow-hidden {
  overflow: hidden;
}
