.p-contact {
  max-width: 600px;
  background-color: #ffffff;
  margin: 0 auto;
  border-radius: 30px;
  padding: 40px 20px;
}

.p-contact__title {
  text-align: center;
  margin: 0;
  margin-bottom: 32px;
}

/* フォーム全体のコンテナ */
.c-form {
  max-width: 480px;
  margin: 0 auto;
  color: #111111;
}

/* 各行のラップ */
.c-form__row {
  margin-bottom: 16px;
}

.c-form__row p {
  margin: 0;
}

.c-form__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
}

/* インプット・テキストエリアの共通スタイリング */
.c-form .wpcf7-text,
.c-form .wpcf7-textarea,
.c-form #c-form-name,
.c-form #c-form-email,
.c-form #c-form-message {
  width: 100%;
  padding: 16px;
  background-color: #ffffff;
  border: 1px solid #636363;
  border-radius: 12px;
  font-size: 16px;
  color: #111111;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* フォーカス時 */
.c-form .wpcf7-text:focus,
.c-form .wpcf7-textarea:focus,
.c-form #c-form-name:focus,
.c-form #c-form-email:focus,
.c-form #c-form-message:focus {
  background-color: #ffffff;
  border-color: #111111;
}

.c-form .wpcf7-textarea,
.c-form #c-form-message {
  height: 160px;
  resize: none;
}

/* ==========================================================================
   同意エリア（スマホ対応 ＆ シンプル中央揃えの決定版）
   ========================================================================== */

/* 全体を中央寄せ */
.c-form__agreement p {
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  width: 100%;
}

/* プラグインの自動生成タグをすべてプレーンなインラインに戻す（これでスマホで綺麗に折り返します） */
.c-form__agreement .wpcf7-acceptance,
.c-form__agreement .wpcf7-list-item,
.c-form__agreement .wpcf7-list-item label,
.c-form__agreement .wpcf7-list-item-label,
.c-form__agreement-text,
.c-form__agreement-text label {
  display: inline !important;
}

/* チェックボックス本体 */
.c-form__agreement input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;

  display: inline-block !important;
  margin: 0 10px 0 0 !important; /* 右側にだけ正確に10pxの隙間を作る */

  /* ★これだけで解決します★
     インラインテキストに対して、チェックボックスを少しだけ下に沈めることで、
     無駄な記述を一切せず、視覚的なド真ん中にピタッと一致させます。 */
  vertical-align: -3px !important;
}

/* 同意テキストの基本装飾（line-heightも1.5など自然なままでOK） */
.c-form__agreement-text {
  font-size: 14px !important;
  color: #666666;
  line-height: 1.5;
}

/* テキストリンク */
.c-form__link {
  color: #111111;
  text-decoration: underline;
  font-weight: 600;
  display: inline !important;

  &:hover {
    opacity: 0.8;
  }
}

/* ==========================================================================
   送信ボタン & エラーメッセージ
   ========================================================================== */
.c-form__submit-wrap {
  text-align: center;
}

.c-form .wpcf7-submit {
  width: 100%;
  padding: 16px;
  background-color: #111111;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.c-form .wpcf7-submit:hover {
  opacity: 0.8;
}

/* ==========================================================================
   送信ボタンがdisabled（無効化）の時のスタイル
   ========================================================================== */
.c-form .wpcf7-submit[disabled],
.c-form .wpcf7-submit[disabled]:hover {
  background-color: #e2e8f0; /* FanDomのUIに馴染む、柔らかな薄いグレー */
  border-color: #e2e8f0;
  color: #a0aec0; /* 文字色も薄くして、押せないことを分かりやすく */
  cursor: not-allowed; /* カーソルを禁止マークに */
  opacity: 1; /* 透明度でボカさず、色でしっかり表現 */
}

.c-form__response-pos .wpcf7-response-output {
  margin: 0 0 24px 0 !important;
  padding: 12px !important;
  font-size: 14px;
  border: 1px solid #cc0000 !important;
  border-radius: 8px;
  background-color: #fff5f5;
  color: #cc0000;
}

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

/* ==========================================================================
   送信ボタンの右側にスピナーを配置
   ========================================================================== */

/* 1. ボタンを包む親要素（位置の基準点にする） */
.c-form__submit-wrap {
  position: relative !important;
  display: block !important; /* 安全のためブロック構造を維持 */
  text-align: center; /* ボタン自体を中央寄せに */
}

/* 2. ボタン本体の基準を確保 */
.c-form__submit {
  display: inline-block !important; /* 横幅を文字＋余白にフィットさせる */
}

/* 
 * 3. スピナー本体を「絶対配置」でボタンのすぐ右側に浮かせる
 * ボタンの幅やスタイルがどうなっていても、その外側に強制的に回り込ませます。
 */
.wpcf7-spinner {
  position: absolute !important;
  top: 50% !important; /* ボタンの上下中央に合わせる */
  transform: translateY(-50%) !important; /* 上下のズレを完全に相殺 */
  left: calc(50% + 90px) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important; /* 非表示（none）から戻ったときにインライン化 */
}
