@import url(https://fonts.googleapis.com/css2?family=Kanit:wght@900&family=KoHo:wght@500&family=Sigmar+One&family=Material+Symbols+Outlined:wght,FILL@250,0&display=swap);
/* 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     GLOBAL CSS CODES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/

/* COLOR CODES */

:root {
  --primary: #00acde; /* Blue */
  --primary-dark: #0083b1; /* Dark Blue */

  --est-pri: #1168a3; /* Primary Industry (Base) */
  --est-pri-light: #7aaed4; /* Primary Industry (Alt) */
  --est-sec: #3d7d35; /* Secondary Industry (Base) */
  --est-sec-light: #91b373; /* Secondary Industry (Alt) */
  --est-res: #a11c30; /* Restaurants (Base) */
  --est-res-light: #c57f7d; /* Restaurants (Alt) */
  --est-maj: #782b82; /* Major Establishments (Base) */
  --est-maj-light: #ab7fb0; /* Major Establishments (Alt) */

  --grey: #606060; /* Grey */
  --grey-light: #a0a0a0; /* Light Grey */

  --land: #ae5421; /* Landmark (Base) */
  --land-light: #d9a16e; /* Landmark (Alt) */
}

/* DIV FORMATTING */

.div-row {
  display: table;
  width: 100%;
}

.div-column {
  display: table-cell;
  padding: 0px 1px;
}

.div-column-right {
  display: table-cell;
  text-align: right;
  padding: 0px 1px;
}

.div-flex {
  display: flex;
}

.div-inline-flex {
  display: inline-flex;
}

/* 
   FONTS
   (Icons from Material Symbols are loaded as a font)
*/

* {
  font-family: 'KoHo', sans-serif;
}

/* 
   BUTTONS
   (Used in both the lobby and the game)
   This one is from cssbuttons.io 
*/

.button {
  appearance: button;
  background-color: var(--primary-dark);
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 20px;
  margin-left: 3px;
  margin-right: 3px;
  outline: none;
  overflow: visible;
  padding: 7px 15px; /* affects button:active */
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
  transform: translateZ(0);
  transition: filter 0.2s;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}

.button:after {
  background-clip: padding-box;
  background-color: var(--primary);
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  bottom: -4px;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
}

.button:main,
.button:focus {
  user-select: auto;
}

.button:hover:not(:disabled) {
  filter: brightness(1.1);
}

.button:disabled {
  cursor: auto;
}

.button:active:after {
  border-width: 0 0 0px;
}

.button:active {
  padding-bottom: 3px; /* change if adjust padding */
}
/* End imported button code */

/* 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     LOBBY SPECIFIC CSS CODES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/

/* TITLES */

.title {
  background-color: var(--primary);
  color: white;
  font-family: 'Kanit', 'Sigmar One', cursive;
  font-size: 40pt;
  font-weight: bold;
  text-align: center;
}

.subtitle {
  color: black;
  display: inline-block;
  font-size: 25pt;
  font-weight: bold;
  margin: 20px 0 10px;
  padding: 0 20px;
  text-align: center;
}

/* FOOTER */

.footer {
  background-color: var(--primary);
  bottom: 0;
  color: white;
  font-size: 20px;
  height: 32px; /* image height */
  left: 0;
  padding: 5px;
  position: fixed;
  text-align: center;
  width: 100%;
}

.footer-div {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 16px;
}

.footer-body {
  margin-bottom: 50px;
}

/* MATCHMAKING */

.mm-container {
  border-radius: 16px;
  border: solid var(--primary-dark);
  max-width: 800px;
  margin: 2px auto;
  text-align: center;
}

.mm-div-row {
  display: table;
  font-size: 18px;
  text-align: center;
  width: 100%;
}

.mm-div-cell {
  background-color: var(--primary);
  border-radius: 16px;
  border: solid white;
  color: white;
  display: table-cell;
  padding: 1px 10px;
}

.mm-table {
  font-size: 20px;
  table-layout: fixed;
  width: 100%;
}

.mm-td {
  background-color: white;
  border-radius: 16px;
  border: solid var(--primary) 2px;
  color: black;
  overflow-wrap: break-word;
  padding: 5px 10px;
  width: 20%;
}

.mm-td-active {
  border: solid red 4px;
}

/* PLAYER NAME ENTRY */

.padded_div {
  font-size: 20px;
  padding: 3px;
  text-align: center;
}

/* CREATE ROOM */

.input-box {
  border-radius: 10px;
  border: 2px solid #00acdd;
  box-sizing: border-box;
  font-size: 20px;
  margin: 8px 0;
}

select {
  font-size: 20px;
  margin: 2px;
  padding: 6px;
}

/* LOBBY */

.col_matchid {
  min-width: 12ch;
  text-align: center;
}

.col_seats {
  min-width: 5ch;
  text-align: center;
}

.col_setup {
  min-width: 12ch;
  text-align: center;
}

.errorMessage {
  color: red;
  padding: 3px;
  text-align: center;
}

.lobby-container {
  border-radius: 16px;
  border: solid var(--primary);
  margin: 2px auto;
  max-width: 600px;
}

.lobby-div-col {
  display: table-cell;
  max-width: 150px;
  padding: 1px 10px;
  vertical-align: middle;
}

.lobby-div-col-width {
  width: 25vw;
}

.lobby-div-row {
  background-color: var(--primary);
  border-radius: 16px;
  color: white;
  display: table;
  font-size: 18px;
  margin: 5px;
  padding: 1px 5px;
  text-align: center;
  width: 100%;
}

/* 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     GAME SPECIFIC CSS CODES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/

/* ACTIONS & ITEM SELECTION */

.clickable {
  cursor: pointer;
}

.inactive {
  background-color: #a0a0a0 !important;
}

.button_active:after {
  background-color: red;
}

.button_hide {
  display: none;
}

/* STATUS BAR */

.status-bar {
  background-color: var(--primary);
  color: white;
  font-size: 18px;
  margin: 5px;
  padding: 2px;
  text-align: center;
  width: 630px; /* fix width to keep supply layout constant */
  white-space: nowrap;
}

.status-bar-active {
  background-color: red;
  /*animation: change-color 5s ease-in-out infinite alternate;*/
}

/*@keyframes change-color {
  from {background-color: var(--primary);}
  to {background-color: var(--primary-dark);}
}*/

/* TOOLTIP */

.tooltip {
  background-color: #555;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  left: 50%;
  margin-left: -70px;
  opacity: 0;
  padding: 5px 3px;
  position: absolute;
  text-align: center;
  transition: opacity 0.3s;
  visibility: hidden;
  white-space: pre-line;
  width: 140px;
  z-index: 1;
  pointer-events: none;
}

/* font size for tooltip Material Symbols */
span.tooltip_sym {
  color: white;
  font-size: 16px;
  font-variation-settings: 'wght' 300;
  vertical-align: middle;
}

.est_tooltip {
  top: 85px;
}

.mini_tooltip {
  top: calc(100% + 10px);
}

/* Tooltip arrow */
.mini_tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -10px;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent #555 transparent;
}

/* ESTABLISHMENTS */

.est_td {
  padding: 3px;
  position: relative;
  height: 120px;
  width: 120px;
  border-radius: 8px;
}

.est_td:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.est_td:active {
  transform: scale(0.95);
}

.est_img_pri {
  background-color: var(--est-pri);
}

.est_img_pri_light {
  background-color: var(--est-pri-light);
}

.est_img_sec {
  background-color: var(--est-sec);
}

.est_img_sec_light {
  background-color: var(--est-sec-light);
}

.est_img_res {
  background-color: var(--est-res);
}

.est_img_res_light {
  background-color: var(--est-res-light);
}

.est_img_maj {
  background-color: var(--est-maj);
}

.est_img_maj_light {
  background-color: var(--est-maj-light);
}

.est_img_grey {
  background-color: var(--grey);
}

.est_img_grey_light {
  background-color: var(--grey-light);
}

.est_roll {
  margin: 0 auto;
  padding-left: 3px;
  padding-right: 3px;
  position: relative;
  top: -45px;
  width: fit-content;
}

.est_roll_box {
  border-radius: 5px;
  border-style: solid;
  border-width: 2.5px;
  color: white;
  display: inline-block;
  font-size: 14px;
  font-weight: bolder;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.est_type {
  color: white;
  font-size: 16px;
  position: absolute;
  right: 5px;
  top: 5px;
}

.est_name {
  color: white;
  font-size: 18px;
  width: 95%;
  text-align: center;
  position: absolute;
  top: 35px;
}

.est_cost {
  color: white;
  font-size: 14px;
  position: absolute;
  left: 5px;
  bottom: 5px;
}

.est_num {
  color: white;
  font-size: 14px;
  position: absolute;
  right: 5px;
  bottom: 5px;
}

/* LOGS AND CHAT */

.log_box {
  height: 584px; /* textpanel-box height (600px) minus padding (16px) */
  width: 284px; /* textpanel-box width (300px) minus padding (16px) */
  padding: 8px 8px 8px 8px;
  overflow: auto;
}

.log_div {
  max-height: 18px;
  white-space: pre; /* white-space: pre-wrap to allow wrap */
}

/* chatbox CSS from https://uiverse.io/ahmed150up/chilly-rattlesnake-8 */
.textpanel-box {
  height: 600px;
  width: 300px;
  background-color: #fff;
  border: black solid;
  /*  border-radius: 8px;*/
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  overflow-wrap: break-word;
}

.chat-header {
  background-color: #333;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  color: #fff;
  font-size: 18px;
  padding: 10px;
}

.chat-window {
  height: 542px; /* trial and error */
  width: 284px; /* textpanel-box width (300px) minus padding (16px) */
  overflow-y: scroll;
  padding: 8px 8px 0px 8px;
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-input {
  align-items: center;
  border-top: 1px solid #ccc;
  display: flex;
  padding: 10px;
}

.message-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 5px;
  font-size: 14px;
}

.send-button {
  border: none;
  outline: none;
  background-color: #333;
  color: #fff;
  font-size: 14px;
  padding: 5px 10px;
  cursor: pointer;
}

.send-button:hover {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.25);
}

.send-button:active {
  transform: scale(0.9);
}

/* radio buttons which serve as the chat header
 sourced from https://uiverse.io/Yaya12085/rude-mouse-79*/
.radio-inputs {
  background-color: #fff;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  font-size: 18px;
  padding: none;
  position: relative;
  width: 303px;
}

.radio-inputs .radio {
  flex: 1 1 auto;
  text-align: center;
  width: 151.5px;
}

.radio-inputs .radio input {
  display: none;
}

.radio-inputs .radio .name {
  align-items: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: solid rgba(0, 0, 0, 0.2);
  border-bottom: none;
  color: #000;
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding: 10px;
  transition: all 0.25s ease-in-out;
}

.radio-inputs .radio input:checked + .name {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: solid black;
  border-bottom: none;
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* PLAYER INFO */

.is_client {
  border: black solid;
  border-radius: 8px;
}

.coin_num {
  align-items: center;
  color: var(--land);
  display: flex;
  font-size: 20px;
  justify-content: center;
  padding: 2px;
}

/* Font size of coin */
span.dollar_player_money {
  color: var(--land-light);
  font-size: 22px;
  font-variation-settings: 'wght' 400;
  vertical-align: middle;
}

.land_td {
  padding: 3px;
  position: relative;
}

.name_div {
  background: white;
  border-radius: 8px;
  font-size: 18px;
  overflow: hidden;
  padding: 4px; /* padding of name_do_tv & its border-width */
  white-space: nowrap;
  width: 90px;
}

.name_do_tv {
  cursor: pointer;
  border: red solid;
  border-radius: 8px;
  border-width: 3px;
  padding: 1px;
}

.land_td:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.land_img {
  background-color: var(--land);
}

.land_img_light {
  background-color: var(--land-light);
}

.mini_td {
  padding: 3px;
  position: relative;
  width: 100px;
  height: 20px;
  border-radius: 8px;
}

.mini_td:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.mini_roll {
  margin: 0 auto;
  position: relative;
  top: -1px;
  width: fit-content;
}

.mini_roll_box {
  border-radius: 5px;
  border-style: solid;
  border-width: 2.5px;
  color: white;
  display: inline-block;
  font-size: 12px;
  font-weight: bolder;
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
}

.mini_type {
  color: white;
  position: absolute;
  font-size: 14px;
  right: 3px;
  top: 3px;
}

.mini_name {
  color: white;
  font-size: 14px;
  width: 95%;
  text-align: center;
  position: absolute;
  top: 3px;
}

