@charset "utf-8";
/* =========================================================================
   Contact Form 7 テストページ専用CSS
   対象 : page-contact_cf7.php（.form_area_01.form_cf7_01 配下のみ）
   目的 : MW WP Form 版（style.css の .mwform-* 系）と同じ見た目にするため、
          CF7が出力するクラス（.wpcf7-*）へ読み替える。
   注意 : テスト中は style.scss / style.css に統合しない。
          （CF7版を採用しない場合はこのファイルとfunctions.phpの読み込み
            ブロックを削除するだけで元に戻せます）
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. CF7標準マークアップの調整
   ------------------------------------------------------------------------- */
/* CF7は各フォーム部品を <span class="wpcf7-form-control-wrap"> で囲むため
   ブロック化しておかないと input の width:100% が効きづらい */
.form_area_01.form_cf7_01 .wpcf7-form-control-wrap {
  display: block;
}

/* 自動整形（wpcf7_autop）で <p> が入った場合の保険 */
.form_area_01.form_cf7_01 .wpcf7-form p {
  margin: 0;
}

/* -------------------------------------------------------------------------
   2. ラジオボタン / チェックボックス
      MW  : <label><input class="radio_btn_01"><span class="mwform-radio-field-text">
      CF7 : <span class="wpcf7-list-item"><label><input><span class="wpcf7-list-item-label">
      ※CF7の class: オプションは input ではなく外側のspanに付くため、
        input側は属性セレクタで指定する
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .wpcf7-list-item {
  display: inline-block;
  margin: 8px 14px 20px 0;
}

.form_area_01.form_cf7_01 .wpcf7-list-item.first {
  margin-left: 0;
}

.form_area_01.form_cf7_01 .wpcf7-list-item-label {
  display: inline-block;
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: #707070;
}

.form_area_01.form_cf7_01 .wpcf7-list-item-label::before {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  left: 0;
  width: 14px;
  height: 14px;
  border: 1px solid #707070;
  background: #ffffff;
  border-radius: 50%;
}

.form_area_01.form_cf7_01 input[type="radio"]:checked + .wpcf7-list-item-label::after,
.form_area_01.form_cf7_01 input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  content: "";
  display: block;
  position: absolute;
  top: 1px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: #9A8A66;
  border-radius: 50%;
}

/* キーボード操作時のフォーカスが分かるように（MW版にはない改善） */
.form_area_01.form_cf7_01 input[type="radio"]:focus-visible + .wpcf7-list-item-label::before,
.form_area_01.form_cf7_01 input[type="checkbox"]:focus-visible + .wpcf7-list-item-label::before {
  outline: 2px solid #9A8A66;
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   3. 送信ボタン / 送信中スピナー
      .form_btn_wrap（position:relative）は style.css 側で定義済み
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .wpcf7-spinner {
  position: absolute;
  top: 50%;
  right: 12px;
  margin: 0;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  z-index: 2;
}

.form_area_01.form_cf7_01 input.send_btn_01:disabled {
  opacity: 0.5;
  cursor: default;
}

.form_area_01.form_cf7_01 .wpcf7-form.submitting input.send_btn_01 {
  opacity: 0.6;
}

/* -------------------------------------------------------------------------
   4. エラー表示 / 送信結果メッセージ
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #FF1414;
}

.form_area_01.form_cf7_01 input.wpcf7-not-valid,
.form_area_01.form_cf7_01 textarea.wpcf7-not-valid {
  background: #FBE9E9;
}

.form_area_01.form_cf7_01 .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 12px 14px;
  border: 1px solid #9A8A66;
  font-size: 13px;
  line-height: 1.8;
  color: #707070;
}

.form_area_01.form_cf7_01 .wpcf7-form.invalid .wpcf7-response-output,
.form_area_01.form_cf7_01 .wpcf7-form.unaccepted .wpcf7-response-output,
.form_area_01.form_cf7_01 .wpcf7-form.payment-required .wpcf7-response-output,
.form_area_01.form_cf7_01 .wpcf7-form.failed .wpcf7-response-output,
.form_area_01.form_cf7_01 .wpcf7-form.aborted .wpcf7-response-output,
.form_area_01.form_cf7_01 .wpcf7-form.spam .wpcf7-response-output {
  border-color: #FF1414;
  color: #FF1414;
}

/* 送信完了メッセージ（サンクスページへ遷移させない場合） */
.form_area_01.form_cf7_01 .wpcf7-form.sent .wpcf7-response-output {
  border-color: #9A8A66;
  background: #F7F5F0;
  color: #707070;
}

/* 送信完了時は入力欄を隠したい場合に使用（必要ならコメント解除）
.form_area_01.form_cf7_01 .wpcf7-form.sent .form_ele_01,
.form_area_01.form_cf7_01 .wpcf7-form.sent .form_btn_wrap {
  display: none;
}
*/

/* reCAPTCHA v3 のバッジをフォーム下に控えめに表示させたい場合
.grecaptcha-badge {
  visibility: hidden;
}
*/

/* -------------------------------------------------------------------------
   5. SP
   ------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .form_area_01.form_cf7_01 .wpcf7-list-item-label {
    font-size: 3vw;
  }
  .form_area_01.form_cf7_01 .wpcf7-not-valid-tip {
    font-size: 2.8vw;
  }
  .form_area_01.form_cf7_01 .wpcf7-response-output {
    font-size: 3vw;
  }
}

/* -------------------------------------------------------------------------
   6. 補足テキスト（入力ルール・他フォームへの導線など）
      style.css の .caption は赤字（エラー用）のため、案内文は別クラスにする
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .form_ele_01 .cf7_caption_01 {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #909090;
}

.form_area_01.form_cf7_01 .form_ele_01 .cf7_caption_01 a {
  color: #909090;
  text-decoration: underline;
}

.form_area_01.form_cf7_01 .form_ele_01 .cf7_caption_01 a:hover {
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  .form_area_01.form_cf7_01 .form_ele_01 .cf7_caption_01 {
    font-size: 2.8vw;
  }
}

/* -------------------------------------------------------------------------
   7. CF7標準スタイルの打ち消し（追加分）
      CF7は .wpcf7-list-item-label::before / ::after に content:" " を入れるため、
      未選択時に余分な空白が入る。::before は上書き済み、::after をここで消す。
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .wpcf7-list-item-label::after {
  content: "";
}

/* -------------------------------------------------------------------------
   8. 確認画面（js/cf7-confirm.js）
      入力画面 → 確認画面 は .form_cf7_01 に is_confirm クラスを付けて切り替える。
      値の見た目は MW WP Form の確認ページ（.confirm .form_area_01 …）に合わせている。
   ------------------------------------------------------------------------- */
.form_area_01.form_cf7_01 .cf7_confirm_item,
.form_area_01.form_cf7_01 .cf7_confirm_lead,
.form_area_01.form_cf7_01 .cf7_btn_group {
  display: none;
}

.form_area_01.form_cf7_01.is_confirm > .box_txt_01,
.form_area_01.form_cf7_01.is_confirm .cf7_btn_input {
  display: none;
}

.form_area_01.form_cf7_01.is_confirm .form_ele_01 > dd:not(.cf7_confirm_item) {
  display: none;
}

.form_area_01.form_cf7_01.is_confirm .cf7_confirm_item,
.form_area_01.form_cf7_01.is_confirm .cf7_confirm_lead,
.form_area_01.form_cf7_01.is_confirm .cf7_btn_group {
  display: block;
}

.form_area_01.form_cf7_01 .cf7_confirm_lead {
  width: fit-content;
  margin: 0 auto 26px;
  font-size: 13px;
  line-height: 2;
  color: #707070;
  text-align: center;
}

.form_area_01.form_cf7_01 .cf7_confirm_item.ele_item_01 {
  padding: 8px 12px;
  border: 1px solid #9A8A66;
  font-size: 13px;
  line-height: 1.8;
  color: #707070;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-all;
}

.form_area_01.form_cf7_01 .cf7_confirm_item.ele_item_02 {
  position: relative;
  padding: 8px 12px 8px 24px;
  font-size: 13px;
  line-height: 1.8;
  color: #707070;
}

.form_area_01.form_cf7_01 .cf7_confirm_item.ele_item_02::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  background: #9A8A66;
  border-radius: 50%;
  -webkit-transform: translate(0, -50%);
          transform: translate(0, -50%);
}

/* ボタン（確認する / 修正する は <button> のため input 用の指定が効かない） */
.form_area_01.form_cf7_01 input.send_btn_01,
.form_area_01.form_cf7_01 button.send_btn_01 {
  font-size: 13px;
}

.form_area_01.form_cf7_01 button.send_btn_01 {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid #9A8A66;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
  cursor: pointer;
  z-index: 1;
}

/* 「修正する」は控えめな見た目に */
.form_area_01.form_cf7_01 .cf7_btn_back {
  background: #ffffff;
  border: 1px solid #9A8A66;
}

.form_area_01.form_cf7_01 .cf7_btn_back button.send_btn_01 {
  border: none;
  color: #9A8A66;
}

.form_area_01.form_cf7_01 .cf7_btn_back:before {
  background: rgba(154, 138, 102, 0.15);
}

@media screen and (max-width: 768px) {
  .form_area_01.form_cf7_01 .cf7_confirm_lead,
  .form_area_01.form_cf7_01 .cf7_confirm_item.ele_item_01,
  .form_area_01.form_cf7_01 .cf7_confirm_item.ele_item_02,
  .form_area_01.form_cf7_01 input.send_btn_01,
  .form_area_01.form_cf7_01 button.send_btn_01 {
    font-size: 3vw;
  }
}
