* {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

body {
  font: 13px Helvetica, Arial;
}

#GameDisplay {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  color: black;
  background-color: white;
}

.game_titlebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 30px;
  font-size: 13px;
  color: white;
  background-color: black;
  padding: 10px 5px 5px 5px;
}

.game_title {
  display: inline-block;
  margin-right: 10px
}

.game_version {
  display: inline-block;
  margin-right: 20px
}

.game_statusbar {
  position: absolute;
}

/* .game_author {
  display: inline-block;
} */

.game_container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.game_board_view {
  width: 100%;
  height: calc( 100% - 30px );
  background: #eee;
  top: 30px;
  position: absolute;
  overflow: hidden;

  /* these two props only used if fixed */
  left: 50%;
  transform: translateX( -50% );

  background-color: #fff;
}

.game_board {
  border: 1px solid #ccc;
  height: 100%;
  width: 100%;
  position: absolute;
  /* https://projects.verou.me/css3patterns/#checkerboard */
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  overflow: hidden;

  background-image: linear-gradient(
    45deg,
    rgba(0,0,0,.05) 25%, 
    transparent 25%, 
    transparent 75%, 
    rgba(0,0,0,.05) 75%, 
    rgba(0,0,0,.05)
  ),
  linear-gradient(
    45deg, 
    rgba(0,0,0,.05) 25%, 
    transparent 25%, 
    transparent 75%, 
    rgba(0,0,0,.05) 75%, 
    rgba(0,0,0,.05)
  );
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

.game_board_image {
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  background-repeat: no-repeat;
  background-size: contain;
}

.game_legend {
  position: absolute;
  top: 160px;
  right: 10px;
  width: 100px;
}

.game_legend p {
  text-indent: 15px;
  position: relative;
}

.chat_container {
  width: 400px;
  height: 200px;
  position: absolute;
  border: thin solid #ddd;
  background-color: #efefef;
  /* left: -10000px; */
  top: 100px;
  /* transform: translateX( -50% ) translateY( -50% ); */
  /* margin-top: 50%; */
  transform: translateX( -50% );
  margin-left: 50%;
  z-index: 2;
  display: none;
}

.chat_container.active {
  left: unset;
}
/* .CHATTING .chat_container {
  display: block;
} */

.chat_close {
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background-color: black;
}

.chat_close:after {
  content: "+";
  color: white;
  position: absolute;
  line-height: 0;
  left: 50%;
  top: 50%;
  transform: translateX( -40% ) translateY( 0% ) rotateZ( 45deg );
  font-size: 20px;
  font-weight: normal;
}

.chat_inputContainer {
  position: absolute;
  width: 100%;
  height: 40px;
  bottom: 0;
  left: 0;
  border: 1px solid #ccc;
}

.chat_input {
  width: 100%;
  padding: 10px 10px 10px 30px;
  position: absolute;
  bottom: 0;
  left: 0;
}

/* .chat_input:after {
  content: ">";
  position: absolute;
  top: 10px;
  left: 10px; 
  z-index: 1;
} */

.chat_inputPrompt {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px; 
}

.chat_output {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  height: calc( 100% - 70px ); 
}

.chat_output .p.output {
  display: block;
  width: 100%;
  margin: 10px;
}

.tile {
  /* width: 10%; */
  position: absolute;

  /* padding-top: 100%; */
  background-repeat: no-repeat;
  background-size: contain;
}

.tile_image_container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.tile_image {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  position: absolute;
}

.tile:before {
  /* force tile to be square */
  content: " ";
  width: 100%;
  padding-top: 100%;
  position: absolute;
}

.tile.percent {
  
}

.game_player {
  top: 0;
  left: 0;
  /* background: green; */
  transition-property: top, left;
  transition-duration: .2s;
  z-index: 1;
}
.game_player:before {
  /* background: green; */
}



.game_other_player {
  top: 0;
  left: 0;
  /* background: green; */
  transition-property: top, left;
  transition-duration: .15s;
  border-radius: 5px;
}

.game_other_player:hover {
  z-index: 2;
}

.game_other_player:before {
  /* background: green; */
}

.tile_name_label {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  bottom: -13px;
  color: white;
  text-shadow: -1px 1px 0 #000,
				  1px 1px 0 #000,
				 1px -1px 0 #000,
        -1px -1px 0 #000;
}

.tile_chat_icon {
  position: absolute;
  top: -21px;
  width: 21px;
  height: 21px;
  background: url("/images/chat_icon.gif");
  background-size: 42px 21px;
  background-position: left;
  left: 50%;
  transform: translateX( -50% );
  display: none;
}

.chat_proximity .tile_chat_icon {
  display: block;
}

.can_chat .tile_chat_icon {
  background-position: left;
}

.is_chatting .tile_chat_icon {
  background-position: right;
}

.game_obstacle {
  background-color: darkgrey;
}
.game_obstacle:before {
  background-color: darkgrey;
}

.game_portal {
  /* background-color: purple; */
  border-radius: 3px;
}
.game_portal:before {
  /* background-color: purple; */
  border-radius: 3px;
}

.game_tree {
  background-color: darkolivegreen;
}
.game_tree:before {
  background-color: darkolivegreen;
}

.game_boulder {
  background-color: darkgrey;
}
.game_boulder:before {
  background-color: darkgrey;
}



/* LOGIN */

.logmanager_container {
  width: 100%;
  height: 100%;
  background: white;
  display: none;
}

#GameDisplay.signup .logmanager_container,
#GameDisplay.login .logmanager_container,
#GameDisplay.logchoice .logmanager_container,
#GameDisplay.logerror .logmanager_container 
{
  display: block;
}

#GameDisplay.logchoice .logchoice_pane, 
#GameDisplay.signup .signup_pane, 
#GameDisplay.login .login_pane, 
#GameDisplay.logerror .error_pane,
#GameDisplay.initiatechat .initiate_chat_pane,
#GameDisplay.acceptchat .accept_chat_pane,
#GameDisplay.handshake .negotiate_chat_pane,
#GameDisplay.chatting .chat_pane,
#GameDisplay.chatting .chat_container
{
  display: flex;
  z-index: 99;
}

/*.signup_pane,
.login_pane,
.logchoice_pane,
.error_pane */
.pane
{
  background: white;
  display: none;
  position: absolute;
  text-align: center;
  width: 400px;
  height: 225px;
  flex-direction: column;
  align-items: center;
  justify-content: center; /*space-evenly*/
  left: 50%;
  top: 50%;
  transform: translateX( -50% ) translateY( -50% );
  border: 2px solid black;
  padding: 10px;
  -webkit-box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);
  -moz-box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);
  box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);  
}

/*.signup_title,
.login_title,
.error_title*/
.pane_title
{
  font-size: 1.25em;
  font-weight: bold;
  display: block;
  color: black;
  text-transform: uppercase;
  margin-bottom: .75em;
}

/*.signup_label,
.login_label,
.error_label*/
.pane_label
{
  display: block;
  color: black;
  text-transform: uppercase;
  margin-bottom: 1em;
}

.signup_input,
.login_input 
{
  display: block;
  border: thin solid #ddd;
  height: 30px;
  padding: 10px;
  margin-bottom: 1em;
}

.signup_username_input {

}

.back_button {
  content: "←";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 25px;
  cursor: pointer;
  font-size: 20px;
}
.back_button:hover {
  color: #666;
}

.error_pane {
  z-index: 1;
  background-color: rgba( 255,255,255,.95 );
  border-color: red;
}

.error_body {
  color: red;
}

.body_text {
  margin-bottom: 2em;
  margin-top: 1em;
}

/*.signup_button, 
.login_button, 
.error_button  */
.button
{
  display: inline-block;
  color: white;
  background-color: black;
  border-radius: 10px;
  height: 30px;
  width: 90px;
  border: thin solid black;
  margin-bottom: 1em;
}

.button_wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

/*.signup_button:hover,
.login_button:hover,
.error_button:hover */
.button:hover
{
  background-color: #666;
}

/*.signup_button:active,
.login_button:active,
.error_button:active*/
.button:active
{
  background-color: #fff;
  color: black;
  border: thin solid black;
}




/* CUSTOMIZATION */

.customization_container {
  width: 100%;
  height: 100%;
  background: white;
  display: none;
}

#GameDisplay.customization .customization_container {
  display: block;
}

.customization_pane {
  position: absolute;
  text-align: center;
  /* width: 400px; */
  /* height: 225px; */
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /*space-evenly*/
  left: 50%;
  top: 50%;
  transform: translateX( -50% ) translateY( -50% );
  border: 2px solid black;
  padding: 10px;
  -webkit-box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);
  -moz-box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);
  box-shadow: 4px 4px 6px 2px rgba(0,0,0,0.25);
  
}

.customization_title {
  display: block;
  color: black;
  text-transform: uppercase;
  margin-bottom: .75em;
  font-size: 1.25em;
  font-weight: bold;
}
.customization_label {
  display: block;
  color: black;
  /* text-transform: uppercase; */
  margin-bottom: 1em;
}

.customization_select {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: 100%;
  margin-bottom: 1em;
}

.customization_char_container {
  width: 52px;
  height: 52px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  border: 3px solid #ccc;
  border-radius: 6px;
}

.customization_char_container:hover {
  border-color: #666;
}

.customization_char_container:active,
.customization_char_container.selected 
{
  border-color: #000;
}

.customization_char {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX( -50% ) translateY( -50% );
  width: 42px;
  height: 42px;
  background: url("/images/players.gif");
  background-size: 210px 168px;
  background-repeat: no-repeat;
}

.customization_char._0 {
  background-position-x: 0px;
}

.customization_char._1 {
  background-position-x: -42px;
}

.customization_char._2 {
  background-position-x: -84px;
}

.customization_char._3 {
  background-position-x: -126px;
}

.customization_char._4 {
  background-position-x: -168px;
}

.customization_description_label {
  display: block;
  color: black;
  /* text-transform: uppercase; */
  margin-bottom: 1em;
}

.customization_input {
  display: block;
  border: thin solid #ddd;
  height: 30px;
  padding: 10px;
  margin-bottom: 1em;
  width: 330px;
}

.customization_description_input {
}

.customization_button {
  display: block;
  color: white;
  background-color: black;
  border-radius: 10px;
  height: 30px;
  width: 90px;
  border: thin solid black;
}

.customization_button:hover {
  background-color: #666;
}

.customization_button:active {
  background-color: #fff;
  color: black;
  border: thin solid black;
}

.stats_label_pane {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  width: 100%;
}

.stat_label {
  width: 25%;
}

.stats_pane {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 1em;
}

.stat_slider {
  width: 25%;
}


/* PLAYER STATS */
.tile_stats_container {
  background: white;
  left: 100%;
  position: absolute;
  text-align: center;
  padding: 2px 5px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  pointer-events: none;
  border: double thick black;
  border-radius: 8px;
  background-color: darkgray;
}

.tile:hover .tile_stats_container {
  display: block;
}

.tile_stat_name {
  font-size: 11px;
  font-weight: bold;
}

.tile_stat_label {
  font-size: 9px;
  text-transform: uppercase;
  text-align: center;
  /* transform: translateX(-50%); */
  /* margin-top: 8px; */
}

.tile_stat_icon {
  width: 40px;
  height: 6px;
  background: linear-gradient(to right, #1e5799 50%,#ffffff 50%);
  border: thin solid black;
  /* transform: translateX(-50%); */
  display: inline-block;
}

.tile_stat_label._0, 
.tile_stat_icon._0
{
  /* left: 25%; */
}
.tile_stat_label._1, 
.tile_stat_icon._1
{
  /* left: 50%; */
}
.tile_stat_label._2, 
.tile_stat_icon._2
{
  /* left: 75%; */
}



.initiatechat .initiate_chat_pane {
  display: block;
}

.acceptchat .accept_chat_pane {
  display: block;
}

.handshake .negotiate_chat_pane {
  display: block;
}

.chatting .chat_pane {
  display: block;
}
