/* ====================================================================================
Foundation
==================================================================================== */
html {
  scroll-behavior: smooth;
}

/* メニュー表示中にスクロール禁止 */
body.is-no-scroll {
  overflow: hidden;
  height: 100vh;
}

section {
  @media screen and (max-width: 782px) {
    scroll-margin-top: 70px;
  }

  @media screen and (min-width: 783px) {
    scroll-margin-top: 100px;
  }
}

a[target="_blank"]:not([class]) {
  position: relative;
  display: inline-block;
  text-decoration: underline;
  transition: opacity 0.35s;
  margin-right: 0.2em;

  &::after {
    content: "";
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    margin-left: 0.3em;
    margin-bottom: 0.2em;
    mask-image: url(../img/up-right-from-square-solid-full.svg);
    -webkit-mask-image: url(../img/up-right-from-square-solid-full.svg);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: currentColor;
    vertical-align: middle;
  }

  &:hover {
    opacity: 0.7;
  }
}


/* ====================================================================================
Plug-in
==================================================================================== */

/* snow-monkey-form
-------------------------------------------------------------------- */
/* プログレストラッカー */
.smf-progress-tracker__item[aria-current=true] .smf-progress-tracker__item__number {
  background-color: var(--wp--preset--color--primary);
}

.smf-progress-tracker__item[aria-current=true] .smf-progress-tracker__item__text {
  color: var(--wp--preset--color--primary);
}

/* フォーム */
.snow-monkey-form {
  & input::placeholder,
  & textarea::placeholder {
    color: #BBBBBB;
    font-weight: 500;
  }

  & div[data-name="privacy"] {
    text-align: center;
    font-size: var(--wp--preset--font-size--lg);
  }

  & button[data-action="back"] {
    background: var(--wp--preset--color--base);
    border: 2px solid var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);

    &:hover {
      background-color: var(--wp--preset--color--primary);
      color: var(--wp--preset--color--base);
    }
  }
}

.smf-form .smf-checkbox-control {
  align-items: center;
}

.smf-checkbox-control {
  cursor: pointer;
}

.smf-item__label__text {
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 700;

  & mark {
    font-size: var(--wp--preset--font-size--xs-3);
    margin-left: var(--wp--preset--spacing--20);
    padding: .1em .7em;
    border-radius: 4px;
  }
}

.smf-form--letter .smf-item {
  padding-block: var(--wp--preset--spacing--20);
}

.smf-form--letter .smf-item__col--label {
  padding-bottom: var(--wp--preset--spacing--10);
}

.smf-form--letter .smf-text-control__control,
.smf-form .smf-textarea-control__control {
  border: none;
  font-size: 16px;
  padding: 1em;
  border-radius: 5px;
}

.smf-action .smf-button-control__control {
  border-radius: 100vmax;
  font-weight: 700;
  background: var(--wp--preset--color--primary);
  border: 2px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
  font-size: var(--wp--preset--font-size--lg);
  padding-block: var(--wp--preset--spacing--30);
  min-width: 300px;
  transition: color 0.35s, background-color 0.35s, border-color 0.35s;

  &:hover {
    background: var(--wp--preset--color--base);
    color: var(--wp--preset--color--primary);
  }
}

/* 確認画面のボタン */
.smf-action {
  @media screen and (max-width: 782px) {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--wp--preset--spacing--50);
  }
}
.smf-action .smf-button-control+.smf-button-control {
  @media screen and (max-width: 782px) {
    margin-left: 0;
  }
}

/* turnstile */
.snow-monkey-forms-turnstile>div {
	justify-content: center;
}

/* ====================================================================================
Block Styles
==================================================================================== */
/* core/template-part
-------------------------------------------------------------------- */
.wp-block-template-part.is-style-rm-margin-top {
  margin-top: 0 !important;
}

/* core/heading
-------------------------------------------------------------------- */
/* アンダーライン見出し */
.wp-block-heading.is-style-underline-heading {
  position: relative;
  border-bottom: 3px solid var(--wp--preset--color--gray);
  padding-bottom: var(--wp--preset--spacing--30);
  font-size: var(--wp--preset--font-size--xl-3) !important;

  &::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 10%;
    height: 3px;
    background-color: var(--wp--preset--color--primary);
  }
}

/* core/table
-------------------------------------------------------------------- */
/* プライマリーテーブル */
.wp-block-table.is-style-primary-table {
  border: 1px solid var(--wp--preset--color--gray);
  border-top: none;
  font-weight: bold;
  border-collapse: separate;
  overflow: hidden;
  border-spacing: 0;
  border-radius: 15px;

  & th,
  & td {
    vertical-align: middle;
    border-right: var(--wp--preset--color--gray);
    border-bottom: var(--wp--preset--color--gray);

    &:last-child {
      border-right: none;
    }
  }

  & thead {
    border-bottom: none;

    & th {
      background-color: var(--wp--preset--color--primary);
      color: var(--wp--preset--color--white);
      border-color: var(--wp--preset--color--gray);
      padding: 1em;
      border-bottom: 1px solid var(--wp--preset--color--gray);

      &:first-child {
        border-left: none;
      }

      &:last-child {
        border-right: none;
      }
    }
  }

  & tbody {
    & th {
      border-bottom: 1px solid var(--wp--preset--color--gray);
    }

    & td {
      padding: 1em;
      border-bottom: 1px solid var(--wp--preset--color--gray);
      border-left: 1px solid var(--wp--preset--color--gray);

      &:first-child {
        border-left: none;
      }
    }

    & tr:last-child th {
      border-bottom: none;
    }

    & tr:last-child td {
      border-bottom: none;
    }
  }
}

/* アンダーラインテーブル */
.wp-block-table.is-style-underline-table {
  & tr {
    & td {
      border-top: none;
      border-left: none;
      border-right: none;
      padding: 1.5em 1em;

      &:first-of-type {
        border-bottom: 2px solid var(--wp--preset--color--primary);
        width: 30%;
        font-weight: bold;
      }

      &:not(:first-of-type) {
        border-bottom: 2px solid var(--wp--preset--color--gray);
      }
    }
  }
}

/* core/paragraph
-------------------------------------------------------------------- */
/* パラグラフ line-height */
@media screen and (max-width: 782px) {
	p.is-style-sp-lh-2 {
		line-height: 2 !important;
	}
	p.is-style-sp-lh-195 {
		line-height: 1.95 !important;
	}
	p.is-style-sp-lh-19 {
		line-height: 1.9 !important;
	}
	p.is-style-sp-lh-185 {
		line-height: 1.85 !important;
	}
	p.is-style-sp-lh-18 {
		line-height: 1.8 !important;
	}
	p.is-style-sp-lh-175 {
		line-height: 1.75 !important;
	}
}
/* パラグラフ text-align */
@media screen and (max-width: 782px) {
	p.is-style-sp-align-left {
		text-align: left !important;
	}
	p.is-style-sp-align-right {
		text-align: right !important;
	}
	p.is-style-sp-align-center {
		text-align: center !important;
	}
}
