/* cars.css — additions on top of engines.css for the Cars page. */

/* Type filter chips above the cars list */
.cars-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 12px;
  border-bottom: 1px solid var(--panel-border);
}
.cars-type-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.cars-type-chip:hover {
  background: rgba(88, 166, 255, 0.06);
  color: var(--text);
}
.cars-type-chip.active {
  background: rgba(88, 166, 255, 0.14);
  border-color: var(--early);
  color: var(--text);
}
.cars-type-chip .cars-type-count {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 1px 6px;
  font-size: 10px;
  color: var(--muted);
}
.cars-type-chip.active .cars-type-count {
  background: rgba(88, 166, 255, 0.25);
  color: var(--text);
}

/* Type badge next to the car number in the list — small monospace tag */
.cars-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cars-type-badge[data-type="SL"]  { background: rgba(125, 169, 220, 0.18); color: #9ec2eb; }
.cars-type-badge[data-type="M3A"] { background: rgba(186, 144, 220, 0.18); color: #c8aae3; }
.cars-type-badge[data-type="M7"],
.cars-type-badge[data-type="M7A"] { background: rgba(110, 209, 173, 0.18); color: #98dfc3; }
.cars-type-badge[data-type="M8"]  { background: rgba(245, 200, 66, 0.18);  color: #f5d56a; }
.cars-type-badge[data-type="SC"]  { background: rgba(238, 0, 52, 0.15);    color: #ff7a90; }

/* Make the list row's grid accommodate the new type badge column */
.engines-list .engine-row {
  grid-template-columns: auto auto 1fr auto;
}

/* Highlighted car in the expanded consist — ring it so the user can spot
   which car they're looking at within a 7- or 8-car train */
.consist-strip .car.highlight {
  outline: 2px solid #58a6ff;
  outline-offset: 1px;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.6);
  position: relative;
  z-index: 1;
}
