/* ==================================================
   Contact｜カード設計
   ================================================== */

/* 各項目カード化（submit以外） */
.wpcf7-form p:not(:has(.wpcf7-submit)) {
  background: #fff;
  border: 1px solid rgba(28, 59, 88, 0.18);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 32px;
}

/* submitの下余白 */
.wpcf7-form p:has(.wpcf7-submit) {
  margin-bottom: 0;
}

/* labelをh4風に */
.wpcf7-form p label {
  display: block;
  font-size: var(--h4-size, 1rem);
  font-weight: var(--h4-weight, 600);
  margin-bottom: 12px;
  color: var(--text-main);
}

/* input / textarea を枠なし */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 90%;
  border: none;
  outline: none;
  background: transparent;
  padding: 14px 0;
  font-size: 1rem;
}

/* textareaは広く */
.wpcf7-form textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}

/* フォーカス演出（カード側） */
.wpcf7-form p:focus-within {
  border-color: #8fa3b8;
  box-shadow: 0 0 0 3px rgba(143, 163, 184, 0.15);
}

/* 送信ボタン中央 */
.wpcf7-submit.c-cta {
  display: block;
  margin: 0 auto;
}

/* ==========================================
   Contact｜カード高さ 微差調整（上下のみ）
   ========================================== */

/* 1. 氏名 */
.wpcf7-form p:nth-of-type(1):not(:has(.wpcf7-submit)) {
  padding: 6px 20px;
}

/* 2. メール */
.wpcf7-form p:nth-of-type(2):not(:has(.wpcf7-submit)) {
  padding: 6px 20px;
}

/* 4. 本文 */
.wpcf7-form p:nth-of-type(4):not(:has(.wpcf7-submit)) {
  padding: 24px 20px;
}

/* ==========================================
   Contact｜リード文下余白
   ========================================== */

.c-section__body .c-content > p {
  margin-bottom: 32px;
}

.wpcf7 {
  margin-top: 32px;
}

/* ==========================================
   Contact｜CF7レスポンス制御（正常表示＋余白安定）
   ========================================== */

/* 空のときは表示しない */
.wpcf7 form .wpcf7-response-output:empty {
  display: none;
}

/* 送信後メッセージはカード風に表示 */
.wpcf7 form .wpcf7-response-output {
  display: block;
  margin: 20px 0 0;
  padding: 14px 20px;

  border: 1px solid rgba(28, 59, 88, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);

  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 送信ボタン行は余白ゼロ */
.wpcf7-form p:has(.wpcf7-submit) {
  padding: 0;
  margin: 0;
}

/* スピナー無効化 */
.wpcf7-form .wpcf7-spinner {
  display: none;
}

/* ==========================================
   Contact｜送信後に出る「フォーム外枠」を強制的に消す（決定版）
   ========================================== */

/* CF7の状態クラスで付く枠・背景・余白を全部無効化 */
.wpcf7 form.sent,
.wpcf7 form.invalid,
.wpcf7 form.failed,
.wpcf7 form.aborted,
.wpcf7 form.spam,
.wpcf7 form.unaccepted {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* 念のため：送信ボタン行（p）に付く枠も完全に消す */
.wpcf7-form p:has(.wpcf7-submit) {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
