/* =============================================
   CF7 確認画面スタイル
   対象: .needs-confirm クラスを持つフォーム
============================================= */

/* 確認パネル全体 */
.cf7-confirm-panel {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 30px;
  margin-top: 10px;
}

/* 確認パネルタイトル */
.cf7-confirm-title {
  font-size: 1.1em;
  font-weight: bold;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ccc;
  color: #333;
}

/* 確認テーブル */
.cf7-confirm-table {
  margin: 0 0 24px;
}

.cf7-confirm-table dt {
  font-weight: bold;
  color: #555;
  font-size: 0.85em;
  margin-top: 14px;
  margin-bottom: 2px;
}

.cf7-confirm-table dt:first-child {
  margin-top: 0;
}

.cf7-confirm-table dd {
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  color: #333;
  font-size: 0.95em;
  line-height: 1.6;
  word-break: break-all;
}

/* ボタンエリア */
.cf7-confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* 共通ボタン */
.cf7-btn-back,
.cf7-btn-send {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95em;
  font-weight: bold;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  line-height: 1;
}

/* 戻るボタン */
.cf7-btn-back {
  background: #fff;
  color: #555;
  border: 1px solid #aaa;
}

.cf7-btn-back:hover {
  background: #f0f0f0;
}

/* 送信ボタン */
.cf7-btn-send {
  background: #4a7c59;
  color: #fff;
}

.cf7-btn-send:hover {
  background: #3a6347;
}

.cf7-btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .cf7-confirm-panel {
    padding: 20px 16px;
  }

  .cf7-confirm-actions {
    flex-direction: column;
  }

  .cf7-btn-back,
  .cf7-btn-send {
    width: 100%;
    text-align: center;
    padding: 14px;
  }
}

/* =============================================
   Thanks パネル
============================================= */
.cf7-thanks-panel {
  text-align: center;
  padding: 48px 30px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cf7-thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #4a7c59;
  color: #fff;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.cf7-thanks-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
  margin: 0 0 16px;
}

.cf7-thanks-body {
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* =============================================

/* =============================================
   フォームレイアウト（左ラベル・右入力）
============================================= */

dl.form-table {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 24px;
  align-items: center;
  margin: 0;
  padding: 0;
}

dl.form-table dt,
dl.form-table dd {
  margin: 0;
  padding: 12px 0;
}

/* CF7 が自動挿入する <p> のマージンをリセット */
dl.form-table dt p,
dl.form-table dd p {
  margin: 0;
  padding: 0;
}

dl.form-table dt label {
  font-weight: bold;
  font-size: 0.9em;
  color: #444;
}

dl.form-table .required {
  color: #c0392b;
  margin-left: 3px;
}

/* 入力フィールドを列幅いっぱいに */
dl.form-table .wpcf7-form-control {
  width: 100% !important;
  box-sizing: border-box;
}

/* textarea 行はラベルを上揃えに */
dl.form-table dt:has(+ dd textarea) {
  align-self: start;
  padding-top: 18px;
}

/* スマホ: 1カラムに切り替え */
@media (max-width: 640px) {
  dl.form-table {
    grid-template-columns: 1fr;
  }

  dl.form-table dt,
  dl.form-table dd {
    padding: 6px 0;
  }

  dl.form-table dt {
    padding-bottom: 2px;
  }

  dl.form-table dt:has(+ dd textarea) {
    align-self: auto;
    padding-top: 6px;
  }
}

/* =============================================
   入力フィールド文字色
============================================= */

/* 入力済みテキスト */
dl.form-table .wpcf7-form-control {
  color: #333 !important;
}

/* プレースホルダー */
dl.form-table .wpcf7-form-control::placeholder {
  color: #999 !important;
  opacity: 1;
}

/* =============================================
   「確認する」ボタン
============================================= */

button.cf7-btn-confirm {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95em;
  font-weight: bold;
  background: #4a7c59;
  color: #fff !important;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
  margin-top: 16px;
}

button.cf7-btn-confirm:hover {
  background: #3a6347;
}

/* 「確認する」ボタン中央配置 */
.wpcf7-form p:has(button.cf7-btn-confirm) {
  text-align: center;
}

button.cf7-btn-confirm {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 確認パネル背景を白に */
.cf7-confirm-panel {
  background: #fff;
}

/* 確認パネルボタンをセンターに */
.cf7-confirm-actions {
  justify-content: center;
}
