/* Checkers / Damat — board + pieces. Reuses Souq's lobby styles for the
   intro page (see souq.css) and adds game-specific rules here. */

.checkers-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .checkers-layout { grid-template-columns: 1fr; }
  .souq-sidebar { order: 2; }
}

.checkers-banner {
  text-align: center;
  font-size: 1rem; font-weight: 600;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  font-family: "Poppins", system-ui, sans-serif;
}

.checkers-board-wrap {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 12px;
}
/* Grid sets only column widths. Rows auto-size from each cell's 1:1
   aspect-ratio, so we avoid the "aspect-ratio on the grid container
   gets ignored when other height constraints exist" trap that was
   producing oval pieces + collapsed bottom rows. */
.checkers-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  gap: 0;
  border: 3px solid #3a2115;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;                /* keep border-radius clean */
}
.cell {
  aspect-ratio: 1 / 1;
  min-width: 0;                    /* prevent flex/grid min-content overflow */
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none;
}
.cell.light { background: #f0d9b5; }
.cell.dark  { background: #6b4226; }
.cell.selected { outline: 3px inset rgba(60, 200, 255, 0.9); z-index: 2; }
.cell.legal::after {
  content: "";
  position: absolute; inset: 22%;
  background: rgba(60, 200, 120, 0.55);
  border-radius: 50%;
  pointer-events: none;
}
.cell.legal:has(.piece)::after {
  /* Legal capture landing onto an occupied cell shouldn't happen (target
     is empty), but keep the rule defensive. */
  inset: 8%;
  background: transparent;
  border: 3px solid rgba(60, 200, 120, 0.75);
}

.piece {
  width: 75%; height: 75%; border-radius: 50%;
  box-shadow:
    inset -4px -6px 8px rgba(0,0,0,0.35),
    inset 3px 4px 6px rgba(255,255,255,0.25),
    0 3px 6px rgba(0,0,0,0.4);
}
.piece.red   { background: radial-gradient(circle at 30% 30%, #ff6060, #b81a1a 70%, #6e0e0e); }
.piece.black { background: radial-gradient(circle at 30% 30%, #5a5a5a, #1b1b1b 70%, #000);    }
.piece.king::after {
  content: "♛"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ffd966; font-size: 1.6rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* Roster tags for color + connection state. */
.souq-roster-row .tag.red   { background: rgba(255, 100, 100, 0.25); }
.souq-roster-row .tag.black { background: rgba(200, 200, 200, 0.25); }
