@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　ローカルナビゲーション
------------------------------ */
.local-nav-wrap {
  position: relative;
  margin-bottom: 2rem;

  &::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 1rem;
    content: "";
    background: linear-gradient(90deg, rgb(255 255 255 / 0%), var(--color-white));
  }

  @include acms.media-breakpoint-up(md) {
    margin-bottom: 3rem;
  }
}

.local-nav-inner {
  width: 100%;
  overflow: auto hidden;
  scroll-behavior: smooth;
  white-space: nowrap;
}

.local-nav {
  font-weight: bold;
}

.local-nav-list {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}

.local-nav-item {
  padding: 0 1.5rem 0 0;
}

.local-nav-link {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-decoration: none;

  @media (hover: hover) {
    &:hover {
      .local-nav-link-icon {
        background-color: var(--color-icon-bg-hover);
      }
    }
  }
}

.local-nav-link-icon {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: auto;
  aspect-ratio: 1 / 1;
  background-color: var(--color-icon-bg);
  border-radius: 50%;

  /* 方向 */
  &.is-left {
    rotate: 180deg;
  }

  &.is-down {
    rotate: 90deg;
  }

  svg {
    width: 0.625rem;
    height: 0.625rem;
    color: var(--color-white);
    object-fit: contain;

    path {
      stroke: currentcolor;
    }
  }

  @media (hover: hover) {
    transition: background-color 0.3s ease;
  }
}

.local-nav-link-text {
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-base);
  color: var(--color-text);
}
