/* history.css — dispute-review hand history page */

/* Payout multiplier chip shown beside +net on winning bets */
.mult-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(245, 214, 122, 0.18);
  border: 1px solid rgba(245, 214, 122, 0.5);
  color: #f5d67a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}


.history-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  color: #e8d98c;
}
.history-h2 {
  font-size: 28px;
  letter-spacing: 0.06em;
  margin: 12px 0 6px;
}
.history-sub {
  color: rgba(232, 217, 140, 0.65);
  font-size: 14px;
  max-width: 680px;
  margin: 0 0 24px;
  line-height: 1.5;
}
.history-status, .history-empty {
  padding: 24px;
  text-align: center;
  color: rgba(232, 217, 140, 0.7);
  font-style: italic;
}
.history-status.hidden, .history-empty.hidden, .history-table.hidden, .history-pagination.hidden {
  display: none;
}

/* Main table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 24px;
}
.history-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(245, 214, 122, 0.35);
  color: rgba(245, 214, 122, 0.8);
  background: rgba(0, 0, 0, 0.15);
}
.history-table thead th.num {
  text-align: right;
}
.history-table tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(245, 214, 122, 0.08);
  color: #fff0bf;
}
.history-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.history-table tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}
.history-table tbody tr:hover {
  background: rgba(245, 214, 122, 0.05);
}
.history-table tbody tr:active {
  background: rgba(245, 214, 122, 0.10);
}

/* Outcome chips */
.outcome-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.outcome-chip.win  { background: rgba(88, 188, 120, 0.22); color: #a6e6b8; border: 1px solid rgba(88, 188, 120, 0.5); }
.outcome-chip.loss { background: rgba(220, 88, 88, 0.18);  color: #f0a4a4; border: 1px solid rgba(220, 88, 88, 0.5); }
.outcome-chip.push { background: rgba(210, 180, 90, 0.18); color: #f0e0a8; border: 1px solid rgba(210, 180, 90, 0.5); }
.outcome-chip.fold { background: rgba(140, 140, 140, 0.18);color: #c8c8c8; border: 1px solid rgba(140, 140, 140, 0.5); }

/* Net amounts colorized */
.net-pos { color: #a6e6b8; font-weight: 600; }
.net-neg { color: #f0a4a4; font-weight: 600; }
.net-zero { color: #c8c8c8; }

/* Pagination */
.history-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.history-pagination button {
  background: rgba(245, 214, 122, 0.1);
  color: #f5d67a;
  border: 1px solid rgba(245, 214, 122, 0.5);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.history-pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.history-pagination .pageinfo {
  color: rgba(245, 214, 122, 0.7);
  font-size: 13px;
  margin: 0 8px;
  font-variant-numeric: tabular-nums;
}

/* Detail modal */
.history-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.history-modal.hidden { display: none; }
.history-modal-content {
  background: linear-gradient(180deg, #1a2f22 0%, #102619 100%);
  border: 1px solid rgba(245, 214, 122, 0.4);
  border-radius: 12px;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 32px;
  color: #fff0bf;
  position: relative;
}
.history-modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(245, 214, 122, 0.6);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}
.history-modal-close:hover {
  color: #f5d67a;
}
.history-modal h3 {
  margin: 0 0 18px;
  font-size: 22px;
  color: #f5d67a;
}
.history-detail-section {
  margin: 18px 0;
}
.history-detail-section h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: rgba(245, 214, 122, 0.8);
}
.history-cards {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.history-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 56px;
  padding: 4px 8px;
  background: #fafafa;
  color: #202020;
  border-radius: 5px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
}
.history-card.red    { color: #c72828; }
.history-card.gold   { background: linear-gradient(135deg, #f5d67a 0%, #c59c3a 100%); color: #4a2f00; border: 2px solid #fff0bf; }
.history-card.folded { opacity: 0.4; }

/* Bet breakdown table */
.history-bets {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}
.history-bets th, .history-bets td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(245, 214, 122, 0.10);
}
.history-bets th {
  text-align: left;
  color: rgba(245, 214, 122, 0.7);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.history-bets td.num { text-align: right; font-variant-numeric: tabular-nums; }
.history-bets tr.total td {
  border-top: 2px solid rgba(245, 214, 122, 0.35);
  font-weight: 700;
}

.history-meta-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 12px;
  font-size: 13px;
  margin-top: 4px;
}
.history-meta-grid dt {
  color: rgba(245, 214, 122, 0.7);
}
.history-meta-grid dd {
  margin: 0;
  color: #fff0bf;
  font-variant-numeric: tabular-nums;
}

/* Narrow screens */
@media (max-width: 760px) {
  .history-page { padding: 16px 14px 40px; }
  .history-table thead { display: none; }
  .history-table, .history-table tbody, .history-table tr, .history-table td { display: block; width: 100%; }
  .history-table tbody tr {
    border: 1px solid rgba(245, 214, 122, 0.2);
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 8px 10px;
  }
  .history-table tbody td { padding: 3px 0; border: none; text-align: left; }
  .history-table tbody td.num { text-align: left; }
  .history-table tbody td::before {
    content: attr(data-label) ": ";
    color: rgba(245, 214, 122, 0.7);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    min-width: 90px;
  }
}
