@charset "UTF-8";

/* ==========================================================
   お問い合わせフォーム（Contact Form 7）
   確認画面の切り替えは include_parts/common_formjs.php
   .input_area … 入力画面だけ表示 ／ .confirm_area … 確認画面だけ表示
   767px以下はデザイン幅414pxを基準に vw で指定
========================================================== */
.confirm_area {
  display: none;
}

.p-contact {
  padding: 96px 16px;
  scroll-margin-top: 80px; /* 他ページから /#contact で来たとき、固定ヘッダーに隠れないように */
}

.p-contact__title {
  margin-bottom: 42px;
  font-family: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.p-contact__form {
  max-width: 800px;
  margin: 0 auto;
}

/* 項目 */
.p-form__item {
  margin-bottom: 36px;
}

.p-form__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.467;
}

/* お問い合わせ内容はデザインでは「任意」（タグが小さい）。必須に変更してラベルが高くなった分、下の余白を詰めて以降の位置をデザインにそろえる */
.p-form__item:has(textarea) .p-form__label {
  margin-bottom: 7px;
}

.p-form__tag {
  padding: 2px 8px;
  color: #231815;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  background: #dcdddd;
}

.p-form__tag.is-required {
  padding: 3px 8px;
  color: #fff;
  font-weight: 500;
  background: #d7000f;
}

.p-form input[type="text"],
.p-form input[type="email"],
.p-form input[type="tel"],
.p-form textarea {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  border: 1px solid #999;
  border-radius: 0;
  color: #231815;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.p-form textarea {
  display: block;
  height: 180px;
  padding: 12px 24px;
  line-height: 1.75;
  resize: vertical;
}

.p-form input::placeholder {
  color: #b7b7b7;
}

.p-form textarea::placeholder {
  color: #999;
}

.p-form input:focus,
.p-form textarea:focus {
  outline: 2px solid #382c2f;
  outline-offset: -2px;
}

/* 確認画面の入力内容 */
.p-form__confirm {
  min-height: 1.75em;
  padding: 12px 0;
  border-bottom: 1px solid #dcdddd;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 入力エラー（common_formjs.php が表示を切り替え） */
.p-form__error {
  display: none;
  margin-top: 6px;
  color: #d7000f;
  font-size: 14px;
  line-height: 1.5;
}

.wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #d7000f;
  font-size: 14px;
}

/* 個人情報保護方針（本文は common_formjs.php が #priv > div に差し込む） */
.p-form__privacy {
  height: 240px;
  margin-bottom: 36px;
  padding: 40px 48px;
  overflow-y: auto;
  border: 1px solid #999;
  color: #232323;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 2;
  letter-spacing: .05em;
}

.p-form__privacy .priv-title {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 2;
  text-align: center;
}

.p-form__privacy .priv-ttl {
  margin-top: 1em;
  font-weight: 500;
}

/* 同意チェック */
.p-form__agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: normal;
}

/* CF7 がチェックボックスを包む span の行の高さで、行が広がらないようにする */
.p-form__agree .wpcf7-form-control-wrap,
.p-form__agree .wpcf7-form-control,
.p-form__agree .wpcf7-list-item {
  display: block;
  margin: 0;
}

.p-form__agree label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.p-form__agree input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px solid #999;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.p-form__agree input[type="checkbox"]:checked {
  background: #382c2f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M5 11.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 100% no-repeat;
  border-color: #382c2f;
}

/* ボタン */
.p-form__btns {
  margin-top: 44px;
}

/* 確認画面は jQuery の show() で display:block になるため、間隔は margin で取る */
.p-form__submit {
  position: relative;
  margin-bottom: 10px;
}

/* 送信ボタンは input 要素のため、矢印は外側の要素に付ける */
.p-form__submit::after,
.p-form__btn-arrow::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 38px;
  color: #fff;
  font-family: "EB Garamond", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.p-form__btn-arrow {
  position: relative;
}

/* 送信ボタンの後ろに CF7 の送信中アイコンが入り高さが変わるため、ボタンの高さの半分で固定 */
.p-form__submit::after {
  top: 34px;
}

.p-form__btn,
.p-form input[type="submit"].p-form__btn {
  display: block;
  width: 100%;
  height: 68px;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  background: #382c2f;
  cursor: pointer;
  transition: opacity .3s;
  -webkit-appearance: none;
  appearance: none;
}

.p-form__btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.p-form__back {
  display: block;
  width: fit-content;
  height: 68px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: #231815;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
  background: none;
  cursor: pointer;
}

/* 「← 入力画面に戻る」の矢印（デザインは EB Garamond SemiBold） */
.p-form__back-arrow {
  font-family: "EB Garamond", serif;
  font-weight: 600;
}

@media (any-hover: hover) {
  .p-form__btn:not(:disabled):hover,
  .p-form__back:hover {
    opacity: .7;
  }
}

/* 送信後の CF7 メッセージ */
.p-form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 12px 16px;
  font-size: 14px;
}

.p-form .wpcf7-spinner {
  display: block;
  margin: 10px auto 0;
}

@media (max-width: 767px) {
  .p-contact {
    padding: 11.594vw 3.865vw;
    scroll-margin-top: 13.527vw;
  }

  .p-contact__title {
    margin-bottom: 7.246vw;
    font-size: 4.831vw;
    line-height: 1.6;
    letter-spacing: .02em;
  }

  .p-form__item {
    margin-bottom: 6.763vw;
  }

  .p-form__label {
    gap: 2.415vw;
    margin-bottom: 1.932vw;
    font-size: 3.382vw;
    font-weight: 600;
  }

  .p-form__item:has(textarea) .p-form__label {
    margin-bottom: 1.208vw;
  }

  .p-form__tag {
    padding: .362vw 1.932vw;
    font-size: 2.899vw;
  }

  .p-form__tag.is-required {
    padding: .725vw 1.932vw;
  }

  .p-form input[type="text"],
  .p-form input[type="email"],
  .p-form input[type="tel"],
  .p-form textarea {
    height: 11.594vw;
    padding: 0 2.899vw;
    font-size: max(16px, 3.382vw);
  }

  /* プレースホルダーはデザインどおり14px相当（最小12px）。iPhoneの拡大は入力文字のサイズで判定されるため影響しない */
  .p-form input::placeholder,
  .p-form textarea::placeholder {
    font-size: max(12px, 3.382vw);
  }

  /* iPhone は入力欄の文字が16px未満だとタップ時に画面を拡大するため、入力文字は最小16px（デザインは14px相当） */
  .p-form textarea {
    height: 36.232vw;
    padding: 2.899vw;
    letter-spacing: .02em;
  }

  .p-form__confirm {
    padding: 2.899vw 0;
    font-size: 3.865vw;
  }

  .p-form__error,
  .wpcf7-not-valid-tip {
    font-size: 3.382vw;
  }

  .p-form__privacy {
    height: 57.971vw;
    margin-bottom: 6.763vw;
    padding: 7.246vw 4.831vw;
    font-size: 3.382vw;
  }

  .p-form__privacy .priv-title {
    font-size: 3.865vw;
  }

  .p-form__agree {
    align-items: flex-start;
    gap: 2.415vw;
    font-size: 3.382vw;
    line-height: 1.607;
  }

  .p-form__agree label {
    gap: 2.415vw;
  }

  .p-form__agree input[type="checkbox"] {
    width: 5.314vw;
    height: 5.314vw;
  }

  .p-form__btns {
    margin-top: 8.213vw;
  }

  .p-form__submit {
    margin-bottom: 4.831vw;
  }

  .p-form__submit::after {
    top: 7.246vw;
  }

  .p-form__submit::after,
  .p-form__btn-arrow::after {
    right: 7.246vw;
    font-size: 4.831vw;
  }

  .p-form__btn,
  .p-form input[type="submit"].p-form__btn {
    height: 14.493vw;
    font-size: 3.865vw;
  }

  .p-form__back {
    height: 14.493vw;
    font-size: 3.865vw;
    text-underline-offset: 1.449vw;
  }
}
