/* レイアウト */


.contact-lead {
  color: #667085;
  margin: 0;
}

/* フォーム全体の枠 */
.contact-form .wpcf7 form {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 3rem 4rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}


.contact-form .container {
  max-width: 840px;
}

/* グリッド行 */
.cf7-grid {
  margin-top: 20px;
}

.cf7-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}

@media (max-width: 640px) {
  .cf7-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* 左側ラベル+必須バッジ */
.cf7-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.cf7-label .badge {
  display: inline-block;
  background: #c07ade;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  padding: 4px 8px;
  line-height: 1;
}

.cf7-label .label {
  font-weight: 700;
  color: #2a2a2a;
}

/* 右側入力欄 */
.cf7-field .wpcf7-form-control {
  width: 100%;
  background: #f1f3f5;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.cf7-field textarea.wpcf7-form-control {
  min-height: 160px;
  resize: vertical;
}

.cf7-field .wpcf7-form-control:focus {
  outline: none;
  border-color: #c07ade;
  box-shadow: 0 0 0 3px rgba(73, 193, 162, .15);
  background: #fff;
}

/* プレースホルダー */
.cf7-field ::placeholder {
  color: #98a2b3;
}

/* 送信ボタン */
.cf7-actions {
  text-align: center;
  padding: 28px 0 8px;
}

.btn-contact {
  display: inline-block;
  background: #c07ade;
  color: #fff;
  font-weight: 700;
  letter-spacing: .04em;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 16px;
  transition: transform .05s ease, opacity .2s ease;
  min-width: 320px;
}

.btn-contact:hover {
  opacity: .92;
}

.btn-contact:active {
  transform: translateY(1px);
}

/* エラーメッセージ（CF7） */
.wpcf7 form .wpcf7-not-valid-tip {
  color: #d92d20;
  font-size: 13px;
  margin-top: 6px;
}

.wpcf7 form.invalid .wpcf7-response-output {
  border-color: #d92d20;
  color: #b42318;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: #49c1a2;
  color: #0f5132;
}

/* ========== Responsive (スマホ最適化) ========== */

/* 768px以下：タブレット〜スマホ */
@media (max-width: 768px) {

  /* フォーム外枠の余白を軽く */
  .contact-form .wpcf7 form {
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  }

  /* 行は1カラムに（ラベル→入力欄の縦積み） */
  .cf7-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 0;
  }

  /* ラベルの行間と位置 */
  .cf7-label {
    min-height: auto;
    align-items: flex-start;
  }

  /* バッジを少し大きくしてタップしやすく */
  .cf7-label .badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
  }

  /* 入力欄：タップしやすい高さ・余白 */
  .cf7-field .wpcf7-form-control {
    font-size: 16px;
    /* iOSのズーム回避 */
    padding: 14px 14px;
    min-height: 48px;
  }

  .cf7-field textarea.wpcf7-form-control {
    min-height: 180px;
  }

  /* プレースホルダーは少し大きめ */
  .cf7-field ::placeholder {
    font-size: 15px;
  }

  /* ボタンは横幅いっぱいに */
  .cf7-actions {
    padding: 22px 0 4px;
  }

  .btn-contact {
    width: 100%;
    min-width: 0;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 12px;
  }
}

/* 480px以下：スマホ小さめ端末 */
@media (max-width: 480px) {
  .contact-form .wpcf7 form {
    padding: 1.5rem 1rem;
  }

  .cf7-row {
    gap: 8px;
    padding: 14px 0;
  }

  .cf7-label .label {
    font-size: 15px;
    line-height: 1.35;
  }

  .cf7-field .wpcf7-form-control {
    padding: 13px 12px;
    border-radius: 10px;
  }

  .cf7-field textarea.wpcf7-form-control {
    min-height: 160px;
  }
}

/* 細かな仕上げ */
.cf7-row:last-child {
  border-bottom: none;
}

.wpcf7 form .wpcf7-not-valid-tip {
  line-height: 1.4;
}

.wpcf7 form .wpcf7-response-output {
  margin: 16px 0 0;
}

/* ===== 「区分（customer-type）」ラジオをピル型に ===== */

/* ラッパー指定：customer-type だけに限定 */
.wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

/* 余計なマージン除去 */
.wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item {
  margin: 0;
}

/* ボタン風ラベル（CF7の構造: <label><input><span class="wpcf7-list-item-label"></span></label>） */
.wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item>label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  background: #f6f7f9;
  border: 1px solid #e5e7eb;
  color: #2a2a2a;
  border-radius: 999px;
  /* pill */
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

/* ネイティブラジオは非表示（アクセシブルに） */
.wpcf7-form-control-wrap[data-name="customer-type"] input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* チェック状態：色反転（ブランド色に合わせて変更可） */
.wpcf7-form-control-wrap[data-name="customer-type"] input[type="radio"]:checked+.wpcf7-list-item-label {
  background: #c07ade;
  color: #fff;
  border-color: #c07ade;
  border-radius: 999px;
  padding: 10px 14px;
  /* 同じ見た目を維持 */
}

/* hover */
.wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item>label:hover {
  border-color: #c7ccd1;
  background: #eef1f5;
}

/* keyboard focus */
.wpcf7-form-control-wrap[data-name="customer-type"] input[type="radio"]:focus-visible+.wpcf7-list-item-label,
.wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item>label:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 122, 222, .25);
  border-radius: 999px;
}

/* スマホ */
@media (max-width: 768px) {
  .wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-radio {
    gap: 8px 10px;
  }

  .wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item>label {
    padding: 10px 12px;
    font-size: 15px;
  }

  .wpcf7-form-control-wrap[data-name="customer-type"] input[type="radio"]:checked+.wpcf7-list-item-label {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .wpcf7-form-control-wrap[data-name="customer-type"] .wpcf7-list-item>label {
    padding: 9px 12px;
    font-size: 14.5px;
  }

  .wpcf7-form-control-wrap[data-name="customer-type"] input[type="radio"]:checked+.wpcf7-list-item-label {
    padding: 9px 12px;
  }
}