@import url('https://fonts.googleapis.com/css2?family=Orbitron&family=Press+Start+2P&display=swap');
/* Set Fonts from Google Fonts */
body  {
  color: whitesmoke;
  font-family: "Orbitron", sans-serif;
}

h1, h2, h3 {
  font-family: "Press Start 2P", sans-serif;
}

/* Set outer wrapper to height and width of screen */
#outer-wrapper {
  width: 100vw;
  height: 100vh;
}
/* Ensure all grid boxes as sized to include padding and border */
* {
  box-sizing: border-box;
}

/* 
  Large Screens: 12 column grid layout. Each class specifies a column whos width is a
  muliple of 100% width/12 = 8.33%
*/
.lgcol-1 {width: 8.33%;}
.lgcol-2 {width: 16.66%;}
.lgcol-3 {width: 25%;}
.lgcol-4 {width: 33.33%;}
.lgcol-5 {width: 41.66%;}
.lgcol-6 {width: 50%;}
.lgcol-7 {width: 58.33%;}
.lgcol-8 {width: 66.66%;}
.lgcol-9 {width: 75%;}
.lgcol-10 {width: 83.33%;}
.lgcol-11 {width: 91.66%;}
.lgcol-12 {width: 100%;}


/* Each column floats left, has padding of 15px and for layout puropses
  initially has a border. The css attribute selector [attribute*=value]
  was used to target all classes (attribute) with value "col-" in order 
  to apply this styling
*/
[class*="col-"] {
  padding: 15px;
  float:left;
}

/* To prevent other elements in the rows being taken out of the flow of the 
  page, the following class .lgrow::after was copied from W3 Schools 'Responsive Web Desigh - Grid-View
  https://www.w3schools.com/css/css_rwd_grid.asp */

.lgrow::after { /* large screens */
  content: "";
  clear: both;
  display: table;
}

/* Removes unwanted padding from wrappers and containers */
.container {
  padding: 0;
}

/* DisplayScreen Wrappers: used to toggles Displays in JS */
#displayScreen-wrapper {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.screen {
  background: linear-gradient( rgb(33,	89,	160) 60%	, rgb(109,	224,	159));
}

/* Display Screen Header */
#header {
  text-align: center;
  display: flex;
  background: rgb(33,	89,	160);
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#screen-title{
  margin: 0;
}

#displayGame-wrapper {
  height: 90vh;
}

/* Nav Styling */
#nav {
  display:flex;
  min-height: 10vh;
}

#nav-list {
  display: flex;
}

#nav-list li {
  list-style: none;
  padding: 1rem;
  background: linear-gradient(to top, rgb(235	108	74), rgb(227	93	144));
  border-radius: 0.5rem;
  margin-left: 1rem;
  font-family: "Press Start 2P", sans-serif;
}

#nav-list li:hover {
  background: linear-gradient(to top, rgb(230, 60, 12), rgb(229, 15, 97));
}

#nav-list li:nth-of-type(0) {
  margin-left:auto;
}

#help {
  display: none; /* not implemented in dev stage 1 */
}

/* Display Image and Text */
#inner-display-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100vw;
  max-height: 100%;
}

/* 
  Aspect ratio used to keep Display image 
  proportional as screen width changes
*/
#display-img-wrapper {
  width: 60%;
  aspect-ratio: 16/9;
}

#screen-image {
  object-fit: fill;
  width: 100%;
aspect-ratio: 16 / 9;
}

#display-txt-wrapper {
  height: 33%;
  text-align: center;
}

/* Display Buttons */
#display-buttons-wrapper {
  clear: both;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width:fit-content
}

.button {
  color: whitesmoke;
  font-family: "Press Start 2P", sans-serif;
  background: linear-gradient(to top, rgb(235	108	74), rgb(227	93	144));
  border:groove 0.5em rgb(238	141	185	);
  border-style: outset hidden hidden outset ;
  border-radius: 0.5rem;
  font-size: 2em;
  width:fit-content;
}

.button:hover {
  border-style: inset hidden hidden inset ;
}

/* Game Display */
#displayGame-wrapper {
  height: 100%;
  display:flex;
  flex-direction: column;
}

#info-bar-wrapper {
  display: flex;
  flex-direction: row;
}

#time-left-wrapper * { /* hide time left feature for dev stage 1 */
  display: none;
}

#fire-alert-wrapper {
  height: 4rem;
}

#info-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

#target-profit::before, #profit::before {
  content: "£";
}

.info-item {
  min-width: fit-content;
  display:inline-flex;
  align-items: baseline;
  margin-right: 2px;
}

#game-body-wrapper {
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content:space-around;
}

#menu-messages-wrapper {
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%;
}

#actions-menu {
  max-height: fit-content;
}

#actions-menu-list {
  list-style-type: none;
}

#actions-menu-list li {
  font-size: 2em;
  text-align: left;
  margin-bottom: 2rem;
}

#actions-menu-list li:hover {
  background-color: rgb(133	212	163	);
}

#messages {
  font-size: 1.5rem;
}

.game-windows {
  border: solid 1px whitesmoke;
  height:fit-content;
  width: 100%;
}


/* Map  and Styling */
#map {
  margin: 2rem;
  border: solid whitesmoke 2px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-areas: 
  "h1 h2 h3 h4 h5 h6 h7 h8"
  "g1 g2 g3 g4 g5 g6 g7 g8"
  "f1 f2 f3 f4 f5 f6 f7 f8"
  "e1 e2 e3 e4 e5 e6 e7 e8"
  "d1 d2 d3 d4 d5 d6 d7 d8"
  "c1 c2 c3 c4 c5 c6 c7 c8"
  "b1 b2 b3 b4 b5 b6 b7 b8"
  "a1 a2 a3 a4 a5 a6 a7 a8";
}

#a1 {
  grid-area: a1;
}
#a2 {
  grid-area: a2;
}
#a3 {
  grid-area: a3;
}
#a4 {
  grid-area: a4;
}
#a5 {
  grid-area: a5;
}
#a6 {
  grid-area: a6;
}
#a7 {
  grid-area: a7;
}
#a8 {
  grid-area: a8;
}
#b1 {
  grid-area: b1;
}
#b2 {
  grid-area: b2;
}
#b3 {
  grid-area: b3;
}
#b4 {
  grid-area: b4;
}
#b5 {
  grid-area: b5;
}
#b6 {
  grid-area: b6;
}
#b7 {
  grid-area: b7;
}
#b8 {
  grid-area: b8;
}
#c1 {
  grid-area: c1;
}
#c2 {
  grid-area: c2;
}
#c3 {
  grid-area: c3;
}
#c4 {
  grid-area: c4;
}
#c5 {
  grid-area: c5;
}
#c6 {
  grid-area: c6;
}
#c7 {
  grid-area: c7;
}
#c8 {
  grid-area: c8;
}
#d1 {
  grid-area: d1;
}
#d2 {
  grid-area: d2;
}
#d3 {
  grid-area: d3;
}
#d4 {
  grid-area: d4;
}
#d5 {
  grid-area: d5;
}
#d6 {
  grid-area: d6;
}
#d7 {
  grid-area: d7;
}
#d8 {
  grid-area: d8;
}
#e1 {
  grid-area: e1;
}
#e2 {
  grid-area: e2;
}
#e3 {
  grid-area: e3;
}
#e4 {
  grid-area: e4;
}
#e5 {
  grid-area: e5;
}
#e6 {
  grid-area: e6;
}
#e7 {
  grid-area: e7;
}
#e8 {
  grid-area: e8;
}
#f1 {
  grid-area: f1;
}
#f2 {
  grid-area: f2;
}
#f3 {
  grid-area: f3;
}
#f4 {
  grid-area: f4;
}
#f5 {
  grid-area: f5;
}
#f6 {
  grid-area: f6;
}
#f7 {
  grid-area: f7;
}
#f8 {
  grid-area: f8;
}
#g1 {
  grid-area: g1;
}
#g2 {
  grid-area: g2;
}
#g3 {
  grid-area: g3;
}
#g4 {
  grid-area: g4;
}
#g5 {
  grid-area: g5;
}
#g6 {
  grid-area: g6;
}
#g7 {
  grid-area: g7;
}
#g8 {
  grid-area: g8;
}
#h1 {
  grid-area: h1;
}
#h2 {
  grid-area: h2;
}
#h3 {
  grid-area: h3;
}
#h4 {
  grid-area: h4;
}
#h5 {
  grid-area: h5;
}
#h6 {
  grid-area: h6;
}
#h7 {
  grid-area: h7;
}
#h8 {
  grid-area: h8;
}

.tile {
  width: 100%;
  position: relative;
  aspect-ratio: 1/1;
  background-color: darkgreen;
  display: flex;
  border: solid 1px whitesmoke;
}


.tile-img {
  object-fit:contain;
  width: 100%;
  aspect-ratio: 1/1;
  z-index: 0;
}

#lumber-jackie {
  z-index: 5;
  object-fit:fill;
  width: 50%;
  position:absolute;
  left: 25%;
  bottom: 5%;
}

#lumber-jackie-hover {
  z-index: 5;
  object-fit:fill;
  width: 50%;
  position:absolute;
  left: 25%;
  bottom: 5%;
}

/* Small device screens (phones, 640px and down) in portrate */
@media only screen and (max-width: 640px) {
  /* 
   Small Screens: 3 column grid layout. Each class specifies a column who's width is a
  muliple of 100% width/3 = 33.33%
  */
  .smcol-1 {width: 33.33%;}
  .smcol-2 {width: 66.66%;}
  .smcol-3 {width: 100%;}

  .smrow::after { /* small screens */
    content: "";
    clear: both;
    display: table;
  }

  #screen-msg {
    font-size: 0.7em;
    margin: 0;
  }

  #display-img-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
  }
  
  /* Nav Bar */

  #nav {
    height: 10vh;
  }

  #nav-list li {
    padding: .3rem;
  }

  .nav-elements {
    font-size: 0.5em;
    padding: 0;
  }

  #display-buttons-wrapper {
    margin: 0;
  }

  .button {
    font-size: 1em;
  }

  /* Display Image and Text */
  #inner-display-wrapper {
    display:flex;
    flex-direction: column;
  }

  #game-body-wrapper {
    display: flex;
    flex-direction: column;
  }

  /* This grid positions the info bar above the Fire Alet div*/
  #info-bar-wrapper {
    display: grid;
    grid-template-columns:1fr;
    grid-template-rows: 2fr;
    order: 1;
  }

  /* This grid positions the game data info */
  #info-bar {
    order: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
    "time-left profit"
    "logs target-profit";
  }
/* Info Bar Data Elements */
    #time-left-wrapper {
      grid-area: time-left;
    }

    #logs-wrapper {
      grid-area: logs;
    }

    #profit-wrapper {
      grid-area: profit;
    }

    #target-profit-wrapper {
      grid-area: target-profit;
    }

    #info-bar > div {
      width:auto;
      justify-content: flex-end;
      font-size: 0.6em;
    }

    .info-item {
      margin: 0;
    }
/* The Fire Alert is turnd off in dev stage 1 */
    #fire-alert-wrapper {
      order: 2;
      display: none;
    }

    #spacer {
      display: none;
    }
/* Positioning and styling the Actions Menu and the Messages window */
    #menu-messages-wrapper {
      display: flex;
      flex-direction:row;
      order: 4;
    }

    #menu-messages-wrapper h2 {
      font-size: 1em;
    }

    #actions-menu-list li {
      font-size: 1em;
      margin:auto;
    }

    #messages {
      font-size: 1em;
      margin: 0;
    }

/* Positioning the Map */
    #map {
      order: 3;
      margin: 0 auto;
    }
  }

/* Medium devices (taplets, 640 px and down) in portrate */
@media only screen and (min-width: 641px) and (max-width: 1007px) {

  /* Medium Screens: 12 column grid layout */
  .mdcol-1 {width: 8.33%;}
  .mdcol-2 {width: 16.66%;}
  .mdcol-3 {width: 25%;}
  .mdcol-4 {width: 33.33%;}
  .mdcol-5 {width: 41.66%;}
  .mdcol-6 {width: 50%;}
  .mdcol-7 {width: 58.33%;}
  .mdcol-8 {width: 66.66%;}
  .mdcol-9 {width: 75%;}
  .mdcol-10 {width: 83.33%;}
  .mdcol-11 {width: 91.66%;}
  .mdcol-12 {width: 100%;}

  .mdrow::after { /* medium screens */
    content: "";
    clear: both;
    display: table;
  }

  /* Display Image and Text */
  #inner-display-wrapper {
    display:flex;
    flex-direction: column;
  }

  .button {
    font-size: 1.5em;
    width:fit-content;
  }

  #game-body-wrapper {
    display: flex;
    flex-direction: column;
  }

  /* This grid positions the info bar above the Fire Alet div*/
  #info-bar-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
  }

  /* This grid positions the game data info */
  #info-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
    "time-left profit"
    "logs target-profit";
  }

  /* Info Bar Data Elements */
  #time-left-wrapper {
    grid-area: time-left;
  }

  #logs-wrapper {
    grid-area: logs;
  }

  #profit-wrapper {
    grid-area: profit;
  }

  #target-profit-wrapper {
    grid-area: target-profit;
  }

  #info-bar > div {
    width:max-content;
    justify-content: flex-end;
    font-size: 0.6em;
  }

  .info-item {
    margin: 0;
  }

  #game-body-wrapper {
    display: flex;
    flex-direction: column;
  }

  #spacer {
    display: none;
  }

  /* Positioning and styling the Actions Menu and the Messages window */

  #menu-messages-wrapper {
    display: flex;
    flex-direction:row;
    order: 2;
    margin: auto;
  }

  #menu-messages-wrapper h2 {
    font-size: .8em;
  }

/* Positioning the Map */
  #map {
    order: 1;
    margin: 0 auto;
  }
}