/*
======================================================================
  5150 LUCK OF THE DRAW  -  LOOK OF THE DECKS  (luck.css)
======================================================================
  The colours, fonts, page, buttons and hazard strip come from
  ../shared/console.css (loaded first). This file only has the deck
  buttons, the card table and the cards.
======================================================================
*/

.deck-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-buttons button { font-size: 14px; padding: 7px 14px; }
.deck-buttons button:not([aria-pressed="true"]) { background: transparent; color: var(--ink); }
.deck-buttons button:not([aria-pressed="true"]):hover { background: var(--ink); color: var(--paper); }

.table-area { padding: 0 16px 24px; }
.empty-note { color: var(--ui-soft); }

.deck-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 28px;
  align-items: start;
}
.deck-panel.is-stacked { grid-template-columns: 1fr; }
.deck-info h2 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.deck-info p { margin: 0 0 10px; color: var(--ui-soft); max-width: 34rem; }
.deck-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.deck-controls button.big { font-size: 18px; padding: 12px 26px; }
.deck-count { color: var(--ui-text); }
.deck-count b { color: var(--ink); font-weight: normal; }
.deck-note { color: var(--accent); min-height: 1.4em; }

/* The pile: the deck's back on the left, the drawn card on the right. */
.pile { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.card-img {
  width: 260px;
  aspect-ratio: 182 / 254;
  border-radius: 10px;
  border: 2px solid var(--frame);
  background: #000;
  object-fit: cover;
  display: block;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.card-img.is-new { animation: flip-in 0.35s ease-out; }
@keyframes flip-in { from { transform: rotateY(80deg); opacity: 0.2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .card-img.is-new { animation: none; } }
.card-back { cursor: pointer; }
/* The back of a City Deck Profession card is printed sideways (wide). */
.card-img.card-wide { width: 362px; aspect-ratio: 254 / 182; }
.card-empty {
  width: 260px; aspect-ratio: 182 / 254; border-radius: 10px;
  border: 2px dashed #555a61; display: grid; place-items: center;
  color: var(--ui-soft); text-align: center; padding: 10px;
}

/* Cards drawn so far (since the last shuffle), small. */
.history { grid-column: 1 / -1; }
.history h3 {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-soft);
}
.history-row { display: flex; flex-wrap: wrap; gap: 8px; }
.history-row img { width: 90px; border-radius: 5px; border: 1px solid #555a61; }

@media (max-width: 700px) {
  .deck-panel { grid-template-columns: 1fr; }
  .card-img, .card-empty { width: 44vw; }
  .card-img.card-wide { width: 100%; }
  .table-area { padding: 0 8px 20px; }
}
