/*
 * ChessConquest board widget
 * New standalone board styles. Safe to load beside the old chessboard.css.
 */

.cc-board-widget {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.cc-board-spares {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  margin: 0 0 6px;
}

.cc-board-spares.cc-board-spares-bottom {
  margin: 6px 0 0;
}

.cc-board-spare {
  aspect-ratio: 1 / 1;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-board {
  box-sizing: content-box;
  border: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.18);
  display: grid;
  position: relative;
  width: 100%;
}

.cc-board-square {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-board-square-light {
  background: #f0d9b5;
  color: #b58863;
}

.cc-board-square-dark {
  background: #b58863;
  color: #f0d9b5;
}

.cc-board-square-selected {
  box-shadow: inset 0 0 0 4px rgba(255, 221, 51, 0.95);
}

.cc-board-square-target {
  box-shadow: inset 0 0 0 4px rgba(45, 145, 80, 0.8);
}

.cc-board-piece {
  box-sizing: border-box;
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
  pointer-events: none;
}

.cc-board-piece-hidden {
  opacity: 0;
}

.cc-board-notation {
  cursor: default;
  font-size: 14px;
  line-height: 1;
  position: absolute;
  z-index: 1;
}

.cc-board-notation-file {
  bottom: 2px;
  right: 3px;
}

.cc-board-notation-rank {
  top: 3px;
  left: 3px;
}

.cc-board-drag-piece {
  display: none;
  left: 0;
  object-fit: contain;
  pointer-events: none;
  position: fixed;
  top: 0;
  z-index: 10000;
}

.cc-game-info-tournament:hover {
  background: #fff8d7 !important;
  border-color: #d1a825 !important;
  box-shadow: 0 4px 12px rgba(130, 96, 12, 0.22) !important;
}
