/* AUREA Tools — Wallet Analyzer page styles.
   Shared chrome (topbar, cards, buttons, nav, stat grid, token rows)
   comes from styles.css and portfolio.css; only the rules specific
   to this page live here. Same brand system as the other tools. */

.wa-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.wa-section-title .chain-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 2px 9px;
}

.wa-sub {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--panel);
}

.wa-sub h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.wa-sub h3 img.coin-img { width: 22px; height: 22px; }

.wa-cat-row {
  display: grid;
  grid-template-columns: 130px 1fr minmax(130px, auto);
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.wa-cat-row:last-child { border-bottom: none; }

.wa-cat-label { font-weight: 700; color: var(--text); }

.wa-cat-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--input-bg);
  overflow: hidden;
}

.wa-cat-bar > span {
  display: block;
  height: 100%;
  background: var(--gradient-brand);
}

.wa-cat-val { text-align: right; font-weight: 700; color: var(--muted); }

@media (max-width: 560px) {
  .wa-cat-row { grid-template-columns: 96px 1fr minmax(104px, auto); font-size: 13px; }
}

/* --- Charts (self-drawn SVG in wallet.js; no chart library) --- */

.wa-chart { margin: 16px 0 4px; }

.wa-chart h3 { margin: 0 0 6px; font-size: 15px; font-weight: 800; color: var(--text); }

.wa-chart svg { display: block; width: 100%; height: auto; }

.wa-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
}

@media (max-width: 640px) {
  .wa-chart-grid { grid-template-columns: 1fr; }
}

.wa-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 6px;
}

.wa-legend .sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}

.wa-svg-max, .wa-svg-label {
  fill: var(--muted);
  font-size: 10px;
  font-family: inherit;
}

.wa-svg-axis { stroke: var(--border); stroke-width: 1; }

.wa-svg-center {
  fill: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
}

/* Composition donut + category list side by side */
.wa-comp-flex {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.wa-donut { flex: 0 0 auto; }

.wa-donut-svg { display: block; width: 140px; height: 140px; }

.wa-comp-cats { flex: 1 1 260px; min-width: 240px; }

.wa-comp-cats .wa-cat-row:first-child { padding-top: 0; }

/* Balances: value-by-token bars reuse .wa-cat-row with a
   narrower symbol column */
.wa-val-row { grid-template-columns: 64px 1fr minmax(130px, auto); }

@media (max-width: 560px) {
  .wa-val-row { grid-template-columns: 52px 1fr minmax(104px, auto); }
}

/* Runway / price-drop scenarios inside the composition card */
.wa-runway { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.wa-runway h3 { margin: 0 0 10px; font-size: 15px; }
.wa-spend-row { margin-bottom: 10px; }
.wa-scen-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.wa-scen-table th, .wa-scen-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.wa-scen-table th.num, .wa-scen-table td.num { text-align: right; }

/* Other-chain balances digest inside the balances card */
#waOtherChainsBody h3 { margin: 16px 0 8px; font-size: 15px; }
#waOtherChainsBody .row a { color: var(--accent, #FFD700); }
