:root {
  --yellow: #f7da21;
  --grey: #e6e6e6;
  --light-grey: #dcdcdc;
}

/* Positions */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
}

em {
  font-size: 80%;
}

.hidden {
  display: none !important;
}

.pointer {
  cursor: pointer;
}

.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;

  grid-template-areas: 
    ". toast toast ."
    ". hive controls ."
    ". footer footer ."
    ;

  /* flex-direction: row;
  align-items: center;
  justify-content: center; */
  gap: 24px;

  width: 100%;
  height: 100%;
}

.left {
  grid-area: hive;
}

.right {
  grid-area: controls;
  border-radius: 6px;
  border: 1px solid var(--light-grey);
  padding: 12px;
}

.bottom {
  grid-area: footer;

  display: flex;
  justify-content: center;
  gap: 4px;
  height: 24px;
}

/* Controls */

.controls {
  width: 300px;
}

#toast:popover-open {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  top: 24px;
}

#toast {
  text-align: center;
  font-weight: bold;
  font-size: 1.5em;
}

#toast.error {
  color: lightcoral;
  transition: none;
}

#toast.success {
  color: greenyellow;
  transition: none;
}

#toast.info {
  color: lightskyblue;
  transition: none;
}

input[name="guess"] {
  caret-color: var(--yellow);
  color: var(--grey);
  outline: 0;
  width: 100%;
  border: 0;

  padding-bottom: 24px;
  font-size: 2em;
}

input[name="guess"]:valid {
  color: var(--yellow);
}

select#selected-game {
  margin-bottom: 16px;
  width: 100%;
  border-color: var(--grey);
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
}

#found-words li>a {
  text-decoration: none;
  color: black;
}

/* Hive */

.hive {
  grid-area: hive;
  position: relative;
  width: 100%;
  padding-bottom: 103.9230484542%;
}

.hive .cell-letter {
  font-weight: 700;
  font-size: 1.875em;
  text-anchor: middle;
  text-transform: uppercase;
  pointer-events: none;
}

.hive-cell {
  position: absolute;
  top: 33.3333333333%;
  left: 30%;
  width: 40%;
  height: 33.3333333333%;
}

.hive-cell:nth-child(1) {
  transform: translate(0, 0);
}

.hive-cell:nth-child(2) {
  transform: translate(-75%, -50%);
}

.hive-cell:nth-child(3) {
  transform: translate(0, -100%);
}

.hive-cell:nth-child(4) {
  transform: translate(75%, -50%);
}

.hive-cell:nth-child(5) {
  transform: translate(75%, 50%);
}

.hive-cell:nth-child(6) {
  transform: translate(0, 100%);
}

.hive-cell:nth-child(7) {
  transform: translate(-75%, 50%);
}

.hive-cell .cell-fill {
  fill: var(--grey);
}

.hive-cell:first-child .cell-fill {
  fill: var(--yellow);
}