/* 全フォームを覆う要素 */
.container {
  background: unset;
  margin: unset;
  max-width: unset;
  padding: 0;
  border: 0;
}

/* エラーメッセージ領域 */
.message-block-error {
  padding: 24px;
  margin-bottom: 40px;
  border: 0;
  border-radius: 4px;
  color: #ff0000;
  background-color: #ffefef;
  font-size: 1.3rem;
  line-height: 1.5;
}

.message-block-error ul {
  margin-top: 16px;
}

.message-block-error strong {
  font-weight: 400;
}

.message-block-error a {
  color: #ff0000;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .message-block-error a strong {
    padding-bottom: 1px;
    background-image: linear-gradient(#ff0000, #ff0000);
    background-repeat: no-repeat;
    background-position: right bottom 0.1em;
    background-size: 0 1px;
    transition: background-size 0.4s cubic-bezier(0.13, 0.78, 0.38, 0.98);
  }

  .message-block-error a:hover strong {
    background-position: left bottom 0.1em;
    background-size: 100% 1px;
  }
}

/* チェックボックス・ラジオボタンのテキスト部分 */
legend.label {
  padding: 0;
}

fieldset {
  border: unset;
  padding: 0;
  margin: 0;
}

.option-text {
  font-size: 1.5rem;
  line-height: 1.6;
}

/* 「必須」のデザイン */
.label .badge-required,
legend .badge-required {
  width: auto;
  font-weight: 400;
  display: inline-block;
  margin-left: 8px;
  padding: 4px 6px;
  line-height: 1;
  font-size: 1.3rem;
  color: #fff;
  background-color: #ff0000;
  border-radius: 4px;
}

/* 入力フォーム全体 */
.form-column {
  margin-bottom: 16px;
}

/* 各項目のタイトル */
.label {
  font-size: 1.5rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ファイル選択の「（最大3MB）」の部分 */
.restriction-max-file-size {
  margin-left: 0;
}

/* 生年月日入力欄の「/」の部分 */
.separator-date {
  margin-inline: 8px;
}

/* フォーム設定画面の各項目にある「補足説明文」の部分 */
.description-block {
  font-size: 1.2rem;
  line-height: 1.4;
  color: #000;
  margin-top: 16px;
}

/* 「見出し」項目のデザイン */
.form-column-heading h2 {
  margin-block-start: calc(80px + calc((1em - 1lh) / 2));
  margin-block-end: calc(32px + calc((1em - 1lh) / 2));
  font-size: 2.5rem;
  line-height: 1.4;
}

/* 最初に見出しを置いたら正常にiframeの高さを設定できなくなるので、最初だけ上margin削除 */
.form-page .form-column-heading.form-column:first-child h2 {
  margin-block-start: 0;
}

/* チェックボックスのデザイン */
.form-column-checkbox .input-group {
  display: inline-grid;
  row-gap: 16px;
}

.form-column-checkbox .input-group label {
  cursor: pointer;
  display: grid;
  align-items: center;
  grid-template-columns: max-content auto;
  column-gap: 8px;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 24px;
  height: 24px;
  border: 1px solid #bbb6a2;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  outline: none;
}

input[type="checkbox"]:checked {
  background-color: #bbb6a2;
  border-color: #bbb6a2;
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 7px;
  width: 8px;
  height: 13px;
  border: 1px solid #fff;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

/* ラジオボタンのデザイン */
.form-column-radio .input-group {
  display: grid;
  row-gap: 16px;
}

.form-column-radio .input-group label {
  cursor: pointer;
  display: grid;
  align-items: center;
  grid-template-columns: max-content auto;
  column-gap: 8px;
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 24px;
  height: 24px;
  border: 1px solid #bbb6a2;
  border-radius: 100vmax;
  display: inline-block;
  position: relative;
  cursor: pointer;
  outline: none;
}

input[type="radio"]:checked {
  background-color: #fff;
  border-color: #bbb6a2;
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: #ff0000;
  border-radius: 100vmax;
  transform: translate(-50%, -50%);
}

/* テキストボックスのデザイン */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea {
  border: 1px solid #bbb6a2;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.5rem;
  line-height: 1.6;
  max-width: 100%;
  width: 100%;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #d2d1d0;
}

textarea {
  height: 220px;
}

.form-column-zip-code-jp .input-group input:last-child {
  width: 176px;
}

/* セレクトボックスのデザイン */
select {
  width: 100%;
  padding: 8px 16px;
  font-size: 1.5rem;
  line-height: 1.6;
  border: 1px solid #bbb6a2;
  border-radius: 8px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}


/* select の矢印を標準のものは隠して、svg を表示 */
.form-column[data-column-id="482b00e5-7bcd-4961-8bfc-ca5b6b17da8d"] select,
.form-column[data-column-id="16128d6a-395f-456d-aa51-fc6bdbc49789"] select {
  padding-right: 44px;
  background-image: url("https://www.towarise.jp/assets/img/share/icon-select_arrow.svg");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 15px 15px;
}
/* カレンダーの日付選択ボタンのスタイル */
.form-column-calendar .input-group {
  display: grid;
  grid-template-columns: 1fr max-content;
}

.input-group a.datepicker-button {
  padding: 8px 20px;
  font-size: 1.5rem;
  line-height: 1.6;
  border: 1px solid #bbb6a2;
  border-radius: 58px;
  cursor: pointer;
  color: #000;
  transition: background-color 0.3s cubic-bezier(0.13, 0.78, 0.38, 0.98),
    color 0.3s cubic-bezier(0.13, 0.78, 0.38, 0.98);
}

.input-group a.datepicker-button:focus,
.input-group a.datepicker-button:hover {
  background-color: #ff0000;
  border-color: #ff0000;
  color: #fff;
  text-decoration: none;
}

/* 確認ボタンのスタイル */
.button-group {
  display: grid;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 5px;
}

.button-group .button {
  margin-right: 0;
}

.content-confirmation .button-group {
  grid-template-columns: auto;
  grid-template-rows: repeat(3, max-content);
  column-gap: 10px;
  row-gap: 18px;
  justify-content: center;
}

.content-confirmation .button-back {
  grid-area: auto;
}

.content-confirmation .button-submit {
  grid-area: auto;
}

.content-confirmation .help-block {
  font-size: 1.2rem;
  line-height: 1.4;
  color: #000;
  grid-area: auto;
  text-align: center;
  position: relative;
  padding-left: 1em;
}

.content-confirmation .help-block::before {
  position: absolute;
  content: "※";
  left: 18px;
}

.button-back,
.button-submit,
.button-confirm {
  width: 265px;
  margin-inline: auto;
  padding-block: 21px;
  font-size: 1.5rem;
  line-height: 1.6;
  font-weight: 700;
  border: 1px solid #ff0000;
  border-radius: 58px;
  cursor: pointer;
  color: #000;
  transition: background-color 0.3s cubic-bezier(0.13, 0.78, 0.38, 0.98),
    color 0.3s cubic-bezier(0.13, 0.78, 0.38, 0.98);
}

.button-back:hover,
.button-submit:hover,
.button-confirm:hover {
  background-color: #ff0000;
  color: #fff;
  text-decoration: none;
}

.button-back {
  border: 1px solid #bbb6a2;
}

.button-back:hover {
  background-color: #bbb6a2;
}

.content-confirmation .button-submit .icon-lock {
  display: none;
}

/* recaptchaのスタイル */
.form-column-recaptcha {
  display: grid;
  justify-content: center;
}

/* テキスト表示エリアのスタイル */
.form-column-note .description-block-caution {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.6;
  font-weight: 700;
}

/* 罫線のスタイル */
.form-column-note .description-block-hr {
  position: relative;
  padding-block: 16px;
}

.form-column-note .description-block-hr::before {
  content: "";
  position: absolute;
  width: 100%;
  border-bottom: 1px solid #bbb6a2;
}

.form-column-note .description-block-hr-dummy {
  /* テキストが入ってないとCMS上でHTMLを登録できないため入れてる */
  display: none;
}

.form-column-note .description-block-hr-text {
  position: absolute;
  left: 0;
  font-size: 1.5rem;
  line-height: 1.7;
  font-weight: 700;
  color: #6e6e6e;
  background: #fff;
  top: 0;
  padding-right: 8px;
  padding-top: 3px;
}

@media (min-width: 776px) {
  .message-block-error {
    padding: 40px;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1.8;
  }

  .message-block-error ul {
    margin-top: 20px;
  }

  .label .badge-required,
  legend .badge-required {
    font-size: 1.4rem;
  }

  .form-column {
    margin-bottom: 24px;
  }

  .option-text {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  .label {
    font-size: 1.6rem;
    line-height: 1.9;
    margin-bottom: 8px;
  }

  .form-column-heading h2 {
    margin-block-start: calc(100px + calc((1em - 1lh) / 2));
    font-size: 3.4rem;
  }

  .form-column:first-child .form-column-heading h2 {
    margin-block-start: 0;
  }

  /* テキストボックスのデザイン */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  textarea {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  .form-column-calendar input[type="text"] {
    max-width: 80%;
    width: 375px;
  }

  input[type="text"]::placeholder,
  input[type="email"]::placeholder,
  input[type="tel"]::placeholder,
  input[type="url"]::placeholder,
  textarea::placeholder {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  /* セレクトボックスのデザイン */
  select {
    width: 375px;
    font-size: 1.6rem;
    line-height: 1.9;
  }

  /* カレンダーの日付選択ボタンのスタイル */
  .form-column-calendar .input-group {
    display: block;
  }

  .input-group a.datepicker-button {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  /* 確認ボタンのスタイル */
  .button-confirm {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  /* テキスト表示エリアのスタイル */
  .form-column-note .description-block-caution {
    font-size: 1.6rem;
    line-height: 1.9;
  }

  /* 確認ボタンのスタイル */
  .content-confirmation .button-group {
    grid-template-columns: repeat(2, max-content);
    grid-template-rows: repeat(2, max-content);
  }

  .content-confirmation .button-back {
    grid-area: 1 / 1 / 2 / 2;
  }

  .content-confirmation .button-submit {
    grid-area: 1 / 2 / 2 / 3;
  }

  .content-confirmation .help-block {
    grid-area: 2 / 2 / 3 / 3;
    text-align: left;
  }

  .content-confirmation .button-group {
    column-gap: 22px;
  }

  .content-confirmation .help-block::before {
    left: 0;
  }

  .form-column-note .description-block-hr-text {
    font-size: 1.6rem;
    line-height: 1.9;
    padding-top: 0;
  }

}


/* 箇条書き */
.text-list__text {
  font-size: 1.5rem;
  line-height: 1.7;
}

.text-list__text { margin: 0; position: relative; padding-left: 14px; }
.text-list__text::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 4px;
  margin-inline: auto;
  margin-top: 1.3rem;
  background: #000;
  border-radius: 50%;
}

/* テキストリンクの img */
.text-link-inline__icon {
  margin-bottom: 4px;
}

/* ラベルにリンクを設定するために、「テキスト表示エリア」と組み合わせる */
.form-column-e189356e-2f7c-4caf-ad8c-5fe32aa0dd84 legend.label {
  display: none;
}

p.label a.text-link-inline {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* メッセージ表示 */
#message-container {
  .message-block-confirmation {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 0;
  }

  /* 文言置換 */
  .message-block-confirmation::after {
    content: "入力内容に間違いがないかご確認ください。";
    color: #000;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.7;
  }

  @media (min-width: 776px) {
    .message-block-confirmation {
      margin-bottom: 7rem;
    }

    .message-block-confirmation::after {
      font-size: 2rem;
      line-height: 1.8;
    }
  }
}

/* 入力フォーム */
#form-container {
  /*  文字形式を必須バッジの直前に挿入 */
  .form-column[data-column-id="3ad19874-2055-4c1c-ae58-d54ecad6c746"] label .badge-required,
  .form-column[data-column-id="ebd1ac64-a422-418c-85c3-61b8146d357e"] label .badge-required,
  .form-column[data-column-id="faf89ce0-0c6b-414c-b6cf-ad4623eac7a1"] label .badge-required,
  .form-column[data-column-id="8f6770c8-a8c5-40a8-9fe1-51b892636397"] label .badge-required {
    display: inline-flex;
    align-items: center;
    background: transparent;
    padding: 0;
    font-size: 0;
  }

  .form-column[data-column-id="3ad19874-2055-4c1c-ae58-d54ecad6c746"] label .badge-required::before,
  .form-column[data-column-id="ebd1ac64-a422-418c-85c3-61b8146d357e"] label .badge-required::before {
    content: "全角";
    color: #6e6e6e;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.9;
    margin-left: 8px;
    margin-right: 8px;
  }

  .form-column[data-column-id="faf89ce0-0c6b-414c-b6cf-ad4623eac7a1"] label .badge-required::before {
    content: "半角数字・ハイフンなし";
    color: #6e6e6e;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.9;
    margin-left: 8px;
    margin-right: 8px;
  }

  .form-column[data-column-id="8f6770c8-a8c5-40a8-9fe1-51b892636397"] label .badge-required::before {
    content: "半角英数字";
    color: #6e6e6e;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.9;
    margin-left: 8px;
    margin-right: 8px;
  }

  .form-column[data-column-id="3ad19874-2055-4c1c-ae58-d54ecad6c746"] label .badge-required::after,
  .form-column[data-column-id="ebd1ac64-a422-418c-85c3-61b8146d357e"] label .badge-required::after,
  .form-column[data-column-id="faf89ce0-0c6b-414c-b6cf-ad4623eac7a1"] label .badge-required::after,
  .form-column[data-column-id="8f6770c8-a8c5-40a8-9fe1-51b892636397"] label .badge-required::after {
    content: "必須";
    width: auto;
    font-weight: 400;
    display: inline-block;
    margin-left: 8px;
    padding: 4px 6px;
    line-height: 1;
    font-size: 1.3rem;
    color: #fff;
    background-color: #ff0000;
    border-radius: 4px;
  }

  /* テキスト表示エリアをスクロールボックス化 */
  .form-column[data-column-id="0cd549d2-7968-4033-8f33-321d1a2c43bb"] {
    display: grid;
    border: 1px solid #d2d1d0;
    border-radius: 8px;
    background: #fff;
    padding: 24px 4px 24px 16px;
    height: 326px;
    overflow-y: scroll;
    line-height: 1.6;
    box-sizing: border-box;
  }

  .scroll-area__frame-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
  }

  .scroll-area__frame-content {
    font-size: 1.3rem;
    line-height: 1.5;
  }

  /* 同意チェックの中央寄せ */
  .form-column-checkbox[data-column-id="e189356e-2f7c-4caf-ad8c-5fe32aa0dd84"] .input-group {
    display: flex;
    justify-content: center;
  }

  @media (min-width: 776px) {
    .form-column[data-column-id="3ad19874-2055-4c1c-ae58-d54ecad6c746"] label .badge-required::before,
    .form-column[data-column-id="ebd1ac64-a422-418c-85c3-61b8146d357e"] label .badge-required::before,
    .form-column[data-column-id="faf89ce0-0c6b-414c-b6cf-ad4623eac7a1"] label .badge-required::before,
    .form-column[data-column-id="8f6770c8-a8c5-40a8-9fe1-51b892636397"] label .badge-required::before,
    .form-column[data-column-id="d9610a00-2daa-4c80-8c44-43583a6837ba"] label::after {
      font-size: 1.6rem;
    }

    .form-column[data-column-id="3ad19874-2055-4c1c-ae58-d54ecad6c746"] label .badge-required::after,
    .form-column[data-column-id="ebd1ac64-a422-418c-85c3-61b8146d357e"] label .badge-required::after,
    .form-column[data-column-id="faf89ce0-0c6b-414c-b6cf-ad4623eac7a1"] label .badge-required::after,
    .form-column[data-column-id="8f6770c8-a8c5-40a8-9fe1-51b892636397"] label .badge-required::after {
      font-size: 1.4rem;
    }

    .form-column[data-column-id="0cd549d2-7968-4033-8f33-321d1a2c43bb"] {
      padding: 24px 30px 24px 40px;
      height: 336px;
    }
    
    .scroll-area__frame-title {
      font-size: 1.6rem;
      line-height: 1.9;
    }

    .scroll-area__frame-content {
      font-size: 1.6rem;
      line-height: 1.8;
    }

    .text-list__text {
      font-size: 1.6rem;
      line-height: 1.8;
    }

    .form-column[data-column-id="d9610a00-2daa-4c80-8c44-43583a6837ba"] label::after {
      content: "お問い合わせ日の翌日以降（土日祝日、年末年始は除く）の日付を選択してください";
      color: #ff0000;
      font-weight: 400;
      font-size: 1.5rem;
      line-height: 1.9;
      margin-left: 16px;
    }
  }

  @media (max-width: 775px) {
    #d9610a00-2daa-4c80-8c44-43583a6837ba-label::after {
      content: "お問い合わせ日の翌日以降（土日祝日、年末年始は除く）の日付を選択してください";
      color: #ff0000;
      font-weight: 400;
      font-size: 1.5rem;
      display: block;
      margin-top: 8px;
      margin-bottom: 8px;
    }
  }
}

/* 内容確認 */
#confirmation-container {
  /* コンテナ上下のみ枠線（左右なし） */
  border-top: 1px solid #d2d1d0;

  .form-column {
    grid-template-columns: 1fr;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    padding: 1rem;
  }

  .form-column:first-child { border-top: none; }
  .form-column:last-child { border-bottom: none; }

  .label {
    margin-bottom: 0;
    font-weight: 600;
  }

  .input-group,
  .preview-block {
    font-size: 1.5rem;
    justify-self: start;
    padding: 0;
  }

  .preview-block {
    margin-top: 1rem;
  }

  @media (min-width: 776px) {
    .form-column {
      display: grid;
      grid-template-columns: 1fr 2fr;
      align-items: center;
      padding: 2rem 0;
    }

    .form-column fieldset {
      display: contents;
    }

    .label {
      display: flex;
      align-items: center;
      font-size: 1.4rem;
      height: 100%;
    }

    .preview-block {
      font-size: 1.6rem;
      line-height: 1.8;
      margin-top: 0;
    }
  }

  /* 非表示要素 */
  .badge-required,
  .form-column-0cd549d2-7968-4033-8f33-321d1a2c43bb,
  .form-column-539afe2c-0b5b-4d4f-bc9f-b7c01c77ba46,
  .form-column-e189356e-2f7c-4caf-ad8c-5fe32aa0dd84 {
    display: none;
  }

}
