/* Capture counters flex layout */
.capture-counters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.black-captures {
  color: #222;
  font-weight: bold;
}
.white-captures {
  color: #222;
  font-weight: bold;
}
/* Stone styles for Go board */
.go-stone {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.go-stone-atari {
  box-shadow: 0 0 10px 3px #e53935, 0 2px 6px rgba(0,0,0,0.2);
}
.go-stone.go-stone-atari {
  border-color: #e53935;
}
/* Go board styles for Capture Go */
.go-board {
  position: relative;
  width: calc(min(80vw, 80vh) - 2rem);
  height: calc(min(80vw, 80vh) - 2rem);
  max-width: 900px;
  max-height: 900px;
  margin: 1rem auto;
  background: #f5deb3;
  border: 2px solid #333;
  background-image:
    linear-gradient(to right, #333 1px, transparent 1px),
    linear-gradient(to bottom, #333 1px, transparent 1px);
  background-size: calc(100% / 18) calc(100% / 18);
  background-position: 0 0, 0 0;
}

.intersection {
  position: absolute;
  width: 5.5%;
  height: 5.5%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Move error banner */
.move-error-banner {
  background: #ffdddd;
  color: #8a1f1f;
  border: 1px solid #f5a3a3;
  padding: 0.5rem 1rem;
  margin: 0.5rem auto;
  border-radius: 6px;
  max-width: calc(min(80vw, 800px) - 2rem);
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Highlight Error cell styling when user attempts move error. */
.cell-error {
  box-shadow: inset 0 0 0 3px rgba(229, 57, 53, 0.9);
}
/*
We want to have the game div in the middle of the screen.

height&width 100vh makes the body take the full viewport.
[margin: 0] and [padding: 0]removes default margins&paddings.
Flexbox centers it both horizontally and vertically

It is possible to use instead:
[display: grid; place-items: center;]
The flexbox approach is probably more widely supported,
while the Grid approach with place-items: center is more concise.
*/
body {
  background-color: rgb(250, 250, 250);
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed !important;
  display: flex;
  justify-content: center;
  align-items: center;
}
/*
min(100vw, 100vh) ensures the square fits within both screen dimensions.
If your game isn't square, you can change the aspect ratio, see [aspect-ratio: 1].
We give it [position: relative] so that the inside elements can be [position:absolute].
*/
.game {
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  aspect-ratio: 1;
  position: relative;
}

/* To prevent long-press that will bring up copy-paste dialog.
user-select: none prevents text selection
-webkit-touch-callout: none specifically prevents the iOS long-press callout
-webkit-tap-highlight-color: transparent removes tap highlights on mobile
*/
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -moz-touch-callout: none;
  -ms-touch-callout: none;
  outline: 0; /* To prevent blue-box outline after click: http://stackoverflow.com/questions/21719306/getting-rid-of-a-blue-box-around-button-when-pressed */
}
textarea,
input {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* For tictactoe, to make a right/bottom border.
E.g., to make:

X| |
-----
 | |
-----
O| |

We add right&bottom borders to the top-left cell (with X),
but only right borrder to the bottom-left cell (with O), etc.
*/
.border_right {
  border-right: min(1vw, 1vh) solid black;
}
.border_bottom {
  border-bottom: min(1vw, 1vh) solid black;
}
.row {
  position: absolute;
  left: 0%;
  width: 100%;
}
.column {
  position: absolute;
  top: 0;
  height: 100%;
}

.max_size {
  width: 100%;
  height: 100%;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* CSS animations to make the X/O appear slowly
   (the opacity will change from 0.1 to 1 in 0.5s). */
.slowly_appear {
  animation: slowly_appear 0.5s linear;
}

@keyframes slowly_appear {
  from {
    opacity: 0.1;
  }
  to {
    opacity: 1;
  }
}
