/* Deals table extras. Shared felt rules stay in points-rummy-game.css. */

.points-game[data-deals-game] {
  position: relative;
}

.points-game[data-deals-game] .points-game-stage {
  position: relative;
}

.deals-board {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  min-height: 2.7rem;
  box-sizing: border-box;
  color: #f6f1e4;
  background: rgba(12, 48, 32, 0.72);
  border-bottom: 1px solid rgba(240, 217, 160, 0.35);
}

/*
  F2-2A CLS: same stage shift pattern as Pool (boot collapse + hand mount under
  mobile LH throttle). Boot stays hidden until init failure; reserve rail chrome.
*/
.points-game[data-deals-game] > [data-deals-boot] {
  margin: 0;
}

@media (max-width: 767px) {
  .points-game[data-deals-game] .points-game-bar {
    min-height: 3.25rem;
    box-sizing: border-box;
  }

  .points-game[data-deals-game] .points-game-rail .points-game-hand {
    min-height: 8.75rem;
    box-sizing: border-box;
  }

  .points-game[data-deals-game] .points-game-dock {
    min-height: 6.5rem;
    box-sizing: border-box;
  }
}

.deals-board p {
  margin: 0;
}

.deals-board-deal,
.deals-board-winner {
  font-weight: 700;
}

.points-game[data-deals-game] .points-game-bar .deals-length,
.points-game[data-deals-game] .points-game-bar [data-act="new"] {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  line-height: 1.1;
  touch-action: manipulation;
}

.points-game .deals-length[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--pg-gold-hi), var(--pg-gold));
  color: var(--pg-deep);
  border-color: var(--pg-gold-hi);
  box-shadow: none;
}

.points-game .deals-length:disabled {
  opacity: 0.45;
  cursor: default;
}

.deals-seat-state {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.points-game-seat.is-deals-winner {
  box-shadow: inset 0 0 0 2px #f0d9a0;
}

.deals-result-deal {
  font-variant-numeric: tabular-nums;
}

.points-game[data-deals-game]:has(.points-game-result.is-open) .points-game-result-actions {
  flex-wrap: wrap;
}

.deals-confirm {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 28, 18, 0.72);
}

.deals-confirm[hidden],
.points-game[data-deals-game] .points-game-btn[hidden],
.points-game[data-deals-game] .deals-board-winner[hidden] {
  display: none;
}

.deals-confirm-card {
  width: min(100%, 22rem);
  margin: 0;
  padding: 1rem;
  color: #1c1914;
  background: #f6f1e4;
  border: 2px solid #c47a3a;
}

.deals-confirm-card p {
  margin: 0 0 0.75rem;
}

.deals-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.deals-confirm-actions .points-game-btn,
.points-game-result-actions .points-game-btn {
  min-height: 44px;
  touch-action: manipulation;
}

@media (max-width: 360px) {
  .deals-board {
    gap: 0.15rem 0.4rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .points-game[data-deals-game] .deals-confirm,
  .points-game[data-deals-game] .deals-board {
    transition: none;
  }
}

/*
  Batch C — short portrait (e.g. 320×568): Deals hand sat almost fully below the
  fold. Intro under h1 was moved into About This Table; remaining extras were
  bar wrap and deals-board. Compact vertical chrome only; card width / gap and
  game controls stay.
*/
@media (max-width: 767px) and (max-height: 600px) and (orientation: portrait) {
  .points-game[data-deals-game] .points-game-bar {
    gap: 0.15rem 0.3rem;
    padding-bottom: 0.35rem;
  }

  .points-game[data-deals-game] .points-game-bar-links {
    flex: 1 0 100%;
  }

  .points-game[data-deals-game] .points-game-bar-links,
  .points-game[data-deals-game] .points-game-bar-links a {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .points-game[data-deals-game] .points-game-bar .deals-length,
  .points-game[data-deals-game] .points-game-bar [data-act="new"] {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.25rem 0.3rem;
    font-size: 0.72rem;
  }

  .points-game[data-deals-game] .deals-board {
    gap: 0.1rem 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.15;
  }

  .points-game[data-deals-game] .points-game-felt {
    border-width: 3px;
    padding-top: 0.15rem;
    padding-bottom: 0;
  }

  .points-game[data-deals-game] .points-game-rail {
    gap: 0.1rem;
  }

  .points-game[data-deals-game] .points-game-rail .points-game-seat-you {
    gap: 0.2rem 0.35rem;
    margin-bottom: 0;
    padding: 0.1rem 0.35rem;
  }

  .points-game[data-deals-game] .deals-seat-state {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.1;
  }

  .points-game[data-deals-game] .points-game-rail .points-game-hand {
    padding-top: 0.45rem;
    padding-bottom: 0.1rem;
    row-gap: 0.45rem;
  }

  .points-game[data-deals-game] .points-game-dock {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .points-game[data-deals-game] .points-game-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    margin-top: 0;
  }

  .points-game[data-deals-game] .points-game-actions [data-act="discard"],
  .points-game[data-deals-game] .points-game-actions [data-act="declare"],
  .points-game[data-deals-game] .points-game-actions [data-act="arrange"] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0.25rem 0.2rem;
    font-size: 0.7rem;
    line-height: 1.15;
    white-space: nowrap;
  }
}
