/* ============================================================
   Alpha Finance v2: Project Revenue (/crypto-project-revenue/)
   Loaded after funding.css, lsr.css and rwaperps.css, whose hero, stat
   tiles, market map, mover lists, table and pager it reuses. Only what is
   particular to this page lives here: the category bars, the category
   buttons over the table, the share bar in a row, and the row that opens
   to a project's own definition of revenue.
   ============================================================ */

.rv-topv { display: flex; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-topv .rp-logo, .rv-topv .rp-chip { flex: none; }
.rv-ini { font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-2); --c: #6b727c; }
body.rvn .rp-tile .rp-chip { width: 26px; height: 26px; margin: 0 0 3px; }
body.rvn .rp-tile.is-more { pointer-events: none; }

/* where the revenue is: one bar per category, one hue, a button each */
body.rvn .rp-side .lsr-card-body.rv-cats { padding: 8px 10px 8px; }
.rv-cat {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) 58px 44px; align-items: center; column-gap: 10px;
  width: 100%; height: 27px; padding: 0 6px; border: 0; border-radius: 5px; background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer;
}
.rv-cat:hover { background: var(--panel-2); color: var(--text); }
.rv-cat[aria-pressed="true"] { background: color-mix(in srgb, var(--lime) 8%, transparent); color: var(--text); }
.rv-cat b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-cat-t { height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--line) 55%, transparent); overflow: hidden; }
.rv-cat-t i { display: block; height: 100%; min-width: 2px; border-radius: 2px; background: #3987e5; }
.rv-cat[aria-pressed="true"] .rv-cat-t i { background: var(--lime); }
.rv-cat span, .rv-cat em { font-family: var(--mono); font-size: 11.5px; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.rv-cat span { color: var(--text); }
.rv-cat em { color: var(--muted); }

/* category buttons over the table */
.rv-chips { flex: 1; }
.rv-chips button { height: 30px; padding: 0 11px; font-size: 12px; }

/* the table */
body.rvn .frates td.co { max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.rvn .frates td.co b { font-weight: 600; }
body.rvn .frates td.ct { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
body.rvn .frates td.k { color: var(--text); font-weight: 600; }
body.rvn .frates tbody tr[data-id] { cursor: pointer; }
.rv-share { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.rv-share i { flex: 1; height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--line) 55%, transparent); overflow: hidden; }
.rv-share i u { display: block; height: 100%; min-width: 2px; border-radius: 2px; background: #3987e5; text-decoration: none; }
.rv-share span { flex: none; width: 46px; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; text-align: right; color: var(--text-2); }
.frates th.rv-x, .frates td.rv-x { width: 30px; padding-left: 0; text-align: center; color: var(--muted); }
.frates td.rv-x svg { width: 13px; height: 13px; vertical-align: middle; transition: transform 0.15s; }
.frates tr.is-open td.rv-x svg { transform: rotate(180deg); color: var(--lime); }
body.rvn .frates tbody tr.is-open td { background: color-mix(in srgb, var(--lime) 6%, transparent); }
body.rvn .frates tbody tr.is-open td:first-child { box-shadow: inset 2px 0 0 var(--lime); }
.frates tr.rv-def td { padding: 0; text-align: left; background: color-mix(in srgb, var(--lime) 3%, transparent); white-space: normal; }
.frates tr.rv-def:hover td { background: color-mix(in srgb, var(--lime) 3%, transparent); }
/* the opened row stays the width of what is visible, so it reads whole while the table scrolls sideways */
.rv-defin { position: sticky; left: 0; box-sizing: border-box; width: var(--rv-w, 100%); padding: 14px 18px 16px 46px; box-shadow: inset 2px 0 0 var(--lime); font-family: var(--sans); }
.rv-defin p { max-width: 780px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.rv-defin p b { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rv-defin dl { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 12px 0 0; font-size: 12px; }
.rv-defin dl div { display: flex; gap: 8px; }
.rv-defin dt { color: var(--muted); }
.rv-defin dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }

/* phones: the category is on the buttons above and in the opened row, so its column gives way to the figures */
@media (max-width: 640px) {
  #rv-table th:nth-child(3), #rv-table td.ct { display: none; }
  .rv-share { min-width: 110px; }
}
@media (max-width: 900px) {
  .rv-cat { grid-template-columns: 96px minmax(0, 1fr) 54px 40px; }
  .rv-chips { flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .rv-defin { padding-left: 18px; }
}

/* a mark that failed to load hands over to its initials */
body.rvn .rp-logo[hidden], body.rvn .rp-chip[hidden] { display: none; }
