/* ===== Big 2 — game-specific styles =====
   Generic glass chrome comes from shared/css/glass.css (cards reuse .c-card
   wholesale). This file lays out the four-seat table: opponents' card-back
   stacks along the top, the live combo in the middle well, your 13-card
   overlapping hand at the bottom, and the Play / Pass row. */

:root {
  /* Big 2 plays on Solitaire's green felt — buttons wear the felt's own
     brighter green (same treatment as solitaire's primary action). */
  --accent-1: #2ba25f;
  --accent-2: #3fbf7a;
  --on-accent: #06210f;
  --back-1: #c8402f;
  --back-2: #7c1f1c;
  /* glass.css paints .c-app from these — same greens as solitaire's felt */
  --bg-1: #12764c;
  --bg-2: #083f29;
  --bg-glow-a: rgba(18, 118, 76, .55);
  --bg-glow-b: rgba(63, 191, 122, .22);
  /* green-tinted text tones (solitaire's palette) instead of the indigo defaults */
  --c-text: #eaf3ee;
  --c-muted: #b7d3c2;
}

.c-app { --fpad: clamp(12px, 4vw, 36px); }
/* overscroll / letterbox behind the felt */
body { background: #083f29; }

/* glass.css hardcodes the frosted modal panel to an indigo tint; recolor it
   (and the backdrop) to dark felt-green so the Rules / hand-over modals match
   this table. Scoped here so no other game is affected. */
.c-modal__backdrop { background: rgba(3, 22, 14, .5); }
.c-modal__panel { background: rgba(9, 44, 29, .72); }

/* ---------- Table stack ---------- */
.b2-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vh, 16px);
  width: 100%;
  /* grows with big monitors instead of stopping at a small-table width */
  max-width: 1160px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

/* ---------- Opponent seats ---------- */
.b2-opps { display: flex; justify-content: space-around; gap: 12px; width: 100%; }
.b2-seat { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.b2-seat__label {
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c-muted);
  display: flex; align-items: center; gap: 8px;
}
/* Card-count pill, like the blackjack totals badge. */
.b2-count {
  min-width: 26px; padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: #fff; font-size: 12px; font-weight: 800;
  text-align: center; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
/* "passed" / "won" scribbled under the seat that did it. */
.b2-flag { font-size: 11px; font-style: italic; letter-spacing: 0; text-transform: none; color: #ffd97a; min-width: 46px; }
.b2-flag:empty { display: none; }
/* Gold ring marks whose turn it is. */
.b2-seat--turn > .b2-seat__label { color: var(--accent-2); }
.b2-seat--turn .b2-backs, .b2-seat--turn .b2-well--hand { box-shadow: 0 0 0 2px rgba(63, 191, 122, .6), 0 0 16px rgba(63, 191, 122, .25); border-radius: 12px; }

/* Three overlapping card backs per opponent (fewer as cards run out).
   Card widths scale with the viewport (vw) but are vh-capped so a short
   window never overflows; small screens keep the old compact sizes. */
.b2-backs {
  --cw: clamp(34px, min(6vw, 9vh), 54px);
  --ch: calc(var(--cw) * 1.42);
  position: relative;
  height: var(--ch);
  width: calc(var(--cw) * (1 + 2 * 0.34));
  transition: box-shadow .2s ease;
}
.b2-backs .c-card { transform: rotate(var(--r, 0deg)); }

/* ---------- Trick well (live combo on the table) ---------- */
.b2-trick { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 0; flex: 1; justify-content: center; }
.b2-well { position: relative; transition: box-shadow .2s ease; }
.b2-well--table {
  --cw: clamp(46px, min(8vw, 13vh), 88px);
  --ch: calc(var(--cw) * 1.42);
  width: 100%;
  min-width: var(--cw);
  height: var(--ch);
}
.b2-well--table:not(:empty) .c-card {
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--card-edge);
  animation: b2Drop .22s ease;
}
@keyframes b2Drop {
  from { transform: translateY(-26px) scale(.85); opacity: 0; }
}
.b2-trick__caption { font-size: 13px; color: var(--c-muted); min-height: 17px; text-align: center; }

/* ---------- Center status ---------- */
.b2-mid { min-height: 34px; display: flex; align-items: center; }
.b2-status {
  padding: 7px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 700; letter-spacing: .01em;
  color: var(--c-text);
  text-align: center;
  transition: color .2s ease, border-color .2s ease;
}
.b2-status--win  { color: #7ef0a4; border-color: rgba(126, 240, 164, .5); }
.b2-status--lose { color: #ff8b94; border-color: rgba(255, 139, 148, .5); }

/* ---------- Your hand ---------- */
.b2-side { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.b2-well--hand {
  --cw: clamp(44px, min(7.2vw, 12vh), 80px);
  --ch: calc(var(--cw) * 1.42);
  min-width: var(--cw);
  height: var(--ch);
  width: 100%;
  transition: box-shadow .2s ease;
}
.b2-well--hand .c-card {
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--card-edge);
  cursor: pointer;
  transition: transform .12s ease;
}
/* Lifted (selected) cards ride above the row. */
.b2-well--hand .c-card.b2-sel { transform: translateY(-14px); }
.b2-well--hand .c-card.b2-sel::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2.5px var(--accent-1);
}

/* ---------- Action row ---------- */
.b2-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding-bottom: 8px; }
.b2-actions .c-btn { min-width: 88px; text-align: center; font-size: 14px; padding: 9px 16px; }
/* Deal only shows between hands; Play/Pass only during your turn — JS
   toggles [hidden], but explicit display rules need the escape hatch. */
.b2-actions .c-btn[hidden] { display: none; }

/* ---------- Result list in the hand-over modal ---------- */
.b2-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.b2-results li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--glass-line); background: var(--glass);
  font-size: 14px; font-weight: 600;
}
.b2-results .b2-out { color: #7ef0a4; }
.b2-results .b2-pen { color: #ff8b94; font-variant-numeric: tabular-nums; }

@media (max-width: 430px) {
  .b2-seat__label { font-size: 11px; }
  .b2-flag { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .b2-well--table:not(:empty) .c-card { animation: none; }
  .b2-well--hand .c-card, .b2-well--hand .c-card.b2-sel { transition: none; }
}
