@charset "UTF-8";
/* ================================
   Contact (CF7 custom) FINAL v2
   - 入力：確認ボタンは中央・単独
   - 確認：修正／送信は同サイズで横並び（PC/TB）
   - SP：縦並び・同サイズ・中央
   - テーマ側 .wpcf7-submit 等の margin を確実に打ち消す
================================ */

/* ================================
   必須・任意
================================ */
.is-required{ color:#d93025; font-weight:700; }
.is-optional{ color:#1a73e8; font-weight:700; }

/* 注釈 */
.contact-note{
  font-size: 97%;
  line-height: 1.7;
  margin: 0 0 24px;
}

/* ================================
   入力画面（input step）
================================ */
.cf7-row{ margin-bottom: 18px; }

.cf7-row > label{
  display: block;
  font-weight: 700;
  margin: 0 0 8px;
}

/* label内pのデフォルトmarginを常時0（SPの空きすぎ対策） */
.cf7-row > label p{
  margin: 0;
}

/* 入力UI共通 */
.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form select,
.wpcf7 form textarea{
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  box-sizing: border-box;
}
.wpcf7 form textarea{ min-height: 220px; }

/* 入力画面：確認ボタン */
.cf7-confirm-btn{
  display: block;
  width: 100%;
  max-width: 320px;
  height: 52px;
  line-height: 52px;
  padding: 0 22px;
  margin: 32px auto 0px;

  border-radius: 999px;
  border: none;
  background: #695aae;
  color: #fff;

  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;

  /* ★テーマ側のmargin指定が当たる場合に備えて保険 */
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ================================
   確認画面（confirm step）
================================ */
.cf7-confirm{ margin-top: 8px; }

/* 確認画面内のpのデフォルト余白を潰す（SPの空きすぎ原因になりやすい） */
.cf7-confirm p{
  margin: 0;
}

.cf7-confirm-row{
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #eee;
}
.cf7-confirm-row:first-child{ border-top: none; }

/* ================================
   確認画面：ボタンエリア
================================ */
.cf7-confirm-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 32px 0 0px;
}

/* CF7のpラップを消して、flex直下にボタンを並べる */
.cf7-confirm-actions > p{
  margin: 0 !important;
  display: contents;
}

/* 修正／送信 共通（同サイズ固定） */
.cf7-back-btn,
.wpcf7 form input[type="submit"].cf7-submit{
  width: 240px;
  height: 52px;
  line-height: 52px;
  padding: 0 22px;

  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;

  box-sizing: border-box;
  vertical-align: middle;

  /* ★ここが本丸：テーマ側の margin(30px auto 0等) を完全に殺す */
  margin: 0 !important;
}

/* 修正する（button想定） */
.cf7-back-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border: 1px solid #cfcfcf;
  color: #222;
}

/* 送信する（input想定） */
.wpcf7 form input[type="submit"].cf7-submit{
  display: inline-block;
  background: #695aae;
  border: none;
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
}

/* 送信ボタン横のspinnerはレイアウト干渉しないように */
.wpcf7 form .wpcf7-spinner{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ================================
   フォーム下部の余白（全デバイス）
================================ */
.wpcf7{
  padding-bottom: 50px; /* ここ好みで 32〜56pxくらいで調整OK */
}

/* CF7の必須エラーメッセージを確実に見せる（自前tipも含む） */
.wpcf7-not-valid-tip{
  display: block !important;
  margin-top: 6px;
  font-size: 13px;
  color: #d93025;
  line-height: 1.4;
}

/* ================================
   フォーム内pの余白（テーマ由来）を潰す
   ※入力ステップだけに限定（元の指定を維持）
================================ */
.cf7-step[data-step="input"] p{
  margin: 0 !important;
}
.cf7-step[data-step="input"] p.contact-note{ 
  margin-bottom: 26px !important;
  font-size: 95%;
}

  .cf7-confirm-row dd{
    font-size: 16px;     /* ← 今より少しだけUP */
    line-height: 1.7;
  }

/* =================================================
   PC（>= 1025px）
================================================= */
@media screen and (min-width: 1025px){
  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 34px !important;
    line-height: 1.25 !important;
  }
}

/* ================================
   PC・TB：
================================ */
@media screen and (min-width: 768px){
  /* name="inquiry_kind" の select のみ対象 */
  .wpcf7 form select[name="inquiry_kind"]{
    max-width: 420px;   /* ← 好みで 360〜480px くらい */
  }
}

/* =================================================
   タブレット（768px - 1024px）
================================================= */
@media screen and (min-width: 768px) and (max-width: 1024px){
  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 26px !important;
    line-height: 1.25 !important;
  }
}

/* =================================================
   SP（<= 767px）
================================================= */
@media screen and (max-width: 767px){

  /* フロントのページタイトル（H1）を大きくする */
  body.page :is(.entry-title, .page-title, .post-title, .headline, .page_headline, .headline1, h1){
    font-size: 24px !important;
    line-height: 1.25 !important;
  }

  /* 確認内容は縦積み */
  .cf7-confirm-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* ボタンは縦並び（※このあと横並び指定が来るので、最終的に横並びになるのは元の挙動通り） */
  .cf7-confirm-actions{
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  /* SPは同サイズでセンター（※このあと横並び用に上書きされるのも元の挙動通り） */
  .cf7-back-btn,
  .wpcf7 form input[type="submit"].cf7-submit,
  .cf7-confirm-btn{
    width: 100%;
    max-width: 320px;
  }

  /* SP：行間（各フォーム下）も少し詰める */
  .cf7-row{ margin-bottom: 22px; }
  .cf7-row > label{ margin-bottom: 22px; }

  /* SP：ボタンを横並びのまま、間に余白を作る（元の指定を維持） */
  .cf7-confirm-actions{
    flex-direction: row;      /* 縦並びにしない */
    gap: 8px;                /* ← ここがボタン間の空き */
    margin-bottom: 16px;
  }

  /* 以前入れた「pを100%幅にする指定」がある場合は無効化 */
  .cf7-confirm-actions > p{
    width: auto !important;
    display: contents;        /* ラップの影響を消す（入れてもOK） */
  }

  /* ボタンは横並びで同じ幅に */
  .cf7-confirm-actions .cf7-back-btn,
  .cf7-confirm-actions .wpcf7-submit{
    width: auto;
    max-width: none;
    flex: 1;
    min-width: 140px;         /* 端末が細い時の保険（折り返し防止） */
    margin: 0 !important;
  }

  /* 確認画面の各値がpで出てくる時の余白を0に */
  .cf7-confirm p,
  .cf7-confirm-row p{
    margin: 0 !important;
  }
}

/* ================================
   SP：ボタン間の謎余白（wpcf7-submitのmargin）を確実に殺す
   ※元コードではSP外にも効いていたので、同じスコープで維持
================================ */

/* まず「確認画面のボタンエリア内」だけ、テーマのmarginを強制リセット */
.cf7-confirm-actions .wpcf7-submit,
.cf7-confirm-actions .wpcf7-previous,
.cf7-confirm-actions .cf7-back-btn{
  margin: 0 !important;
}

/* pラップ自体も余白をゼロ（念のため） */
.cf7-confirm-actions > p{
  margin: 0 !important;
  padding: 0 !important;
}
