/* The original Royal & Rogue sprites travel over the board, in board space. */
.chessboard,
.lesson-board {
  position: relative;
  isolation: isolate;
}

.move-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
  overflow: hidden;
}

.square.motion-destination > .cat-piece,
.square.motion-destination > .piece-label {
  visibility: hidden !important;
  transition: none !important;
}

.board-in-motion .square {
  cursor: wait;
}

.board-in-motion .square:hover {
  filter: none;
}

.board-in-motion .square:hover .cat-piece {
  transform: none;
}

.moving-cat {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

.motion-traveller {
  z-index: 3;
}

.motion-captured {
  z-index: 2;
}

.motion-sprite-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 82%;
  will-change: transform, opacity;
}

.motion-sprite-slot > .cat-piece {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #3c2e2530);
  transition: none;
  animation: none;
}

.motion-sprite-slot > .cat-piece[data-sprite$="p"] {
  width: 86%;
  height: 86%;
  align-self: flex-end;
}

.motion-shadow {
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: 43%;
  height: 9%;
  border-radius: 50%;
  background: #3b352c;
  filter: blur(2px);
  transform: translateX(-50%);
  opacity: .2;
}

.motion-pawprint {
  position: absolute;
  z-index: 1;
  opacity: 0;
  color: #7c7250;
}

.motion-pawprint svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.motion-arrival {
  position: absolute;
  z-index: 1;
  opacity: 0;
  border-radius: 30%;
  background: radial-gradient(ellipse at 50% 70%, #faf2c273, #ddcf7c1f 50%, transparent 72%);
  box-shadow: inset 0 0 0 2px #f9edb763;
  pointer-events: none;
}

.motion-promotion {
  background: radial-gradient(ellipse at center, #fff5b0a6, #efd47957 48%, transparent 72%);
  box-shadow: inset 0 0 0 2px #f7d780a3;
}

@media (prefers-reduced-motion: reduce) {
  .move-overlay {
    display: none;
  }
  .square.motion-destination > .cat-piece,
  .square.motion-destination > .piece-label {
    visibility: visible !important;
  }
}
