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

/* ------------------------------
 カスタムユニット
------------------------------ */

/* カード
------------------------------ */
.#{acms.$entry-class} {
  .card-item,
  .card-bordered-item {
    padding: 0;
  }
}

/* 目次ユニット
------------------------------ */
.#{acms.$entry-class} {
  .entry-outline {
    padding: 1rem;
    margin: 0 0 global.$entry-el-margin-lg;
    border: global.$border-width-lg solid global.$color-gray30;
  }

  .entry-outline-title {
    padding: 0 0 0.5rem;
    margin: 0 0 1rem;
    font-size: map.get(global.$font-scales, body-m);
    font-weight: bold;
    border-bottom: 2px solid global.$color-gray30;
  }

  .entry-outline-list-wrap {
    .outline-list {
      padding: 0 0 0 1.5rem;
      margin: 0;
      counter-reset: a;

      &.level-1 {
        padding: 0;
      }
    }

    .outline-item {
      list-style: none;
    }

    .outline-item::marker {
      content: none;
    }

    .outline-item a {
      display: block;
      margin: 0 0 1rem 0.25rem;
      color: global.$color-text;
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }

      &::before {
        display: inline-block;
        padding-right: 0.5rem;
        font-weight: 700;
        color: global.$color-gray90;
        white-space: nowrap;
        content: counters(a, "-") ". ";
        counter-increment: a;
      }
    }
  }
}

@include acms.media-breakpoint-up(md) {
  .#{acms.$entry-class} {
    .entry-outline {
      padding: 2rem;
    }

    .entry-outline-title {
      padding: 0 0 1rem;
      margin: 0 0 1.5rem;
      font-size: map.get(global.$font-scales, heading-ss);
    }
  }
}

/* 料金テーブル
------------------------------ */
.#{acms.$entry-class} {
  .pricing-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding: 4rem 0 2rem;
    padding: 0;
    margin: 1.5rem 0;

    &:has(.is-recommend) {
      padding-top: 16px;
    }
  }

  .pricing-item {
    position: relative;
    display: flex;
    flex: 0 1 100%;
    margin: 0 0 2rem;
    list-style: none;
  }

  .pricing-inner {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 2.5rem 1.5rem 1.5rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 0 8px 0 rgb(0 0 0 / 10%);
    transition: transform 0.25s ease;
  }

  .pricing-header {
    padding: 0 0 1rem;
    margin: 0 0 1rem;
    text-align: center;
    border-bottom: 1px solid var(--color-gray30);
  }

  .pricing-label-wrap {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    transform: translateY(-50%);
  }

  .pricing-label {
    display: inline-block;
    padding: 0.25rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.5;
    color: var(--color-white);
    background: var(--color-primary);
    border-radius: 10em;
    box-shadow: 0 0 8px rgb(0 0 0 / 10%);

    &::after {
      position: absolute;
      bottom: -9px;
      left: 50%;
      width: 12px;
      height: 10px;
      clip-path: polygon(50% 100%, 0 0, 100% 0);
      content: "";
      background-color: var(--color-primary);
      transform: translateX(-50%);
    }
  }

  .pricing-title {
    margin: 0 0 0.5rem;
    font-size: map.get(global.$font-scales, heading-ss);
    color: var(--color-primary);
  }

  .pricing-desc {
    margin: 0;
    font-size: map.get(global.$font-scales, body-s);
    line-height: 1.5;
    color: var(--color-text-2nd);
  }

  .pricing-price {
    margin: 0 0 0.5rem;
    font-size: map.get(global.$font-scales, heading-l);
    font-weight: bold;
    line-height: 1.25;
    text-align: center;
  }

  .pricing-unit {
    font-size: map.get(global.$font-scales, body-m);
  }

  .pricing-check-group {
    padding: 0;
    margin: 0 0 1rem;
    font-size: map.get(global.$font-scales, body-s);
    list-style: none;

    li {
      margin: 0 0 0.5rem;

      &::before {
        display: inline-block;
        width: 1.25rem;
        height: 1.25rem;
        margin: 0 0.375rem 0 0;
        vertical-align: top;
        content: "";
        background: url(#{global.$root-theme-img}icon-check.svg);
        background-size: contain;
      }
    }
  }

  .pricing-button {
    display: block;
    margin: 0 0 1rem;
  }

  .pricing-text-info {
    margin: 0;
    font-size: map.get(global.$font-scales, body-s);
    line-height: var(--line-height-base);
    color: var(--color-text-2nd);
    text-align: center;
  }
}

@include acms.media-breakpoint-up(md) {
  .#{acms.$entry-class} {
    .pricing-group {
      flex-flow: row wrap;
      gap: 2rem;
      padding: 6rem 0 4rem;
      margin: 0;
    }

    .pricing-item {
      box-sizing: border-box;
      flex: 1 1 calc(100% / 3 - 2rem);
      margin: 0 0 2rem;

      &:hover .pricing-inner {
        box-shadow: 0 0 8px rgb(0 0 0 / 20%);
      }
    }

    .pricing-label {
      padding: 0.5rem 1.5rem;
      font-size: 1.25rem;
    }

    .pricing-title {
      font-size: map.get(global.$font-scales, heading-ss);
    }
  }
}
