/* ==========================================================================
   Theme v2 — Hall of Fame content-layout overrides

   Page-scoped, on purpose: linked only from hall_of_fame.html (after
   main.css), so every other page is unaffected. This file no longer carries
   a separate colour palette, nor a separate container width - the header,
   hero, rail and page container on this page use main.css's/Bootstrap's own
   defaults, unmodified, the same as every other interior page (Biography,
   Electoral Journey, ...). What is left here is purely structural: the
   positioning/density fixes a design-fidelity review asked for (tabs that
   don't wrap, a compact filter row, card proportions, the two
   always-visible Hall of Fame sections) that a plain class-name reuse of
   main.css's components didn't already produce on its own.
   ========================================================================== */

/* Hero, rail and stats-panel positioning are unmodified main.css - the same
   .tr-hero / .tr-layout__rail / .tr-hero__stats--offset every other
   tr-layout__rail page (Electoral Journey, Biography, ...) uses, so this
   page's hero grid lines up with theirs exactly. Only the stat *tiles'*
   internal layout is different here (see .tr-statbar--strip below), not
   their panel's position. */

/* --------------------------------------------------------------------------
   Statistics strip - icon beside the figure (same row-reverse trick
   .tr-statbar--hero already uses in main.css: reversing .tr-stat puts the
   icon-plus-number pair before the label, and un-reversing .tr-stat__value
   keeps the icon before the number within that pair - not
   .tr-statbar--panel's icon-on-top layout. New variant; .tr-statbar--panel
   and .tr-statbar--hero themselves are untouched.
   -------------------------------------------------------------------------- */

.tr-statbar--strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  padding: var(--tr-space-3) var(--tr-space-3);
  background-color: var(--tr-surface);
  border-radius: var(--tr-radius);
  box-shadow: var(--tr-shadow-raised);
  color: var(--tr-text);
}

.tr-statbar--strip .tr-stat {
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline: var(--tr-space-3);
  text-align: left;
  border-right: 1px solid var(--tr-line);
}

.tr-statbar--strip .tr-stat:last-child {
  border-right: 0;
}

.tr-statbar--strip .tr-stat__value {
  flex-direction: row;
  align-items: center;
  gap: var(--tr-space-2);
}

.tr-statbar--strip .tr-stat__icon {
  color: var(--tr-saffron-500);
  font-size: 1.4rem;
}

.tr-statbar--strip .tr-stat__number {
  font-family: var(--tr-font-display);
  font-size: var(--tr-fs-h3);
}

.tr-statbar--strip .tr-stat__label {
  color: var(--tr-text-muted);
  font-size: var(--tr-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Tabs, filters, cards - density/positioning only, using main.css's own
   existing tokens throughout (no colour redeclared anywhere in this file).
   -------------------------------------------------------------------------- */

/* Reference: `.filters{display:flex;gap:8px;overflow:auto}` - a single row
   that scrolls horizontally rather than wraps. main.css's own
   `.tr-hoftabs{flex-wrap:wrap}` is what two-lines these on desktop;
   overridden here only, so nothing else that might reuse `.tr-hoftabs`
   later inherits a scrolling tab row it didn't ask for. */
.tr-hoftabs {
  flex-wrap: nowrap;
  gap: var(--tr-space-2);
  overflow-x: auto;
  padding-bottom: var(--tr-space-1);
}

.tr-hoftab {
  flex-shrink: 0;
  padding: var(--tr-space-2) var(--tr-space-4);
  font-size: var(--tr-fs-xs);
}

/* Reference: a compact, borderless, single-row filter bar of small pill
   controls (`.select,.input,.filter-btn{border:1px solid #dce4e1;
   border-radius:7px;padding:9px 12px}`), not the card-panel main.css's own
   `.tr-filters{padding;background;border}` renders - main.css's rule is
   still correct for anywhere else `.tr-filters` might be reused; this page
   flattens it to a row instead. */
.tr-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--tr-space-2);
  padding: 0 0 var(--tr-space-2);
  overflow-x: auto;
  background-color: transparent;
  border: 0;
  border-radius: 0;
}

.tr-filters__control {
  flex-shrink: 0;
  height: 2.25rem;
  padding: 0 var(--tr-space-3);
  background-color: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-sm);
  color: var(--tr-text);
  font-size: var(--tr-fs-xs);
  white-space: nowrap;
}

.tr-filters__control--btn {
  cursor: pointer;
}

.tr-filters input.tr-filters__control {
  width: 12rem;
  max-width: 40vw;
}

.tr-filters .tr-view-toggle {
  flex-shrink: 0;
}

/* Reference: `.section-head{display:flex;justify-content:space-between}` -
   a heading with a "View All" link on the same line, above each of the two
   always-visible sections (Top Innovators, Award Winning Ideas). New,
   page-scoped classes: nothing elsewhere on the site pairs a heading with
   this link, so there is no existing component to reuse or collide with. */
.tr-hof-section {
  margin-bottom: var(--tr-space-6);
}

.tr-hof-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tr-space-2);
  margin-bottom: var(--tr-space-3);
}

.tr-hof-section__title {
  margin: 0;
  font-size: var(--tr-fs-h3);
}

.tr-hof-section__viewall {
  flex-shrink: 0;
  color: var(--tr-green-500);
  font-size: var(--tr-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.tr-innovator {
  padding: var(--tr-space-3) var(--tr-space-2);
}

.tr-innovator__avatar {
  width: 4.5rem;
}

/* Reference: the rank sits centred above the avatar, not riding its
   top-left corner the way main.css's own `.tr-innovator__avatar
   .tr-medal{top;left}` positions it elsewhere this component might be
   reused. Overridden here only. */
.tr-innovator__avatar .tr-medal {
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
}

/* Reference: `.award-card .card-img{height:125px}` - a short, wide strip,
   not the 16:9 box `partials/placeholder.html` defaults every other use of
   `ratio="16x9"` to. Scoped to this page's award cards only. */
.tr-idea__media .tr-placeholder--16x9 {
  --tr-ratio: 3 / 1;
}

/* Reference's side panels are a plain label/count list with a dashed
   divider (`.side-list div{border-bottom:1px dashed}`), no progress bar.
   `.tr-breakdown__bar`/`__fill` (main.css) still render the bar for
   app_admin_panel/dashboard.html, the only other place that reuses this
   component - hidden here, on this page only. */
.tr-hof-panel .tr-breakdown__row {
  grid-template-columns: 1fr auto;
  padding: var(--tr-space-2) 0;
  border-bottom: 1px dashed var(--tr-line);
}

.tr-hof-panel .tr-breakdown__row:last-child {
  border-bottom: 0;
}

.tr-hof-panel .tr-breakdown__bar {
  display: none;
}

/* --------------------------------------------------------------------------
   CTA - the mockup shows one unified panel (ask + button + How It Works),
   not the two separate cards (.tr-banner and .tr-hofsteps) this page used
   to lay side by side. New wrapper class; .tr-banner and .tr-hofsteps
   still exist and are still used elsewhere (e.g. Explore Ideas), untouched.
   -------------------------------------------------------------------------- */

.tr-hof-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tr-space-6);
  padding: var(--tr-space-5) var(--tr-space-6);
  margin-block: var(--tr-space-6);
  background-image: linear-gradient(90deg, var(--tr-surface-warm), #fffaf3);
  border: 1px solid var(--tr-line-warm);
  border-radius: var(--tr-radius-lg);
}

.tr-hof-cta__ask {
  flex: 1 1 18rem;
}

.tr-hof-cta__title {
  margin-bottom: var(--tr-space-2);
  font-size: var(--tr-fs-h2);
}

.tr-hof-cta__text {
  margin-bottom: 0;
  color: var(--tr-text-muted);
}

.tr-hof-cta__how {
  flex: 1 1 20rem;
}

.tr-hof-cta__how-title {
  margin-bottom: var(--tr-space-3);
  font-size: var(--tr-fs-h3);
}

/* --------------------------------------------------------------------------
   Grid/list view toggle - visual only (project.js swaps this class on the
   card container; no new query param, no backend change).
   -------------------------------------------------------------------------- */

/* .tr-ideas is a Bootstrap row-cols-* grid (flexbox width percentages, not
   CSS grid) - beating row-cols-md-2/row-cols-xl-3 etc. at every breakpoint
   means overriding the same `> .col` children they target, not a
   grid-template-columns rule that would have no flexbox equivalent to
   override in the first place. */
.tr-ideas--list > .col {
  width: 100%;
}

.tr-ideas--list .tr-idea {
  flex-direction: row;
}

.tr-ideas--list .tr-idea__media {
  width: 12rem;
  flex-shrink: 0;
}

.tr-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--tr-space-1);
  padding: var(--tr-space-2) var(--tr-space-3);
  background-color: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-sm);
  color: var(--tr-text-muted);
  font-size: var(--tr-fs-xs);
}

.tr-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--tr-radius-sm);
  color: inherit;
}

.tr-view-toggle__btn--active {
  background-color: var(--tr-surface-sunken);
  color: var(--tr-green-500);
}
