/**
 * modal-account.css - Match Details Modal and Account Inspection
 */

/* =========================================================
 * MATCH DETAILS MODAL
 * ========================================================= */
.modal-box.match-details-modal-box,
.match-details-modal-box {
  max-width: 640px;
  width: min(640px, 95vw);
}

.match-meta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold-primary, #d4af37);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.match-details-meta-row {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  margin: 14px 0 18px 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.match-meta-item .meta-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  font-weight: 600;
}

.match-meta-item .meta-val {
  font-size: 13px;
  color: var(--text-primary, #ffffff);
  font-weight: 700;
}

.match-players-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.match-players-container::-webkit-scrollbar {
  height: 6px;
}

.match-players-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.match-players-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.match-players-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.match-players-table thead {
  background: var(--bg-surface-elevated, #0f172a);
}

.match-players-table th {
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.match-players-table th.th-rank,
.match-players-table td:first-child {
  text-align: center;
  width: 72px;
  white-space: nowrap;
}

.match-players-table th.th-player,
.match-players-table td:nth-child(2) {
  text-align: left;
}

.match-players-table th.th-vp,
.match-players-table td:nth-child(3) {
  text-align: center;
  width: 84px;
  white-space: nowrap;
}

.match-players-table th.th-status,
.match-players-table td:nth-child(4) {
  text-align: right;
  width: 110px;
  white-space: nowrap;
}

.match-players-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.match-players-table tr.match-winner-row {
  background: rgba(212, 175, 55, 0.08);
}

.match-player-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.match-player-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.2));
}

.match-score-pill {
  font-weight: 800;
  color: var(--gold-primary, #d4af37);
}

.match-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.match-status-pill.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.match-status-pill.status-abandoned {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* =========================================================
 * VICTORY MODAL ANALYTICS BUTTON
 * ========================================================= */
.btn-victory-analytics {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary, #ffffff);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-victory-analytics:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* =========================================================
 * MATCH DETAILS TABS
 * ========================================================= */
.match-details-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.match-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #94a3b8);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.match-tab-btn:hover {
  color: var(--text-primary, #ffffff);
  background: rgba(255, 255, 255, 0.05);
}

.match-tab-btn.active {
  color: var(--gold-primary, #d4af37);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

/* Tab panes */
.match-tab-pane {
  display: block;
}

.match-tab-pane.is-hidden {
  display: none !important;
}

/* =========================================================
 * AWARDS GRID (Standings Tab)
 * ========================================================= */
.match-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.match-award-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.match-award-card.award-winner {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
}

.match-award-icon {
  font-size: 20px;
  line-height: 1;
}

.match-award-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
}

.match-award-holder {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-award-detail {
  font-size: 11px;
  color: var(--gold-primary, #d4af37);
  font-weight: 600;
}

/* =========================================================
 * DICE HISTOGRAM (Dice Tab)
 * ========================================================= */
.match-dice-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 600;
}

.match-dice-total-val {
  color: var(--text-primary, #ffffff);
}

.match-dice-legend {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.dice-histogram {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 200px;
  padding: 16px 12px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.dice-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 5px;
}

.dice-col-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  min-height: 14px;
}

.dice-bar-wrap {
  width: 100%;
  max-width: 32px;
  height: 130px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
}

.dice-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-primary, #d4af37) 0%, rgba(212, 175, 55, 0.3) 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 2px;
}

.dice-bar-fill.bar-hot {
  background: linear-gradient(180deg, #ef4444 0%, rgba(239, 68, 68, 0.4) 100%);
}

.dice-bar-fill.bar-common {
  background: linear-gradient(180deg, #f59e0b 0%, rgba(245, 158, 11, 0.4) 100%);
}

.dice-col-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
}

.dice-col-num.num-seven {
  color: #ef4444;
}

.dice-col-num.num-red {
  color: #f59e0b;
}

.dice-col-prob {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
}

/* =========================================================
 * RESOURCES & ECONOMY (Economy Tab)
 * ========================================================= */
.match-economy-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.match-economy-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted, #94a3b8);
}

.match-economy-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.match-economy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.match-economy-player {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.match-economy-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-primary, #d4af37);
}

.match-economy-res-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.res-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.match-economy-meta-row {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 4px;
}

.stat-danger {
  color: #ef4444;
  font-weight: 700;
}

.stat-trade {
  color: #38bdf8;
  font-weight: 700;
}
