/* STEP-08-B06 - the public vote-results styles.
 *
 * Owner decision (Mission Plan/03-CONSTRAINTS.md, 2026-10-07): "Votes shown as Site | Kick side
 * by side with the total below; Kick highlighted."
 *
 * The file uses the shared owner theme custom properties (apps/web/src/theme.mjs) and carries a
 * fallback for each one, so the same stylesheet works on a page that has not loaded the theme
 * variables. It defines no palette of its own: every colour below resolves to a theme role.
 *
 * Layout rules that matter to the check:
 *   - the two platform columns are a 2-column grid at EVERY width (side by side), with
 *     `min-width: 0` and `overflow-wrap: anywhere` so a long name or a large count wraps instead
 *     of pushing the column out of the card;
 *   - the total line sits below the columns of its own choice (grid row order);
 *   - the Kick column is the highlight: the owner gold surface with the dark owner ink on it,
 *     which is the theme's own rule for a gold surface, and an amber left bar so the highlight is
 *     not carried by colour alone.
 */

.awc-vote-results {
  color: var(--ink, #E6DFD3);
  font: inherit;
  letter-spacing: 0;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.awc-vote-results__notice,
.awc-vote-results__connection,
.awc-vote-results__close-text {
  margin: 0;
  overflow-wrap: anywhere;
}

.awc-vote-results__notice {
  color: var(--muted, #8E8275);
}

.awc-vote-results__choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.awc-vote-results__choice {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #2B3B4E);
  border-radius: 8px;
  background: var(--surface, #1C1613);
}

.awc-vote-results__name {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.awc-vote-results__class {
  margin-left: 0.5em;
  font-weight: 400;
  color: var(--muted, #8E8275);
}

.awc-vote-results__platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.awc-vote-results__platform {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px 8px;
  border: 1px solid var(--line, #2B3B4E);
  border-radius: 6px;
  background: var(--panel, #1C1613);
}

.awc-vote-results__platform-label {
  font-size: 0.8rem;
  color: var(--muted, #8E8275);
}

.awc-vote-results__platform-count {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* The owner-highlighted Kick column: the gold surface with the dark owner ink on it. */
.awc-vote-results__platform--kick {
  border-color: var(--gold, #F3B341);
  background: var(--gold, #F3B341);
  box-shadow: inset 3px 0 0 0 var(--amber, #A85A14);
}

.awc-vote-results__platform--kick .awc-vote-results__platform-label,
.awc-vote-results__platform--kick .awc-vote-results__platform-count {
  color: var(--accent-ink, #0D0B0A);
}

.awc-vote-results__platform[data-enabled='false'] {
  opacity: 0.65;
}

.awc-vote-results__total {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line, #2B3B4E);
}

.awc-vote-results__total-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A count that does not exist yet (a revealed vote before it opens) prints an explicit
 * non-numeric placeholder instead of an invented zero: lighter and smaller than a real count so it
 * never reads as one. Colour is deliberately left to the column, so the Kick highlight keeps its
 * own ink on the gold surface. */
.awc-vote-results__platform-count[data-pending='true'],
.awc-vote-results__total-count[data-pending='true'] {
  font-size: 1rem;
  font-weight: 400;
}

.awc-vote-results__close {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--amber, #A85A14);
  border-radius: 8px;
  background: var(--surface, #1C1613);
}

.awc-vote-results__close-link {
  color: var(--gold, #F3B341);
}
