/* Blackjack table. Panels/buttons/top bar come from ../shared/arcade.css;
   the card faces match poker's. */

#table {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 640px;
  margin: 0 auto;
}

.hand-no { font-size: 0.86rem; color: #9d8bb5; }

#bank-badge {
  margin-left: auto;
  color: #cbbfe0;
  background: rgba(20, 14, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 0.88rem;
}
#bank-badge span { color: #ffd076; font-weight: 600; font-variant-numeric: tabular-nums; }

.seat { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.seat.me { margin-top: auto; }

.seat-line { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.seat-name { color: #cbbfe0; font-weight: 600; }
.hand-value { color: #ffd076; font-weight: 600; min-height: 1.2em; }
.bet { color: #ffd076; font-weight: 600; font-variant-numeric: tabular-nums; }

.middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.status { min-height: 2.6em; text-align: center; color: #b9a8cf; font-size: 0.95rem; line-height: 1.35; }
.status b { color: #f3ecdf; }

/* ── cards (same faces as poker) ── */
.hands { display: flex; gap: 18px; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
.hand { display: flex; flex-direction: column; gap: 6px; align-items: center; border-radius: 12px; padding: 6px; }
.hand.active { outline: 2px solid #ffd076; outline-offset: 2px; }
.hand-tag { font-size: 0.85rem; font-weight: 600; color: #cbbfe0; min-height: 1.2em; }
.hand-tag.good { color: #9ee493; }
.hand-tag.bad { color: #ffb4a6; }

.cards { display: flex; gap: 6px; justify-content: center; min-height: 74px; }

.card {
  width: clamp(42px, 12vw, 54px);
  aspect-ratio: 5 / 7;
  border-radius: 7px;
  background: #f6f1e6;
  color: #1a1420;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  animation: deal 0.28s ease;
}
@keyframes deal { from { transform: translateY(-14px) scale(0.9); opacity: 0; } }

.card .r { font-size: clamp(1.05rem, 4vw, 1.4rem); font-weight: 700; }
.card .s { font-size: clamp(0.95rem, 3.6vw, 1.25rem); }
.card.red { color: #c62828; }
.card.back {
  background: repeating-linear-gradient(45deg, #4a3a6e, #4a3a6e 5px, #3c2f5b 5px, #3c2f5b 10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.card.slot { background: rgba(255, 255, 255, 0.045); box-shadow: none; border: 1px dashed rgba(255, 255, 255, 0.12); }

/* ── actions ── */
.actions { display: flex; flex-direction: column; gap: 10px; }

#bet-row { display: flex; flex-direction: column; gap: 10px; }
.chip-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bchip {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  color: #f3ecdf;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.bchip:active { transform: scale(0.97); }
.bchip:disabled { opacity: 0.3; cursor: default; }
.bchip.clear { color: #ffb4a6; }

.rules-note { text-align: center; font-size: 0.8rem; color: #9d8bb5; }

.action-row { display: flex; gap: 8px; }

.act {
  flex: 1;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 8px;
  border-radius: 12px;
  cursor: pointer;
  color: #f3ecdf;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.act:active { transform: scale(0.98); }
.act:disabled { opacity: 0.3; cursor: default; }
.act.gold { background: #ffd076; color: #241a10; border-color: #ffd076; }
