:root {
  --clues-container-height: 4em;
  --dark-colour: rgb(30, 30, 30);
  --light-colour: rgb(240,240,240);
}

html, body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--dark-colour);
    overflow-y: auto;
    margin: 0;
}

#game {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

#top {
    width: 100%;
    aspect-ratio: 1 / 1;
}

#bottom {
    flex: 1;
}

/* #region Cover */

#cover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  background-color: var(--light-colour);
  /* background-color: darkslateblue; */
  width: 100%;
  height: 100%;
  align-content: center;
  text-align: center;
  font-size: 3em;
  color: var(--dark-colour);
}

/* #endregion Cover */

/* #region Crossword */
#crossword-container {
  width: 100%;
  margin: 0 auto;
  margin-top: 0;
  font-family: sans-serif;
  line-height: 0; /* remove spacing between inline-block */
}

.cell-container {
  display: inline-block;
  width: 20%; /* will be overridden in JS */
  padding-bottom: 20%; /* maintain square */
  position: relative; /* for absolute child */
  background-color: var(--light-colour);
}

.cell-container input, .cell-container div {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  border: 1px solid grey;
  /* border: 1px solid var(--dark-colour); */
  text-align: center;
  font-weight: bold;
  font-size: 4em;
  text-transform: uppercase;
  box-sizing: border-box;
  caret-color: transparent; /* hide caret */
    user-select: none;   /* modern browsers */
  -webkit-user-select: none; /* Chrome, Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* old IE/Edge */
    -webkit-text-decoration: none !important;
  text-decoration: none !important;
  user-select: none;
}

.cell-container div{
    display: flex;
  justify-content: center; /* horizontal */
  align-items: center;     /* vertical */
}

.cell-container input:hover, .cell-container div:hover {
    cursor: pointer;
}

.cell-container input:focus, .cell-container div:focus {
    outline: none;
}

.cell-selected {
    background-color: #feda00;  
}

.cell-highlighted {
    background-color: #a7d8ff;  
}

.cell-related {
    background-color: #fff4b2;  
}

.cell-blank {
  background-color: var(--dark-colour);
  cursor: default;
}

.cell-label {
  font-size: 1.5em;
  color: var(--dark-colour);
}

.cell-container span {
  position: absolute;
  left: 0.4em;
  top: 0.8em;
  font-size: 1.5em;
  pointer-events: none; /* allow clicks to pass through */
}

/* #endregion Crossword */

/* #region Clues */

#clues-container {
  padding: 1.5rem;
  display: flex;
  height: 20%;

  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */

  font-size: 2.5rem;
      color: var(--light-colour);
      align-items: center;   /* vertically centre children */
}

/* #clues-container {
position: fixed;
    top: 0;
    z-index: 10;
    font-size: 2.5em;
    color: var(--light-colour);
    background-color: var(--dark-colour);
    min-height: var(--clues-container-height);
    display: flex;
    align-items: center;   /* vertically centre children */
/*
    justify-content: space-between;
    width: 100%;
} */

/* .nav-btn {
  min-width: var(--clues-container-height);
  display: flex;
  align-items: center; /* centre symbol inside */
  /*
  justify-content: center;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
} */

/* #endregion Clues */

/* #region Keyboard */


#keyboard {
    display: flex;
    flex-direction: column;
    height: 70%;
}

.row, .controls{
    height: 25%;
    display: flex;
    justify-content: center;
    gap: calc(100vw / 100);
    margin-bottom: calc(100vw / 100);
}

/* .arrows .key{
    width: calc(100vw / 2);
    aspect-ratio: 5/1;
} */

.key{
    width:calc(100vw / 11);
    /* aspect-ratio: 1 / 1.5; */
    /* font-size: calc(100vw / 25); */
    font-size: 250%;
    height: 100%;
}

.controls .key{
  width:calc((100vw / 11)*4);
}
/* #endregion Keyboard */

/* #region Timer */
#timer-container {
  width: 100%;
  height: 3em;
  background-color: var(--dark-colour);
  font-size: 3em;

  display: flex;
  align-items: center;
  vertical-align: middle;
  justify-content: space-between;
}

#timer {
  font-size: 2em;
  text-align: center;
  flex: 1;
  color: var(--light-colour);
}

#pause-play{
  position: fixed;
  right: 0;
  cursor: pointer;
  width: 3em;
  height: 3em;
  background-color: var(--dark-colour);
}

#debug {
margin: 0 auto;
font-size: 2em;
color: violet;
}
/* #endregion Timer */