body {
  font-family: "Commissioner", sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}

#splash {
  position: fixed;
  inset: 0;
  /* Shorthand for top: 0, right: 0, bottom: 0, left: 0 */
  background-color: rgb(179, 167, 254);
  color: #121212;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

h1 {
  font-size: 3em;
  margin: 0px;
  margin-bottom: 4px;
  font-weight: 700;
  text-align: center;
}

hr {
  border: 0;
  border-bottom: 1px solid #121212;
  margin: 1em 0px;
  width: 100%;
}

#splash h2 {
  font-size: 1.5em;
  font-weight: 500;
  text-align: center;
  margin: 0px 0px 32px 0px;
}

/* Class added by JS to hide the splash screen */
.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hiddenButton {
  display: none !important;
}

#splashDate {
  margin-top: 1em;
  font-weight: 600;
  font-size: 1em;
}
#splashNumber,
#splashAuthor {
  font-size: 0.875em;
  font-weight: 500;
}
.splashDiv {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 360px;
}

#resultsPage {
  position: fixed;
  inset: 0;
  padding: 1em;
  background-color: #f8f8f8;
  color: #121212;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
  align-items: center;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.resultsTop {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: end;
}
.resultsTop a {
  z-index: 2;
}
.resultsBottom button {
  z-index: 5;
}
.resultsBottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 90vh;
  min-width: 360px;
}
.blurb {
  text-align: center;
  color: #121212;
}
.tileGroup {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.tileText {
  display: block; /* Required so clientWidth & scrollWidth work on a <span> */
  /* width: 100%; */
  font-size: 1em;
  overflow-wrap: normal;
  word-break: keep-all;
}
.buttonContainer {
  width: 25%;
  aspect-ratio: 2 / 1;
  display: flex;
}
.buttonTile {
  margin: 5px;
  font-weight: 700;
  font-size: 1em;
  flex: 1;
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    transform 0.5s ease-out;
  background-color: #efefe6;
  color: black;
  border-radius: 10px;
  border: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.buttonTile.isHeld {
  transform: scale(0.9);
}
.shaking {
  background: #939182 !important;
  transition: background-color 0s ease !important;
}
.selected {
  background-color: #5a594e;
  color: white;
}
.categoryContainer {
  width: 100%;
  text-align: center;
  margin: 5px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9/1;
  text-transform: uppercase;
}

.categoryContainer p {
  margin: 0;
}
.categoryHeading {
  font-weight: 700;
}
.categoryAnswers {
  font-weight: 400;
}

.controlButton {
  background: none;
  border-width: 1px;
  border-style: solid;
  border-color: #121212;
  margin-inline: 8px;
  padding-inline: 8px;
  min-width: 150px;
  height: 3em;
  border-radius: 1.5em;
  font-size: 1em;
  font-weight: 600;
  margin-top: 1em;
  color: #121212;
}

.controlButton.solid {
  background: #121212;
  color: #f8f8f8;
}

.controlButtons {
  display: flex;
  justify-content: center;
}

.solid:disabled {
  color: #f8f8f8;
}

.controlButtons button:disabled {
  border-color: #979797;
  color: #979797;
}

#mistakesGroup {
  display: flex;
  justify-content: center;
  color: #5a594e;
}

#puzzlePage {
  margin: 24px auto;
  max-width: 650px;
}

.yellow {
  background-color: #f9df6d;
}

.purple {
  background-color: #ba81c5;
}

.blue {
  background-color: #b0c4ef;
}
.green {
  background-color: #a0c35a;
}
.popupContainer {
  position: relative;
  display: inline-block;
  width: 100%;
}
.popup {
  background-color: #121212;
  color: #f8f8f8;
  border-radius: 4px;
  padding: 10px;
  padding-inline: 20px;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: none;
}
.popup.display {
  display: block !important;
}
/* #resultsButton {
  display: none;
} */

.resultsTop a {
  cursor: pointer;
}
#resultsTable {
  display: grid;
  grid-template-columns: repeat(4, 20px);
  row-gap: 1px;
}
.resultsCell {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}
#resultsPage canvas {
  position: absolute;
  z-index: 1;
}

@media (max-width: 768px) {
  .buttonContainer {
    aspect-ratio: 1 / 1;
  }
  .controlButtons .controlButton {
    margin-inline: 2px;
    min-width: 5.5em;
  }
  .categoryContainer {
    aspect-ratio: 4.3/1;
  }
  /* .buttonTile {
    font-size: 0.7em;
  } */
}
