/*
 * breadcrumb: <nav aria-label="Trilha de navegação"> + <ol>. The separator is CSS-only with empty
 * alt text, so screen readers hear the list, not the arrows. The last item is plain text with
 * aria-current="page". Below 37.5em items stay on one line and truncate with an ellipsis.
 */
@layer components {
  .breadcrumb__list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
  }

  .breadcrumb__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
  }

  .breadcrumb__item + .breadcrumb__item::before {
    flex: none;
    content: "›" / "";
    color: var(--color-text-muted);
  }

  .breadcrumb__link,
  .breadcrumb__current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .breadcrumb__link {
    color: var(--color-action);

    &:hover {
      color: var(--color-action-hover);
      text-decoration-thickness: calc(var(--border-width) * 2);
    }

    &:active {
      background: var(--color-action-tint);
    }
  }

  .breadcrumb__current {
    color: var(--color-text);
    font-weight: var(--weight-medium);
  }

  @media (min-width: 37.5em) {
    .breadcrumb__list {
      flex-wrap: wrap;
    }

    .breadcrumb__link,
    .breadcrumb__current {
      white-space: normal;
    }
  }
}
