/* ===== フォームセクション外枠 ===== */
.contact-form-section { background: #fff; padding: 72px 0 100px; }
.contact-form-section__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* ===== ステップインジケーター ===== */
.contact-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #005eb8;
  gap: 0;
  margin-bottom: 48px;
}
.contact-steps__item { display: flex; align-items: center; gap: 10px; padding: 18px 32px; }
.contact-steps__num { font-family: "montserrat", sans-serif; font-size: 18px; font-weight: 700; color: #fff; line-height: 1; }
.contact-steps__label { font-size: 18px; font-weight: 400; color: #fff; line-height: 1; }
.contact-steps__item--active .contact-steps__num,
.contact-steps__item--active .contact-steps__label { color: #31caff; }
.contact-steps__arrow { font-size: 16px; color: #fff; padding: 0 8px; }

/* ===== リード文 ===== */
.contact-form-section__lead { font-size: 18px; line-height: 1.8; color: #000; text-align: center; margin-bottom: 48px; }

/* ===== フォーム全体 ===== */
.contact-form { border-top: 2px solid #005eb8; }
.contact-form__row { display: flex; align-items: flex-start; border-bottom: 1px solid #999; min-height: 80px; }
.contact-form__label-wrap { display: flex; align-items: center; gap: 12px; width: 280px; flex-shrink: 0; padding: 24px 20px 24px 0; }
.contact-form__label { font-size: 20px; font-weight: 400; color: #231815; line-height: 1.4; cursor: default; width: 184px; flex-shrink: 0; text-align: justify; text-align-last: justify; }
.contact-form__badge { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 400; padding: 3px 10px; border-radius: 2px; flex-shrink: 0; line-height: 1.4; }
.contact-form__badge--required { background: #005eb8; color: #fff; border-radius: 999px; font-size: 16px; padding: 5px 16px; }
.contact-form__badge--optional { background: #f2f2f2; color: #666; }
.contact-form__badge--spacer { visibility: hidden; background: transparent; }
.contact-form__field { flex: 1; padding: 20px 0 20px 28px; display: flex; align-items: center; }
.contact-form__input {
  width: 100%;
  background: #f2f2f2;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  transition: background 0.2s, box-shadow 0.2s;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.contact-form__input--half { max-width: 300px; }
.contact-form__input::placeholder { color: #999; }
.contact-form__input:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }
.contact-form__textarea {
  width: 100%;
  background: #f2f2f2;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  resize: vertical;
  line-height: 1.7;
  transition: background 0.2s, box-shadow 0.2s;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.contact-form__textarea::placeholder { color: #999; }
.contact-form__textarea:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }
.contact-form__row:has(.contact-form__textarea) .contact-form__field { align-items: flex-start; }
.contact-form__select-wrap { position: relative; max-width: 300px; width: 100%; }
.contact-form__select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #005eb8;
  pointer-events: none;
}
.contact-form__select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  background: #f2f2f2;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border-radius: 0;
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.contact-form__select:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }
.contact-form__radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.contact-form__radio-label { display: flex; align-items: center; gap: 12px; cursor: pointer; border: 1px solid #c7c7c7; background: #f2f2f2; padding: 14px 20px; transition: border-color 0.2s, background 0.2s; }
.contact-form__radio-label:has(.contact-form__radio:checked) { border-color: #005eb8; background: #fff; }
.contact-form__radio { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 2px solid #999; border-radius: 50%; flex-shrink: 0; cursor: pointer; position: relative; transition: border-color 0.2s; }
.contact-form__radio:checked { border-color: #005eb8; }
.contact-form__radio:checked::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; background: #005eb8; }
.contact-form__radio-text { font-size: 18px; color: #231815; }

/* ===== 個人情報の取扱い ===== */
.contact-form__privacy { margin-top: 48px; text-align: center; }
.contact-form__privacy-title { font-size: 20px; font-weight: 700; color: #231815; margin-bottom: 20px; }
.contact-form__privacy-body { font-size: 16px; line-height: 1.8; color: #999; margin-bottom: 24px; }
.contact-form__privacy-link { color: #005eb8; text-decoration: underline; }
.contact-form__privacy-link:hover { opacity: 0.75; }
.contact-form__agree-wrap { display: inline-flex; align-items: center; gap: 16px; justify-content: center; }
.contact-form__agree-label { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.contact-form__checkbox { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 2px solid #999; flex-shrink: 0; cursor: pointer; position: relative; transition: border-color 0.2s, background 0.2s; border-radius: 2px; }
.contact-form__checkbox:checked { background: #005eb8; border-color: #005eb8; }
.contact-form__checkbox:checked::after { content: ''; position: absolute; top: 3px; left: 6px; width: 7px; height: 12px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.contact-form__agree-text { font-size: 18px; color: #231815; }

/* 入力ページでは confirm-btns を非表示 */
.mwform-wrap .mw_wp_form_input .confirm-btns { display: none; }

/* ===== 送信ボタン ===== */
.contact-form__submit-wrap { display: flex; justify-content: center; margin-top: 48px; }
.contact-form__submit {
  display: inline-block;
  background: #005eb8;
  color: #fff !important;
  font-size: 20px;
  font-weight: 400;
  font-family: "noto-sans-cjk-jp", sans-serif;
  border: none;
  cursor: pointer;
  padding: 20px 80px;
  min-width: 280px;
  transition: opacity 0.2s, transform 0.2s;
  border-radius: 0;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.contact-form__submit:hover { opacity: 0.85; transform: translateY(-2px); }
.contact-form__submit:disabled { opacity: 0.5; cursor: default; transform: none; }

/* ===== MW WP Form 上書きスタイル ===== */

/* フォーム全体リセット */
.mwform-wrap .mw_wp_form p { margin: 0; }
.mwform-wrap .mw_wp_form br { display: none; }
.mwform-wrap .contact-form__label br { display: inline; }
.mwform-wrap .contact-form__agree-wrap br { display: none; }

/* テキスト・メール入力 */
.mwform-wrap input[type="text"],
.mwform-wrap input[type="email"],
.mwform-wrap input[type="tel"] {
  width: 100%;
  background: #f2f2f2;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.mwform-wrap input[type="text"]:focus,
.mwform-wrap input[type="email"]:focus,
.mwform-wrap input[type="tel"]:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }

/* テキストエリア */
.mwform-wrap textarea {
  width: 100%;
  background: #f2f2f2;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  resize: vertical;
  line-height: 1.7;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.mwform-wrap textarea:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }
.mwform-wrap .contact-form__field:has(textarea) { align-items: flex-start; }

/* セレクト */
.mwform-wrap select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: 16px;
  font-family: "noto-sans-cjk-jp", sans-serif;
  color: #333;
  background: #f2f2f2;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border-radius: 0;
  outline: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.mwform-wrap select:focus { background: #fff; box-shadow: inset 0 0 0 2px #005eb8; }

/* 電話番号（3分割）*/
.mwform-wrap .mwform-tel-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.mwform-wrap .mwform-tel-field input[type="text"] {
  width: auto;
  flex: 1;
}

/* ラジオボタン */
.mwform-wrap .mwform-radio-field { display: contents; }
.mwform-wrap .mwform-radio-field label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid #c7c7c7;
  background: #f2f2f2;
  padding: 14px 20px;
  transition: border-color 0.2s, background 0.2s;
}
.mwform-wrap .mwform-radio-field label:has(input:checked) { border-color: #005eb8; background: #fff; }
.mwform-wrap .mwform-radio-field input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #999;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
}
.mwform-wrap .mwform-radio-field input[type="radio"]:checked { border-color: #005eb8; }
.mwform-wrap .mwform-radio-field input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #005eb8;
}
.mwform-wrap .mwform-radio-field-text { font-size: 18px; color: #231815; }

/* チェックボックス */
.mwform-wrap .mwform-checkbox-field { display: contents; }
.mwform-wrap .mwform-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.mwform-wrap .mwform-checkbox-field input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #999;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 2px;
}
.mwform-wrap .mwform-checkbox-field input[type="checkbox"]:checked { background: #005eb8; border-color: #005eb8; }
.mwform-wrap .mwform-checkbox-field input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 7px; height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.mwform-wrap .mwform-checkbox-field-text { font-size: 18px; color: #231815; }

/* 送信ボタン（input / button 両対応） */
.mwform-wrap input[type="submit"],
.mwform-wrap button[type="submit"] {
  display: inline-block;
  background: #005eb8;
  color: #fff !important;
  font-size: 20px;
  font-weight: 400;
  font-family: "noto-sans-cjk-jp", sans-serif;
  border: none;
  cursor: pointer;
  padding: 20px 80px;
  min-width: 280px;
  transition: opacity 0.2s, transform 0.2s;
  border-radius: 0;
  letter-spacing: 0.1em;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  line-height: 1.4;
  vertical-align: middle;
  box-sizing: border-box;
}
.mwform-wrap input[type="submit"]:hover,
.mwform-wrap button[type="submit"]:hover { opacity: 0.85; transform: translateY(-2px); }

/* 入力ページの確認するボタン（bconfirm）を中央揃え */
.mwform-wrap .mw_wp_form_input button[type="submit"] {
  display: block;
  margin: 48px auto 0;
  width: fit-content;
}

/* element_content 未設定時のフォールバックテキスト */
.mwform-wrap .mw_wp_form_input button[type="submit"]:empty::after {
  content: '確認する';
}

/* エラーメッセージ */
.mwform-wrap .error {
  display: block;
  font-size: 13px;
  color: #d32f2f;
  margin-top: 6px;
  white-space: nowrap;
}
.mwform-wrap input.error,
.mwform-wrap textarea.error,
.mwform-wrap select.error {
  box-shadow: inset 0 0 0 2px #d32f2f !important;
  background: #fff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .contact-form__label-wrap { width: 220px; }
}
@media (max-width: 767px) {
  .contact-form-section { padding: 48px 0 72px; }
  .contact-form-section__inner { padding: 0 24px; }
  .contact-steps { gap: 0; margin-bottom: 32px; }
  .contact-steps__item { flex-direction: column; gap: 4px; padding: 14px 16px; text-align: center; }
  .contact-steps__num { font-size: 15px; }
  .contact-steps__label { font-size: 13px; }
  .contact-steps__arrow { font-size: 14px; padding: 0 4px; }
  .contact-form-section__lead { font-size: 16px; margin-bottom: 32px; }
  .contact-form__row { flex-direction: column; min-height: auto; }
  .contact-form__label-wrap { width: 100%; padding: 18px 0 10px; gap: 10px; }
  .contact-form__label { font-size: 17px; width: auto; text-align: left; text-align-last: left; }
  .contact-form__field { padding: 0 0 18px 0; width: 100%; }
  .contact-form__input--half { max-width: 100%; }
  .contact-form__select-wrap { max-width: 100%; }
  .contact-form__radio-text { font-size: 16px; }
  .contact-form__radios { grid-template-columns: 1fr; gap: 8px; }
  .contact-form__radio-label { padding: 12px 14px; }
  .contact-form__privacy { margin-top: 32px; }
  .contact-form__privacy-title { font-size: 18px; }
  .contact-form__agree-text { font-size: 16px; }
  .contact-form__agree-wrap { flex-direction: column; align-items: center; gap: 12px; }
  .contact-form__submit { font-size: 18px; padding: 18px 48px; min-width: 220px; width: 100%; }
  .contact-form__submit-wrap { margin-top: 36px; }
}
@media (max-width: 640px) {
  .contact-form-section__inner { padding: 0 16px; }
  .contact-steps__item { padding: 12px 10px; }
  .contact-steps__num { font-size: 13px; }
  .contact-steps__label { font-size: 11px; }
  .contact-steps__arrow { display: none; }
  .contact-form__label br { display: none; }
}
