/** Colored board squares as an embedded SVG */
cg-board {
  background-color: #f0d9b5;
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgIHZpZXdCb3g9IjAgMCA4IDgiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyI+CjxnIGlkPSJhIj4KICA8ZyBpZD0iYiI+CiAgICA8ZyBpZD0iYyI+CiAgICAgIDxnIGlkPSJkIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZSIgb3BhY2l0eT0iMCIvPgogICAgICAgIDx1c2UgeD0iMSIgeT0iMSIgaHJlZj0iI2UiIHg6aHJlZj0iI2UiLz4KICAgICAgICA8cmVjdCB5PSIxIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZiIgb3BhY2l0eT0iMC4yIi8+CiAgICAgICAgPHVzZSB4PSIxIiB5PSItMSIgaHJlZj0iI2YiIHg6aHJlZj0iI2YiLz4KICAgICAgPC9nPgogICAgICA8dXNlIHg9IjIiIGhyZWY9IiNkIiB4OmhyZWY9IiNkIi8+CiAgICA8L2c+CiAgICA8dXNlIHg9IjQiIGhyZWY9IiNjIiB4OmhyZWY9IiNjIi8+CiAgPC9nPgogIDx1c2UgeT0iMiIgaHJlZj0iI2IiIHg6aHJlZj0iI2IiLz4KPC9nPgo8dXNlIHk9IjQiIGhyZWY9IiNhIiB4OmhyZWY9IiNhIi8+Cjwvc3ZnPg==');
}

/** Interactive board square colors */
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);
}
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 {
  cursor: pointer;
  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 {
  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);
}

/** Alternating colors in rank/file/square labels */
.orientation-white .files coord:nth-child(2n),
.orientation-white .ranks coord:nth-child(2n),
.orientation-black .files coord:nth-child(2n+1),
.orientation-black .ranks coord:nth-child(2n+1) {
  color: rgba(72, 72, 72, 0.8);
}

.orientation-white .files coord:nth-child(2n+1),
.orientation-white .ranks coord:nth-child(2n+1),
.orientation-black .files coord:nth-child(2n),
.orientation-black .ranks coord:nth-child(2n) {
  color: rgba(255, 255, 255, 0.8);
}

.hl_type_border square.cell-hl, .hl_type_border piece.my-from, .hl_type_border square.selected, .hl_type_border square.move-dest:hover {
  /*background: none;*/
  border-width: 3px;
  border-style: solid;
  border-color: rgba(0,0,0,0);
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

.hl_type_border square.selected {
  background: none;
}
.hl_type_border .my-from, .hl_type_border .my-to, .hl_type_border square.selected, .hl_type_border square.move-dest:hover {
  border-color: rgba(0, 100, 0, 0.8) !important;
}
.hl_type_border .op-from, .hl_type_border .op-to {
  border-color: rgba(170, 0, 0, 0.8) !important;
}
.hl_type_border .my-over  {
  border-color:rgba(0, 100, 0, 0.8) !important;
}
.hl_type_border .premove-from , .hl_type_border .premove-to  {
  border-color:rgba(100, 100, 100, 0.8);
}
.hl_type_border .target  {
  border-color:rgba(170, 0, 0, 0.8);
}
.layout_small.hl_type_border square.cell-hl  {
  border-width: 2px;
}

.hl_type_marker square.cell-hl {
  width: 12px;
  height: 12px;
  border-bottom-right-radius: 12px;
  position: absolute;
  bottom: 0;
}
.hl_type_marker .my-from, .hl_type_marker .my-to {
  background-color: rgba(0, 100, 0, 1);
}
.hl_type_marker .op-from, .hl_type_marker .op-to {
  background-color: rgba(100, 0, 0, 1);
}
.hl_type_marker .my-over {
  background-color:rgba(0, 100, 0, 1);
}
.hl_type_marker .premove-from, .hl_type_marker .premove-to {
  background-color:rgba(100, 100, 10, 1);
}
.hl_type_marker .target {
  background-color:rgba(255, 0, 0, 1);
}
.layout_small.hl_type_marker square.cell-hl {
  width: 12px;
  height: 12px;
  margin: -6px;
}

.allowed_hl_red .move-dest {
  background: radial-gradient(rgba(100, 40, 40, 0.4) 22%, #208530 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
.allowed_hl_red .move-dest.oc:not(:hover) {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(100, 40, 40, 0.4) 80%);
}

.allowed_hl_gray .move-dest {
  background: radial-gradient(rgba(0, 0, 0, 0.3) 22%, #666 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
.allowed_hl_gray .move-dest.oc:not(:hover) {
  background: radial-gradient(transparent 0%, transparent 80%, rgba(0, 0, 0, 0.3) 80%);
}

cg-board square.oc.move-dest {
  /*background: radial-gradient(transparent 0%, transparent 80%, rgba(85, 0, 0, 0.3) 80%);*/
}


