/* フォーム共通 （contact / download_form / hpdiagnosis-form）
   素材: 05_子テーマ/_src_form.css
   3ページとも中身が同一だったため1ファイルにまとめている。
   Contact Form 7 の .wpcf7 を直接狙うため、ページ専用ラッパーは無い。
   読み込みは該当3ページに限定しているので他ページには影響しない。
*/

/* ============ Contact Form 7 - Web-lin Style ============ */
:root {
  --wb-purple: #6B47FF;
  --wb-teal: #6B47FF;
  --wb-ink: #15141c;
  --wb-text: #4a4755;
  --wb-text-2: #817d8d;
  --wb-line: #e4e2ec;
  --wb-line-strong: #d7d4e0;
  --wb-paper: #f5f4fa;
  --wb-grad: #6B47FF;
}

.wpcf7 {
  max-width: 720px;
  margin: 0 auto;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
}

.form__list {
  display: block;
  margin: 0 0 28px;
  padding: 0;
}

.form__list dt,
.form__required {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--wb-ink);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.required-contact {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  background: var(--wb-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 100px;
  vertical-align: middle;
}

.form__list dd {
  margin: 0;
  padding: 0;
}

/* 入力欄 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  color: var(--wb-ink);
  background: #fff;
  border: 1.5px solid var(--wb-line-strong);
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--wb-purple);
  box-shadow: 0 10px 24px -16px rgba(21, 20, 28, .30);
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: var(--wb-text-2);
  font-weight: 400;
}

.wpcf7 textarea {
  height: 140px;
  line-height: 1.7;
  resize: vertical;
}

/* セレクトボックスの矢印 */
.wpcf7 select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B47FF' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
  cursor: pointer;
}

/* プライバシーポリシー同意 */
.form__consent {
  margin: 32px 0 28px;
  padding: 20px 24px;
  background: var(--wb-paper);
  border: 1px solid var(--wb-line);
  border-radius: 6px;
  text-align: center;
}

.form__consent .wpcf7-list-item {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.form__consent .wpcf7-list-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--wb-ink);
}

.form__consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wb-purple);
  cursor: pointer;
}

/* 送信ボタン */
.contact-form__button {
  text-align: center;
  margin-top: 36px;
}

.wpcf7 .form__button,
.wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 56px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff !important;
  background: var(--wb-grad);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
}

.wpcf7 .form__button:hover,
.wpcf7 input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(107, 71, 255, .8);
}

.wpcf7 input[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* 送信中スピナー */
.wpcf7-spinner {
  background-color: var(--wb-purple);
}

/* バリデーションエラー */
.wpcf7-not-valid-tip {
  color: #E04B5C;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.wpcf7 .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.wpcf7-not-valid {
  border-color: #E04B5C !important;
  box-shadow: none;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 select,
  .wpcf7 textarea {
    font-size: 16px; /* iOS拡大防止 */
    padding: 13px 16px;
  }
  .wpcf7 .form__button,
  .wpcf7 input[type="submit"] {
    width: 100%;
    padding: 16px 32px;
  }
  .form__consent {
    padding: 18px 20px;
  }
}
