/* Diversions.
 *
 * The frame, the tiles and the tables come from punctuality.css and
 * pinch.css. This is only the incident list, which has no equivalent
 * elsewhere on the site: a stack of small cards, each one bus or several,
 * with an explanation underneath or the pointed absence of one.
 *
 * Everything is under `.incident` rather than styling bare class names.
 * `.pill` and `.muted` in particular are the kind of names another page will
 * want one day, and a rule here that reached them would move a table on a
 * report nobody was looking at. (See also: this site's .hero problem.)
 */

.incident {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface-1);
}

/* Nothing published is the finding, so it is the one that is coloured. */
.incident-unexplained {
  border-color: color-mix(in srgb, var(--status-critical) 40%, var(--border));
  background: color-mix(in srgb, var(--status-critical) 5%, var(--surface-1));
}

.incident-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--text-primary);
}

.incident-head b { font-weight: 600; }

.incident-facts {
  display: flex;
  flex-wrap: wrap;
  /* Column gap does the separating, so the row reads as distinct facts
     rather than one run-on sentence -- which is exactly how it read before
     this file existed. */
  gap: 4px 18px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.incident-why {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
  /* A works description can be one very long unbroken word of a street name;
     without this the card grows a horizontal scrollbar on a phone. */
  overflow-wrap: anywhere;
}

.incident .muted { color: var(--text-muted); }

.incident .pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--series-1) 16%, transparent);
  color: var(--text-primary);
}

.incident .pill-bad {
  background: color-mix(in srgb, var(--status-critical) 18%, transparent);
  color: var(--status-critical);
}

.incident .pill-live {
  background: color-mix(in srgb, var(--status-critical) 14%, transparent);
  color: var(--status-critical);
}

#incidents { margin-top: 4px; }
