/* ==========================================================================
   Breadcrumbs: "HOME › LONDON" (front/partials/_breadcrumbs.html.twig) — every page:
   location, profile, blog section, article. Placement on a page (margins) is the page's
   own CSS; everything inside the list is here only.
   On the location page they stand where the home page has the eyebrow line,
   in the same small caps style, so the hero keeps its shape.

   The list is one line of text, not a row of boxes: a long item (an article title)
   is shown in full and wraps between its words. The markup has no whitespace between
   the tags, so a line can break only before a separator — the separator stays
   with the item after it.
   ========================================================================== */

.breadcrumbs { margin-bottom: var(--space-4); }

.breadcrumbs__list {
  --crumbs-tracking: 0.16em;
  --crumbs-gap: 0.6em;           /* visible space between the text and the arrow, both sides: ≈10px, 9px on phones */
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: var(--crumbs-tracking);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  overflow-wrap: break-word;
}

.breadcrumbs__item { display: inline; }

.breadcrumbs__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumbs__link:hover { color: var(--color-pink-strong); }

.breadcrumbs__link:focus-visible {
  outline: 2px solid var(--color-pink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* The arrow: 8×12, the stroke fills the box, so the margins are the visible gaps.
   On the left the text already ends with its letter-spacing (it is added after every letter,
   the last one too): that much is taken off the margin, so both gaps look equal.
   Vertically it is centred on the capital letters (the text is upper case), whatever the font's metrics
   (a fallback font for Cyrillic has other ones): its bottom sits on the text baseline,
   then it is moved up so its middle is at half the cap height. */
.breadcrumbs__sep {
  display: inline-block;
  vertical-align: baseline;
  width: 8px;
  height: 12px;
  margin-left: calc(var(--crumbs-gap) - var(--crumbs-tracking));
  margin-right: var(--crumbs-gap);
  color: var(--color-pink);
  translate: 0 calc(6px - 0.34em);   /* browsers without the cap unit: Source Sans cap height ≈ 0.68em */
}

@supports (top: 1cap) {
  .breadcrumbs__sep { translate: 0 calc(6px - 0.5cap); }
}

/* An item without a link (e.g. a turned off location) */
.breadcrumbs__text { color: var(--color-text-secondary); }

/* The current page (a link, or plain text): darker and bold; the link turns pink on hover like the others */
.breadcrumbs__link--current,
.breadcrumbs__text--current {
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 639px) {
  .breadcrumbs { margin-bottom: var(--space-3); }
  .breadcrumbs__list { --crumbs-tracking: 0.12em; font-size: 0.9375rem; }
}
