/*
  breadcrumb.css
  ---------------------------------------------------------------------
  A single-line trail showing where the current page sits in a site's
  hierarchy, e.g. Shop / Headphones / Wireless headphones.

  Requires: css/reset.css, css/core.css

  HTML STRUCTURE:
    <nav class="breadcrumb" aria-label="Breadcrumb">
      <ol class="breadcrumb__list">
        <li class="breadcrumb__item"><a class="breadcrumb__link" href="#">Shop</a></li>
        <li class="breadcrumb__item" aria-current="page">Wireless headphones</li>
      </ol>
    </nav>

  The current page is a plain <li> with aria-current="page" - not a
  link - since it does not go anywhere.
  ---------------------------------------------------------------------
*/

@layer components {

  /* Optional gap below the trail before whatever content follows it -
     0 by default so a breadcrumb dropped into a .stack or other
     spaced ancestor doesn't get spacing from two sources at once. */
  .breadcrumb {
    margin-block-end: var(--breadcrumb-gap, 0);
  }

  .breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--color-muted);
  }

  .breadcrumb__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .breadcrumb__item:not(:last-child)::after {
    content: "/";
    color: var(--color-border-strong);
  }

  .breadcrumb__item[aria-current="page"] {
    color: var(--color-text);
    font-weight: 600;
  }

  .breadcrumb__link {
    color: inherit;
    text-decoration: none;
  }

  .breadcrumb__link:hover,
  .breadcrumb__link:focus-visible {
    color: var(--color-accent-text);
  }

} /* end @layer components */
