/* A crosstable result's game on hover (chess-peek.js): fixed beside the cell, over the page */

.cpk {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  width: 424px;
  padding: 10px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.cpk[hidden], .cpk [hidden] { display: none; }

.cpk-pl { display: flex; align-items: baseline; gap: 12px; margin: 0; font: 600 18px/1.2 var(--display); }
.cpk-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpk-res { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpk-meta { margin: 2px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* The eval bar, the board and, beside them, the eval and the moves, all the board's height */
.cpk-body { display: grid; grid-template-columns: 8px 220px minmax(0, 1fr); gap: 0 8px; height: 220px; }
.cpk-bar { position: relative; overflow: hidden; background: #1A1410; border: 1px solid #1A1410; }
.cpk-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: #fff; }
.cpk-board { display: block; width: 220px; height: 220px; border: 1px solid #1A1410; }
.cpk-hl rect { fill: rgba(255, 199, 46, .5); }

/* Under it, each side's captured pieces and score at the end (chess-game.css .cg-cap), full width */
.cpk-caps { margin-top: 6px; }
.cpk-caps .cg-cap { padding-left: 0; }

.cpk-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; margin-left: 4px; }
.cpk-ev { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.cpk-ev span { color: var(--muted); font-size: 12px; font-weight: 600; }
.cpk-ev b { font: 600 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.cpk-moves {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.cpk-moves li { display: grid; grid-template-columns: 26px 1fr 1fr; }
.cpk-moves li + li { border-top: 1px solid var(--line); }
.cpk-moves li > span { padding: 2px 5px; white-space: nowrap; }
.cpk-moves .cpk-n { padding-right: 4px; color: var(--faint); text-align: right; }
.cpk-moves .cpk-last { background: #B33A30; color: #fff; }
.cpk-moves .cpk-none { display: block; padding: 4px 6px; color: var(--faint); }
