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

/* ------------------------------
　　ベース
------------------------------ */
html {
  color: global.$color-text;
  font-family: global.$font-base;
  line-height: global.$line-height-lg;
  background: global.$color-white;
  scroll-behavior: smooth;
  scroll-padding-top: global.$header-height-fixed + 2rem;
}

body {
  margin: 0;
}

/* リンクの設定 */
a {
  border: none;

  &[href^="tel:"] {
    color: currentcolor;
    text-decoration: none;
    border-bottom: global.$border-width-sm dashed;

    &:hover {
      text-decoration: none;
      border: 0;
    }
  }
}

/* コンテナー */
.acms-container {
  --gutter: var(--gutter-md);

  max-width: global.$container;
  padding-right: calc(global.$col-gutter / 2);
  padding-left: calc(global.$col-gutter / 2);

  @if global.$enable-iphonex == true {
    padding-right: calc(env(safe-area-inset-right) + (global.$col-gutter / 2));
    padding-left: calc(env(safe-area-inset-left) + (global.$col-gutter / 2));
  }

  .acms-container {
    padding: 0;
  }
}

.container-md {
  --gutter: var(--gutter-md);

  box-sizing: border-box;
  max-width: global.$container-md;
  margin: 0 auto;
  padding-right: calc(global.$col-gutter / 2);
  padding-left: calc(global.$col-gutter / 2);

  @if global.$enable-iphonex == true {
    padding-right: calc(env(safe-area-inset-right) + (global.$col-gutter / 2));
    padding-left: calc(env(safe-area-inset-left) + (global.$col-gutter / 2));
  }
}

.container-sm {
  --gutter: var(--gutter-sm);

  box-sizing: border-box;
  max-width: global.$container-sm;
  margin: 0 auto;
  padding-right: calc(global.$col-gutter / 2);
  padding-left: calc(global.$col-gutter / 2);

  @if global.$enable-iphonex == true {
    padding-right: calc(env(safe-area-inset-right) + (global.$col-gutter / 2));
    padding-left: calc(env(safe-area-inset-left) + (global.$col-gutter / 2));
  }
}

/* グリッド */
.acms-grid {
  margin: 0 calc(global.$col-gutter / -2);
}

[class*="acms-col"] {
  padding-right: calc(global.$col-gutter / 2);
  padding-left: calc(global.$col-gutter / 2);
}

.main {
  margin: 0 0 5rem;
}

@media screen and (min-width: acms.$breakpoint-md-min) {
  .main {
    margin: 0 0 6.5rem;
  }
}

/* 固定コンテンツ */
.sticky-contents {
  position: fixed;
  bottom: 0;
  z-index: global.$zindex-fixed-contents;
  display: none;
  box-sizing: border-box;
  width: 100%;
  padding: 1rem 0;
  transform: translateY(40px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.2s;

  &.is-centered {
    text-align: center;
  }

  &.is-show {
    transform: translateY(0);
    opacity: 1;
  }

  &.is-active {
    display: block;
  }
}
