/* chess_board_extras.css — premoves + capture trays v0.94.50 */

.chess-captures {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 0;
  pointer-events: none;
}
.chess-captures .cap-empty {
  opacity: 0.25;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.chess-captures .cap-piece {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  opacity: 0.92;
}
.chess-captures .cap-piece img,
.chess-captures .cap-img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.45));
}
.chess-captures .cap-glyph {
  font-size: 1.05rem;
  line-height: 22px;
}
.chess-captures .cap-n {
  position: absolute;
  right: -2px;
  bottom: -2px;
  font-size: 0.55rem;
  font-weight: 700;
  color: #f5c542;
  text-shadow: 0 0 3px #000;
}

/* Premoves */
#main-grid .square.is-premove-from {
  box-shadow: inset 0 0 0 3px rgba(100, 160, 255, 0.75) !important;
  background-color: rgba(70, 120, 220, 0.28) !important;
}
#main-grid .square.is-premove-to {
  box-shadow: inset 0 0 0 3px rgba(80, 200, 255, 0.85) !important;
  background-color: rgba(40, 140, 220, 0.32) !important;
}
#main-grid .square.is-premove-selected {
  box-shadow: inset 0 0 0 3px rgba(120, 200, 255, 0.95) !important;
}
#main-grid .square.is-premove-legal::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  height: 18%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(80, 170, 255, 0.55);
  pointer-events: none;
  z-index: 2;
}
#main-grid .square.is-premove-capture::after {
  content: '';
  position: absolute;
  inset: 6%;
  border: 3px solid rgba(80, 170, 255, 0.7);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.chess-premove-bar {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 20, 40, 0.88);
  border: 1px solid rgba(100, 170, 255, 0.45);
  font-size: 0.68rem;
  color: #cde;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.chess-premove-bar[hidden] {
  display: none !important;
}
.chess-premove-bar .premove-count {
  color: #8cf;
}
.chess-premove-bar .premove-clear {
  appearance: none;
  border: 1px solid rgba(255,120,120,0.45);
  background: rgba(40,10,10,0.6);
  color: #fcc;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.65rem;
  cursor: pointer;
}
.chess-premove-bar .premove-clear:hover {
  background: rgba(80,20,20,0.85);
}

/* Mobile tight trays */
body.m-body-chess .chess-captures .cap-piece,
body.m-body-chess .chess-captures .cap-img {
  width: 18px !important;
  height: 18px !important;
}
