/* ========================================
 * Contact / Contact Form 7
 * LP・記事LP・固定ページ共通
 *
 * 役割：
 * - .contact系：お問い合わせセクション固有のレイアウト
 * - .wpcf7系：フォーム部品の共通スタイル
 * ======================================== */

/* ========================================
 * Contact Section
 * ======================================== */

.contact {
  background: #fff;
  color: #222;
}

.contact__inner {
  padding-block: 72px;
}

.contact__heading {
  text-align: center;
}

.contact__form {
  width: min(100%, 560px);
  margin: 40px auto 0;
}

/* ========================================
 * Contact Form 7
 * ======================================== */

.wpcf7 {
  width: 100%;
}

/* フォーム全体 */
.wpcf7 form {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

/* 各入力項目 */
.wpcf7 form > p {
  margin: 0;
}

/* 修正：項目間の余白を12pxに統一 */
.wpcf7 form > p + p {
  margin-top: 12px;
}

/* ラベル */
.wpcf7 label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: #222;
}

/* 入力欄共通 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;

  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;

  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #222;

  appearance: none;
  box-sizing: border-box;
}

/* 修正：placeholderは本文より一段薄く */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: #888;
  font-weight: 400;
  opacity: 1;
}

/* セレクト */
.wpcf7 select {
  color: #222;
}

/* フォーカス */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: #222;
  outline: 2px solid rgba(34, 34, 34, 0.12);
  outline-offset: 1px;
}

/* テキストエリア */
.wpcf7 textarea {
  min-height: 160px;
  resize: vertical;
}

/* ========================================
 * Acceptance / Checkbox
 * ======================================== */

.wpcf7 .wpcf7-acceptance {
  display: block;
}

.wpcf7 .wpcf7-list-item {
  margin: 0;
}

.wpcf7 .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 5px;
}

/* 個人情報の取り扱いリンク */
.wpcf7 .wpcf7-list-item-label a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========================================
 * Submit Button
 * ======================================== */

.wpcf7 input[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 62px;
  padding: 14px 24px;

  border: 0;
  border-radius: 8px;
  background: #222;

  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;

  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.wpcf7 input[type="submit"]:hover {
  opacity: 0.82;
}

.wpcf7 input[type="submit"]:active {
  transform: translateY(1px);
}

/* 同意前などの無効状態 */
.wpcf7 input[type="submit"]:disabled {
  background: #ddd;
  color: #888;
  cursor: not-allowed;
  opacity: 1;
}

/* ========================================
 * Error / Response / Loading
 * ======================================== */

.wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: #c00;
}

.wpcf7 form .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.7;
}

.wpcf7 .wpcf7-spinner {
  display: block;
  margin: 12px auto 0;
}

/* ========================================
 * Responsive
 * ======================================== */

@media screen and (max-width: 767px) {
  .contact__inner {
    padding-block: 48px;
  }

  .contact__form {
    margin-top: 32px;
  }

  .wpcf7 form {
    max-width: 100%;
  }

  .wpcf7 label {
    font-size: 15px;
  }

  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 input[type="tel"],
  .wpcf7 input[type="url"],
  .wpcf7 input[type="number"],
  .wpcf7 select,
  .wpcf7 textarea {
    padding: 12px;
    font-size: 16px;
  }

  .wpcf7 input[type="submit"] {
    min-height: 56px;
    margin-top: 12px;
    font-size: 16px;
  }
}

/* hidden項目による不要な余白を削除 */
.contact-hidden-fields {
  display: none !important;
}
/* hiddenフィールドをレイアウト対象外にする */
.wpcf7 input[type="hidden"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}