/* ==========================================================================
   Shuffle21 — css/cards-shared.css
   Developed by Project Research LLC

   Shared styles for the nine-game expansion that css/games.css doesn't
   already cover (that file's .card/.pile/.table-felt/.game-toolbar/etc.
   classes are reused as-is here, not redefined). This file only adds
   widgets the new games need: drag ghosts, a suit/trump picker, a bidding
   control, and a meld/deadwood tray. Grows per-game as needed.
   ========================================================================== */

/* Card being press-dragged via js/cards/pointer-input.js */
.drag-ghost {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  transform: scale(1.04);
}

.card.dragging {
  opacity: 0.35;
}

/* Suit / trump picker (Crazy Eights new-suit choice, Euchre trump calling) */
.suit-picker {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.suit-picker button {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  background: var(--color-surface-raised);
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suit-picker button.suit-red {
  color: var(--color-red-suit);
}

.suit-picker button.suit-black {
  color: var(--color-black-suit);
}

.suit-picker button:hover,
.suit-picker button:focus-visible {
  border-color: var(--color-gold-bright);
}

/* Bidding control (Spades, Euchre) */
.bid-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.bid-controls button {
  min-width: 44px;
  min-height: 44px;
}

.bid-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-gold-bright);
  min-width: 72px;
  text-align: center;
}

/* Meld / deadwood tray (Gin Rummy, Rummy) */
.meld-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.meld-group {
  display: flex;
  gap: 0;
  padding: 4px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.meld-group .card:not(:first-child) {
  margin-left: -46px;
}

.deadwood-total {
  text-align: center;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Cribbage pegboard */
.pegboard {
  position: relative;
  background: var(--color-felt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
}

.pegboard-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.pegboard-hole {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(245, 242, 234, 0.15);
  flex-shrink: 0;
}

.pegboard-hole.peg-you {
  background: var(--color-gold-bright);
  box-shadow: 0 0 0 2px var(--color-navy), 0 0 0 3px var(--color-gold-bright);
}

.pegboard-hole.peg-cpu {
  background: var(--color-red-suit);
  box-shadow: 0 0 0 2px var(--color-navy), 0 0 0 3px var(--color-red-suit);
}

.pegboard-hole.peg-both {
  background: linear-gradient(90deg, var(--color-gold-bright) 50%, var(--color-red-suit) 50%);
  box-shadow: 0 0 0 2px var(--color-navy);
}

/* FreeCell supermove hint */
.supermove-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Trump / bid indicator chip */
.trump-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-bright);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}
