:root {
  --default-size: 5px;
  --active-size: 40px;
  --active-pulse-size: 30px;
  --cell-size: 80px;
  --max-width: 500px;
  --font-family: Arial, sans-serif;
}

#other-mouse {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  display: none;
}

#table {
  margin: auto;
}

#undo-button {
  float: left;
}
#reset-button {
  float: right;
}

#share-container {
  align-content: center;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#share-link {
  background-color: rgb(106, 170, 100);
  border: black 1px solid;
  max-width: var(--max-width);
  margin: auto;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  
  align-content: center;
  align-items: center;
  justify-content: center;
  text-align: center;

  text-transform: uppercase;
}

.invisible {
  display: none;
}

.title {
  text-align: center;
  font-family: var(--font-family);
  font-size: 40px;
  max-width: var(--max-width);
  margin: auto;
}

.tile {
  width: var(--cell-size);
  height: var(--cell-size);
  text-align: center;
  border: 2px transparent solid;
}

.controls {
  font-size: 90px;
  font-family: var(--font-family);
  font-size: 55px;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  max-width: var(--max-width);
  margin: auto;
}

.p1-turn-text,
.p2-turn-text {
  text-align: center;
  color: lightgray;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  margin: auto;
}

.p1-turn-text.selected-player-text {
  background-color: red;
}

.p2-turn-text.selected-player-text {
  background-color: blue;
}

.selected-player-text {
  color: white;
}

.button {
  border-radius: 10px;
  padding: 10px;
  background-color: orange;
  font-size: 60px;
  border-color: transparent;
  transition: 0.2s all;
  margin: auto;
}
.button:active {
  transform: scale(0.98);
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);
}

.white {
  background-color: orange;
}
.black {
  background-color: wheat;
}

.piece {
  width: var(--default-size);
  height: var(--default-size);
  padding: 10px;
  border-radius: 50px;
  animation: activeToDisabled .5s 1;
  margin: auto;
}

.p1-piece {
  background-color: crimson;
}
.p2-piece {
  background-color: mediumblue;
}

.active-player-piece {
  width: var(--active-size);
  height: var(--active-size);
  animation: disabledToActive .5s 1;
}

.selected-piece {
  animation: activePulsing .5s infinite;
}

.info {
  /* text-align: center; */
  font-family: var(--font-family);
  font-size: 20px;
  max-width: var(--max-width);
  margin: auto;
}

.possible-move {
  animation: blinkingText 1s infinite;
  border-color: black;
  filter: drop-shadow(0px 0px 5px black);
}
@keyframes blinkingText {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes disabledToActive {
  from {
    width: var(--default-size);
    height: var(--default-size);
  }
  to {
    width: var(--active-size);
    height: var(--active-size);
  }
}
@keyframes activeToDisabled {
  from {
    width: var(--active-size);
    height: var(--active-size);
  }
  to {
    width: var(--default-size);
    height: var(--default-size);
  }
}

@keyframes activePulsing {
  from {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
  to {
    opacity: 1;
  }
}

/* Snackbar, from https://www.w3schools.com/howto/howto_js_snackbar.asp */

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
  min-width: 250px; /* Set a default minimum width */
  margin-left: -125px; /* Divide value of min-width by 2 */
  background-color: #333; /* Black background color */
  color: #fff; /* White text color */
  text-align: center; /* Centered text */
  border-radius: 2px; /* Rounded borders */
  padding: 16px; /* Padding */
  position: fixed; /* Sit on top of the screen */
  z-index: 1; /* Add a z-index if needed */
  left: 50%; /* Center the snackbar */
  bottom: 30px; /* 30px from the bottom */
  font-family: var(--font-family);
  font-size: 20px;
}

/* Modal from https://www.w3schools.com/howto/howto_css_modals.asp */
 /* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  font-family: var(--font-family);
  font-size: 30px;
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 100px auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  /* width: 80%; /* Could be more or less, depending on screen size */
  max-width: var(--max-width);
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
} 