/* =================================================== */
/* 超得グルメ祭り LP全体 ＆ フォーム CSS
/* =================================================== */

.bg-dots-area {
  padding-bottom: 100px;
  background-color: #EACDAA;
  background-image: 
    radial-gradient(#EDD5B8 25%, transparent 26%),
    radial-gradient(#EDD5B8 25%, transparent 26%);
  background-size: 300px 300px;
  background-position: 0 0, 150px 150px;
}

/* ---------------------------------------------------
   1. LP全体のレイアウト (.form-wrap)
--------------------------------------------------- */
.form-wrap {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px 40px; /* 左右余白と一番下の余白 */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.6;
    box-sizing: border-box;
  }
  
  .form-wrap img.form-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 30px;
  }
  
  /* ---------------------------------------------------
     2. 見出し・テキスト
  --------------------------------------------------- */
  .form-wrap h1 {
    text-align: center;
    margin-bottom: 10px;
    margin: 50px auto;
  }
  
  .form-wrap .title-text {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
  }

  .form-title {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .form-title img {
    width: 100%;
    max-width: 800px;
    height: auto;
  }

  /* ---------------------------------------------------
     3. キャンペーン要項 (.campaign-info)
  --------------------------------------------------- */
  .campaign-info {
    max-width: 800px;
    margin: 0 auto 40px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 2rem;
    border-radius: 4px;
  }
  
  .campaign-info .info-item {
    margin-bottom: 1.5rem;
  }
  
  .campaign-info .info-item:last-child {
    margin-bottom: 0;
  }
  
  .campaign-info .label {
    font-weight: bold;
    color: #444;
    margin-bottom: 0.3rem;
    border-left: 4px solid #666;
    padding-left: 8px;
  }
  
  .campaign-info .content {
    margin-left: 12px;
    font-size: 0.95rem;
  }

  /* キャンペーン要項のリスト装飾 */
.info-list {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  list-style-type: disc;
}

.info-list li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.info-list li:last-child {
  margin-bottom: 0;
}
  
  /* ---------------------------------------------------
     4. 応募方法エリア (.form-apply)
  --------------------------------------------------- */
  .form-apply {
    max-width: 800px;
    margin: 0 auto 40px;
  }
  
  .form-apply .bold {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  
  .form-apply .form-ul {
    margin-top: 10px;
    padding-left: 20px;
  }
  
  .form-apply .form-ul li {
    margin-bottom: 5px;
  }
  
  /* ---------------------------------------------------
     5. CF7 フォームエリア (.cf7-planet)
  --------------------------------------------------- */
  .cf7-planet {
    max-width: 800px; 
    margin: 100px auto 50px;
    background-color: #fff;
    padding: 2rem;
  }

  .form-main-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
}
  
  /* フォームの縦並びレイアウト */
  .wpcf7-form .form-row {
    display: block;
    margin-bottom: 2rem;
  }
  
  .form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #222;
  }
  
  .form-label.required::after {
    content: "必須";
    font-size: 0.8em;
    color: #fff;
    background-color: #e53935;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: 1px;
    font-weight: normal;
  }
  
  /* 入力欄（幅を最大500pxに制限して間延びを防ぐ） */
  .input-text,
  .input-textarea,
  select {
    width: 100%;
    max-width: 500px;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
  }
  
  .input-text:focus,
  .input-textarea:focus,
  select:focus {
    border-color: #66afe9;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.3);
  }
  
  .input-textarea {
    max-width: 100%; /* ご意見欄は広々使えるように100% */
    min-height: 150px;
    resize: vertical;
  }
  
  /* ラジオボタン・チェックボックス */
  .wpcf7-list-item {
    display: inline-block;
    margin: 0.5rem 1.5rem 0.5rem 0;
  }
  .wpcf7-list-item input[type="radio"],
  .wpcf7-list-item input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.1);
  }
  
  /* ファイルアップロード */
  input[type="file"] {
    padding: 0.5rem 0;
    font-size: 16px;
  }
  
  /* エラーメッセージ */
  .wpcf7-not-valid-tip,
  .error-message {
    display: block;
    color: #e53935;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 0.5rem;
  }
  .input-text.is-error,
  .wpcf7-not-valid {
    border-color: #e53935 !important;
    background-color: #fff8f8;
  }
  
  /* ---------------------------------------------------
     6. 確認画面表示 (.confirmation-view)
  --------------------------------------------------- */
  .form-input-area[aria-hidden="true"] { display: none; }
  .confirmation-view { display: none; }
  .confirmation-view[aria-hidden="false"] { display: block; }
  
  .confirmation-view {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
  }
  
  .confirmation-view ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .confirmation-view li {
    display: block;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 1.5rem;
  }
  .confirmation-view li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  .confirmation-view .conf-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 0.5rem;
  }
  
  .confirmation-view .conf-value {
    white-space: pre-wrap;
    word-break: break-all;
    color: #222;
  }
  
/* ---------------------------------------------------
     7. ボタン周り (.js-btn-wrap)
  --------------------------------------------------- */
  .js-btn-wrap {
    margin-top: 2rem;
    text-align: center;
  }
  
  /* 見えないステップは「透明」ではなく、完全に空間から消す */
  .js-btn-wrap > [aria-hidden="true"] { 
    display: none !important; 
  }
  
  .js-btn-wrap button,
  .js-btn-wrap input[type="submit"] {
    display: block;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
    max-width: 300px;
  }
  
  .js-btn-wrap button:hover:not(:disabled),
  .js-btn-wrap input[type="submit"]:hover {
    opacity: 0.8;
  }
  
  .js-confirm-btn { background-color: #0056b3; }
  .js-confirm-btn:disabled { background-color: #ccc; cursor: not-allowed; }
  
  .js-secondstep {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    flex-direction: column;
  }
  
  .js-secondstep button,
  .js-secondstep input[type="submit"] {
    flex: 1;
    max-width: 240px;
  }
  
  .js-return-btn { background-color: #6c757d; }
  .wpcf7-form [type="submit"] { background-color: #28a745; }
  
  /* ---------------------------------------------------
     8. フッター (.form-footer)
  --------------------------------------------------- */
  .form-footer {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-top: 30px;
    font-size: 0.9rem;
    color: #666;
  }
  
  .form-footer .madoguchi {
    margin-bottom: 20px;
  }
  
  .form-footer a {
    color: #0056b3;
    text-decoration: underline;
  }
  .form-footer a:hover {
    text-decoration: none;
  }
  
  /* ---------------------------------------------------
     9. レスポンシブ (スマホ表示 768px以下)
  --------------------------------------------------- */
  @media (max-width: 768px) {
    .form-label.required {
      position: relative; /* 必須マークの基準位置にする */
      padding-right: 3.2em; /* 必須マークがテキストに被らないように右側に余白を作る */
    }
    
    .form-label.required::after {
      position: absolute; /* 右上にピン留め */
      right: 0;
      top: 0;
      margin-left: 0; /* PC用のマージンをリセット */
      margin-top: 2px; /* 文字の高さに合うよう微調整 */
    }
    
    .campaign-info {
      padding: 1.5rem 1rem;
    }
    
    .campaign-info .content {
      margin-left: 0;
    }
  
    .wpcf7-list-item {
      display: block;
      margin: 0.5rem 0;
      padding: 10px;
      background-color: #f9f9f9;
      border: 1px solid #eee;
      border-radius: 4px;
    }
  
    .confirmation-view {
      padding: 1.5rem 1rem;
    }
  
    .js-secondstep {
      flex-direction: column-reverse; /* スマホでは「修正する」を下にする */
    }
    
    .js-secondstep button,
    .js-secondstep input[type="submit"] {
      max-width: 100%;
      width: 100%;
    }
  }

/* Cloudflareキャプチャ専用のクラスを狙い撃ちして中央寄せ */
.cf-turnstile,
.wpcf7-turnstile {
    display: flex !important;
    justify-content: center !important;
    margin: 50px auto 0 !important;
    width: 100% !important;
}

/* =================================================== */
/* 超得グルメ祭り サンクスページ 
/* =================================================== */


/* サンクスページのメッセージのみ白い箱に入れる */
.form-wrap.is-thanks .title-text {
  max-width: 700px;
  margin: 0 auto 50px;
  padding: 30px;
  background: #fff;
  border: 2px solid #EACDAA; /* 背景のドット色と合わせた枠線 */
  border-radius: 10px;
  line-height: 2;
  text-align: left; /* 文章量が多いので左寄せ */
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-size: 1.1rem; /* LP側のサイズを踏襲 */
}

/* 戻るボタンエリア */
.is-thanks .thanks-nav {
  text-align: center;
  margin-top: 40px;
}

.is-thanks .btn-home {
  display: inline-block;
  padding: 15px 50px;
  background-color: #0056b3; /* 既存の青ボタンに合わせる */
  color: #fff !important;
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  transition: transform 0.2s, opacity 0.2s;
}

.is-thanks .btn-home:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

/* スマホ対応 */
@media (max-width: 768px) {
  .form-wrap.is-thanks h1 {
      font-size: 1.5rem;
      margin-top: 20px;
  }
  .form-wrap.is-thanks .title-text {
      padding: 20px;
      font-size: 0.95rem;
      line-height: 1.7;
      width: 90%; /* 画面端の余白確保 */
  }
}