/**
 * Layout - Breadcrumb
 * main 内のパンくず。幅が足りないときは横スクロール。
 */

.l-breadcrumb {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-block: calc(78px + 0.75rem) 0.75rem;
  padding-inline: 0;
  border-bottom: 1px solid var(--color-border-lightGray);
  background-color: var(--color-bg-white);
  position: relative;

  @media screen and (max-width: 1279px) {
    padding-block: calc(64px + 1.5rem) 1.5rem;
  }

  /* スクロールコンテナ内の ::before は content と一緒に流れて切れるため
   * background-image で線を描く（背景はビューポート基準で固定されスクロールしない） */
  @media screen and (max-width: 1279px) {
    background-image: linear-gradient(var(--color-bg-black) 0%, var(--color-bg-black) 100%);
    background-size: 100% 1px;
    background-position: 0 65px;
    background-repeat: no-repeat;
  }
}

.l-breadcrumbList {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding-inline: calc(4rem + 1.5rem) 1rem;
  min-width: min-content;
  font-size: 1rem;
  color: var(--color-text-dark);

  @media screen and (max-width: 1279px) {
    font-size: 0.75rem;
    padding-inline: 1rem;
  }
}

.l-breadcrumbItem {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;

  &:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-inline: 0.5rem;
    background-image: url("../../images/icon_arrow_right_black.svg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
    text-underline-offset: 0.2em;
  }

  a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }

  .l-breadcrumbHomeIcon {
    flex-shrink: 0;
    display: block;
  }

  &[aria-current="page"] {
    color: var(--color-text-main);
  }
}
