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

/* ------------------------------
　　タイポグラフィ
------------------------------ */

/* 見出し
------------------------------ */
.heading-lg {
  margin-block: 0 var(--entry-el-margin-sm);
  font-size: map.get(global.$font-scales, heading-s);
  line-height: var(--line-height-md);

  &.heading-line {
    padding-bottom: 1rem;
    border-bottom: var(--border-width-md) solid var(--color-gray100);
  }

  &.heading-primary {
    position: relative;
    margin-bottom: calc(var(--entry-el-margin-xs) + 0.25rem + var(--entry-el-margin-sm));

    &::before {
      position: absolute;
      bottom: calc(var(--entry-el-margin-xs) * -1);
      left: 0;
      display: block;
      width: 3.5rem;
      height: var(--border-width-lg);
      content: "";
      background: var(--color-primary);
    }
  }

  @include acms.media-breakpoint-up(md) {
    font-size: map.get(global.$font-scales, heading-m);
    line-height: var(--line-height-sm);
  }

  a {
    color: currentcolor;
    text-decoration: none;
  }
}

.heading-md {
  margin-block: 0 var(--entry-el-margin-sm);
  font-size: map.get(global.$font-scales, heading-ss);
  line-height: var(--line-height-lg);

  &.heading-line {
    padding-bottom: 1rem;
    border-bottom: var(--border-width-md) solid var(--color-gray100);
  }

  @include acms.media-breakpoint-up(md) {
    font-size: map.get(global.$font-scales, heading-s);
    line-height: var(--line-height-md);
  }
}

.heading-sm {
  margin-block: 0 var(--entry-el-margin-sm);
  font-size: map.get(global.$font-scales, heading-ss);
  line-height: var(--line-height-lg);

  &.heading-line {
    padding-bottom: 1rem;
    border-bottom: var(--border-width-md) solid var(--color-gray100);
  }
}

.heading-ss {
  margin-block: 0 var(--entry-el-margin-sm);
  font-size: map.get(global.$font-scales, heading-3s);
  line-height: var(--line-height-base);

  &.heading-line {
    padding-bottom: 1rem;
    border-bottom: var(--border-width-md) solid var(--color-gray100);
  }
}

/* 本文
------------------------------ */
.paragraph {
  margin-block: 0 var(--entry-el-margin-md);
  font-size: map.get(global.$font-scales, body-m);
  color: var(--color-text);

  a {
    text-decoration: none;
    border-bottom: var(--border-width-sm) dotted currentcolor;

    &,
    &:link,
    &:visited {
      color: inherit;
    }

    @media (hover: hover) {
      &:any-link:hover {
        border-bottom-color: transparent;
      }
    }
  }
}

/* インラインスタイル
------------------------------ */
.text-word-break {
  display: inline-block;
}

/* リスト
------------------------------ */
.list-unordered {
  padding: 0 0 0 2rem;
  margin: 0 0 var(--entry-el-margin-md) 0;

  li {
    position: relative;
    clear: both;
    margin: 0 0 0.5rem;
    line-height: var(--line-height-base);
    list-style: none;

    &::before {
      position: absolute;
      top: 0.5rem;
      left: -1.5rem;
      width: 0.5rem;
      height: 0.5rem;
      content: "";
      background: var(--color-secondary);
      border-radius: 50%;
    }
  }
}

/* 記事検索結果の件数
------------------------------ */
.text-result-amount {
  margin-block: 0 2rem;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-base);
}

/* 記事が notFound の時のメッセージ
------------------------------ */
.text-notfound-article {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-base);
}
