/*
 * Chessground base css properties.
 *
 * You need to include the css files in themes folder in order to have the
 * board and pieces displayed!
 */

.cg-wrap {
  box-sizing: content-box;
  position: relative;
  display: block;
}
.cg-wrap:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

cg-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  top: 0;
}

cg-board {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  line-height: 0;
  background-size: cover;
  cursor: pointer;
}
cg-board square {
  position: absolute;
  top: 0;
  left: 0;
  width: 12.5%;
  height: 12.5%;
  pointer-events: none;
}
cg-board square.move-dest {
  background: radial-gradient(rgba(20, 85, 30, 0.5) 22%, #208530 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
  pointer-events: auto;
}
cg-board square.premove-dest {
  background: radial-gradient(rgba(20, 30, 85, 0.5) 22%, #203085 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
cg-board square.oc.move-dest {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 85, 0, 0.3) 80%);
}
cg-board square.oc.premove-dest {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 30, 85, 0.2) 80%);
}
cg-board square.move-dest:hover {
  background: rgba(20, 85, 30, 0.3);
}
cg-board square.premove-dest:hover {
  background: rgba(20, 30, 85, 0.2);
}
cg-board square.last-move {
  will-change: transform;
  background-color: rgba(155, 199, 0, 0.41);
}
cg-board square.selected {
  background-color: rgba(20, 85, 30, 0.5);
}
cg-board square.check {
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
}
cg-board square.current-premove {
  background-color: rgba(20, 30, 85, 0.5);
}
.cg-wrap piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 12.5%;
  height: 12.5%;
  background-size: cover;
  z-index: 2;
  will-change: transform;
  pointer-events: none;
}
cg-board piece.dragging {
  cursor: move;
  z-index: 10;
}
cg-board piece.anim {
  z-index: 8;
}
cg-board piece.fading {
  z-index: 1;
  opacity: 0.5;
}
.cg-wrap square.move-dest:hover {
  background-color: rgba(20, 85, 30, 0.3);
}
.cg-wrap piece.ghost {
  opacity: 0.3;
}
.cg-wrap .cg-shapes, .cg-wrap .cg-custom-svgs {
  overflow: hidden;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cg-wrap .cg-shapes {
  opacity: 0.6;
  z-index: 2;
}
.cg-wrap .cg-custom-svgs {
  /* over piece.anim = 8, but under piece.dragging = 10 */
  z-index: 9;
}
.cg-wrap coords {
  position: absolute;
  display: flex;
  pointer-events: none;
  opacity: 0.8;
  font-size: 1.2vh;
  user-select: none;
}
.cg-wrap coords.ranks {
  right: 0;
  top: -1.4em;
  line-height: 0;
  flex-flow: column-reverse;
  height: 100%;
  width: 0.8em;
}
.cg-wrap coords.ranks.black {
  flex-flow: column;
}
.cg-wrap coords.files {
  bottom: 0px;
  left: 2px;
  text-align: left;
  flex-flow: row;
  width: 100%;
  height: 1.4em;
}
.cg-wrap coords.files.black {
  flex-flow: row-reverse;
}
.cg-wrap coords.files.coord {
  padding-left: 4px;
}
.cg-wrap coords coord {
  flex: 1 1 auto;
}
.cg-wrap coords.ranks coord {
  transform: translateY(39%);
}
.orientation-white .files coord:nth-child(2n + 1),
.orientation-white .ranks coord:nth-child(2n),
.orientation-black .files coord:nth-child(2n),
.orientation-black .ranks coord:nth-child(2n + 1) {
  color: #fff;
}
.orientation-white .files coord:nth-child(2n),
.orientation-white .ranks coord:nth-child(2n + 1),
.orientation-black .files coord:nth-child(2n + 1),
.orientation-black .ranks coord:nth-child(2n) {
  color: #000;
}
