/* A004-U1 staking pool panel and staking history feed. Does not restyle the board, stake card, simulator, ledger, or receipts. */

#pool,
#history {
  scroll-margin-top: calc(var(--space-12) + 60px + var(--space-12));
}

#pool .wrap,
#history .wrap,
#stakers .wrap {
  min-width: 0;
}

#pool h2,
#history h2 {
  margin: var(--space-8, 8px) 0 var(--space-24, 24px);
  color: var(--ink, #18280E);
}

#poolSource,
#stakeHistorySource {
  display: inline-block;
}

.pool-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-24, 24px);
  min-width: 0;
  max-width: 100%;
}

.pool-figure {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8, 8px);
  min-width: 0;
}

.pool-figure .pg {
  color: var(--forest, #18280E);
  flex: none;
}

.pool-figure-value {
  margin: 0;
  font-family: var(--font-mono, "DM Mono", ui-monospace, monospace);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--ink, #18280E);
  overflow-wrap: anywhere;
}

#poolCaption,
#poolClamped {
  margin: var(--space-24, 24px) 0 0;
  max-width: 62ch;
}

#poolClamped[hidden] {
  display: none;
}

#poolStakeCta {
  margin-top: var(--space-24, 24px);
}

#stakeHistoryCount {
  margin: 0 0 var(--space-12, 12px);
}

#stakeHistoryCount[hidden] {
  display: none;
}

.stake-history-feed {
  margin-top: var(--space-16, 16px);
  max-height: 24rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  max-width: 100%;
}

.stake-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.stake-history-list[hidden],
#stakeHistoryEmpty[hidden] {
  display: none;
}

.stake-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8, 8px) var(--space-16, 16px);
  min-width: 0;
  max-width: 100%;
  padding: var(--space-12, 12px) 0;
  border-bottom: 1px solid var(--hairline, #DFE7D4);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stake-history-row .pg {
  flex: none;
  color: var(--forest, #18280E);
}

.stake-history-row .mono {
  min-width: 0;
  color: var(--ink, #18280E);
  font-size: 13px;
}

#stakeHistoryEmpty {
  margin: var(--space-16, 16px) 0 0;
  color: var(--ink-soft, #5C6555);
}

@media (max-width: 768px) {
  .pool-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-24, 24px);
  }
}

@media (max-width: 390px) {
  .pool-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-16, 16px);
  }

  .pool-figure-value {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pool .pg-move,
  #history .pg-move {
    animation: none;
  }
}
