/* Compact overrides on top of Pico: smaller base type, tighter spacing, denser
   tables. Loaded after pico.min.css so these win the cascade. */

:root {
  /* Pico scales the root from this var (100% -> 131% across breakpoints);
     pinning it lower shrinks everything at every width. ~14px base. */
  --pico-font-size: 87.5%;
  --pico-line-height: 1.4;

  --pico-spacing: 0.75rem;
  --pico-block-spacing-vertical: 0.85rem;
  --pico-block-spacing-horizontal: 1rem;
  --pico-form-element-spacing-vertical: 0.4rem;
  --pico-form-element-spacing-horizontal: 0.6rem;
  --pico-typography-spacing-vertical: 0.85rem;
}

.container {
  max-width: 1080px;
}

h1 {
  font-size: 1.7rem;
  margin-bottom: 0.25rem;
}

hgroup > p {
  margin-bottom: 0;
}

table {
  font-size: 0.92rem;
  margin-bottom: 0;
}

th,
td {
  padding: 0.3rem 0.55rem;
}

thead a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

thead a:hover {
  text-decoration: underline;
}

button {
  font-size: 0.88rem;
}

input {
  margin-bottom: 0;
}

.status {
  margin-bottom: 0.6rem;
}

/* Recent fills: give the market name room, keep the abbreviated wallet on one
   line (full address shows on hover via the cell title). */
.fills .col-market {
  min-width: 18rem;
}

.fills .col-wallet {
  white-space: nowrap;
}

/* Positions: a market past its close time but not yet settled. A compact pill,
   not Pico's full-size text highlight, so it reads as a status next to the time. */
mark.settling {
  margin-left: 0.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

/* Wallets: transient banner for a rejected control action (bad stake, copy cap),
   sat above the table. Hidden until JS fills it, cleared after a few seconds. */
.flash {
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.35rem;
  font-size: 0.85rem;
  color: var(--pico-color-red-550, #b3261e);
  background: var(--pico-color-red-50, rgba(179, 38, 30, 0.12));
}

/* Pager: Prev / page X of Y / Next on one compact row under each table. */
.pager {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.pager button {
  width: auto;
  margin-bottom: 0;
  padding: 0.15rem 0.6rem;
}

.pager span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Wallets: keep every row the same height whether or not it carries the ACTIVE
   stake input and copy button, so a page block stays uniform across pages.
   Fix the row height and shrink the in-cell controls to fit within it. */
#wallets tbody tr {
  height: 2.3rem;
}

#wallets tbody td {
  white-space: nowrap;
}

#wallets td input,
#wallets td button {
  height: 1.6rem;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Logout: tiny form top-right of the dashboard. */
.logout-form {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  margin: 0;
}

.logout-form button {
  width: auto;
  margin: 0;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
}
