/* Pit Crew event selector clarity — bolt-on companion to the compiled
 * portal client (same pattern as garage-rotate.css / claim-code.css).
 *
 * Lee (2026-11-02): on the Pit Crew page, the event cards at the top do
 * not read as clickable, and the selected one is easy to miss — members
 * may not realize picking an event changes the Pit Crew shown below.
 * Before this sheet, the only difference between the selected card and
 * the rest was a 1px accent border and a 4px inset bar on the left.
 *
 * This sheet (plus pit-crew-hint.js, which adds the instruction line
 * above the list) makes the cards unmistakably button-like and the
 * current selection unmistakable. Every color comes from the app's own
 * theme variables, so it follows Classic, Polished, the dark scheme,
 * and the demo color tool automatically. Behavior is untouched — the
 * app's own state still swaps the workspace below.
 */

.pit-crew-hint {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.pit-workspace-list .pit-workspace-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 150ms ease, box-shadow 150ms ease,
    background-color 150ms ease, transform 150ms ease;
}

.pit-workspace-list .pit-workspace-card:hover,
.pit-workspace-list .pit-workspace-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised, var(--shadow));
}

.pit-workspace-list .pit-workspace-card span {
  font-size: 15px;
}

.pit-workspace-list .pit-workspace-card small {
  font-size: 13px;
}

/* The selected event is filled with the accent color — the same
 * white-on-accent treatment as the app's primary buttons — so which
 * event is on show below is never in doubt. */
.pit-workspace-list .pit-workspace-card.active {
  background: var(--accent);
  border-color: var(--accent-strong, var(--accent));
  color: #fff;
  box-shadow: var(--shadow);
}

.pit-workspace-list .pit-workspace-card.active strong,
.pit-workspace-list .pit-workspace-card.active span {
  color: #fff;
}

.pit-workspace-list .pit-workspace-card.active small {
  color: rgba(255, 255, 255, 0.88);
}

.pit-workspace-list .pit-workspace-card.active::after {
  content: "▾ Now showing below";
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
}

/* Flag legibility inside the cards (pre-existing bundle collision):
 * the bundle's ".pit-workspace-card span" rule colors every span in a
 * card accent-red, which silently overrides the flag tones' own text
 * colors — inside a card, a red flag's label was red-on-red and
 * invisible. Restore each tone's intended text color at higher
 * specificity; values mirror the bundle's own flag rules. */
.pit-workspace-list .pit-workspace-card .flag-red,
.pit-workspace-list .pit-workspace-card .flag-green {
  color: #fff;
}

.pit-workspace-list .pit-workspace-card .flag-neutral {
  color: var(--dim);
}

.pit-workspace-list .pit-workspace-card .flag-gold {
  color: #4b3700;
}

[data-theme="polished"] .pit-workspace-list .pit-workspace-card .flag-gold {
  color: #43360e;
}

/* On the filled (active) card, keep the red flag outlined so it still
 * reads as a flag against the same-color card, and lift the neutral
 * flag onto a translucent white chip. */
.pit-workspace-list .pit-workspace-card.active .flag-red {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.pit-workspace-list .pit-workspace-card.active .flag-neutral {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
