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

/* ------------------------------
　　フッター
------------------------------ */
.footer {
  margin-block-start: var(--footer-margin-top);
  border-top: var(--border-width-sm) solid var(--color-gray20);

  .form-search-button {
    min-width: initial;
  }
}

/* 背景色付きCTAがフッター上にある時は上余白を詰める */
.cta-visual-section + .footer {
  margin-block-start: 0;
}

/* フッターメインコンテンツレイアウト
----------------------------- */
.footer-group {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  padding: 3rem 0;
}

.footer-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;

  &.-navigation {
    gap: 1.5rem;
  }
}

/* サイト情報
----------------------------- */
.footer-item-title {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: map.get(global.$font-scales, body-s);
}

.footer-company-catch {
  margin: 0 0 0.5rem;
  color: var(--color-text-2nd);
}

.footer-company-title {
  margin: 0 0 1rem;
  font-size: map.get(global.$font-scales, heading-s);
  line-height: var(--line-height-none);
}

.footer-company-logo {
  max-height: 2rem;
  margin: 0;
}

@include acms.media-breakpoint-up(md) {
  .footer-group {
    flex-direction: row;
    gap: 3.5rem;
    padding: 3.5rem 0;

  }

  .footer-item {
    &.-address {
      width: calc(4 / 12 * 100%);
    }

    &.-navigation {
      width: calc(8 / 12 * 100%);
    }
  }
}

/* 所在地 */
.footer-address {
  margin-top: auto;
  font-style: normal;
}

.footer-address-name {
  margin: 0 0 0.5rem;
  font-size: map.get(global.$font-scales, body-m);
  line-height: var(--line-height-base);
  color: var(--color-text-2nd);
}

.footer-address-item {
  margin: 0 0 0.5rem;
  font-size: map.get(global.$font-scales, body-s);
  color: var(--color-text-2nd);

  a {
    color: inherit;

    &:any-link {
      text-decoration: underline dotted 1px;
      text-underline-offset: 3px;
    }

    @media (hover: hover) {
      &:hover {
        text-decoration: none;
      }
    }
  }
}

/* 検索フォーム
----------------------------- */
.footer-item .form-search {
  @include acms.media-breakpoint-up(md) {
    display: flex;
  }

  .form-search-label {
    display: block;
    font-weight: bold;

    @include acms.media-breakpoint-down(md) {
      margin-bottom: 0.5rem;
      line-height: initial;
    }
  }
}

/* コピーライト・SNS
----------------------------- */
.footer-bottom-inner {
  display: flex;
  align-items: center;
  padding-bottom: 1.5rem;
}

/* コピーライト */
.footer-copyright-text {
  margin: 0;
  font-size: map.get(global.$font-scales, body-s);
  font-weight: bold;
  line-height: var(--line-height-base);
}

/* SNS */
.footer-bottom-sns {
  display: block;
  margin-left: auto;
}

.footer-sns-group {
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-sns-item {
  &:first-child {
    margin-left: 0;
  }

  &:last-child {
    margin-right: 0;
  }
}

.footer-sns-link {
  display: inline-block;
  vertical-align: top;
}
