/* ==========================================================================
   contact.css — お問い合わせ（Contact Form 7）
   Figma: cta Desktop 119:1146 / Mobile 119:1372
   フォームの HTML は Contact Form 7 の管理画面に登録（docs/CF7_COMMONSLINK.md）。
   ========================================================================== */

.contact {
  --contact-text: #393936;
  --contact-required: #e70012; /* Figma 変数「色 2」 */
  --contact-optional: #838383;
  --contact-field-bg: #f8f8f8;
  --contact-rule: #e6e6e6;
  --contact-yellow: #f7ca29;
  --font-mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;

  padding: 120px 0;
  background: var(--contact-yellow);
  color: var(--contact-text);
}

.contact__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
  padding: 100px 67px;
  background: #fafafa;
}

.contact__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-weight: inherit;
}

.contact__heading-en {
  font-family: "Proza Libre", sans-serif;
  font-size: 60px;
  line-height: 82px;
}

.contact__heading-ja {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 26px;
  line-height: 42px;
  letter-spacing: 1.56px;
}

.contact__form {
  width: min(800px, 100%);
  padding: 60px;
  background: #fff;
}

.contact__notice {
  margin: 0;
  font-family: var(--font-noto-sans);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

/* Form（Contact Form 7）
   ========================================================================== */

.contact .wpcf7-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* 入力行: ラベル列 220px（ラベル + 必須 / 任意バッジ）+ 入力欄 */
.cf-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 0 22px;
  border-bottom: 1px solid var(--contact-rule);
}

.cf-row--textarea {
  align-items: flex-start;
}

.cf-label {
  display: flex;
  flex: 0 0 220px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 101px; /* Figma の行高 102 は下線 1px を含む */
}

.cf-label label {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.96px;
}

.cf-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 18px;
  background: var(--contact-required);
  color: #fff;
  font-family: var(--font-noto-sans);
  font-weight: 500;
  font-size: 10px;
  line-height: 18px;
  letter-spacing: 0.313px;
}

.cf-badge--optional {
  background: var(--contact-optional);
}

.cf-field {
  flex: 1;
  min-width: 0;
}

.cf-field .wpcf7-form-control-wrap {
  display: block;
}

.cf-field input,
.cf-field textarea {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--contact-field-bg);
  color: var(--contact-text);
  font-family: Arial, var(--font-noto-sans);
  font-size: 14px;
  line-height: 1.5;
  appearance: none;
}

.cf-field textarea {
  height: 241px; /* 行高 242（下線 1px を含む） */
  padding: 22px 20px;
  resize: vertical;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: #b3b3b3;
  opacity: 1;
}

.cf-field input:focus-visible,
.cf-field textarea:focus-visible,
.cf-privacy:focus-visible {
  outline: 2px solid var(--contact-yellow);
  outline-offset: 0;
}

/* プライバシーポリシー: 実際にスクロールできる領域 */
.cf-privacy {
  width: 100%;
  height: 143px;
  overflow-y: auto;
  padding: 22px 20px;
  border-bottom: 1px solid var(--contact-rule);
  background: var(--contact-field-bg);
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.78px;
  scrollbar-color: #d9d9d9 transparent;
  scrollbar-width: thin;
}

.cf-privacy::-webkit-scrollbar {
  width: 7px;
}

.cf-privacy::-webkit-scrollbar-thumb {
  background: #d9d9d9;
}

.cf-privacy p,
.cf-privacy h3 {
  margin: 0;
  font: inherit;
}

/* 同意チェック（[acceptance]） */
.cf-consent .wpcf7-list-item {
  margin: 0;
}

.cf-consent label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 18px;
  line-height: 2;
  letter-spacing: 1.08px;
  cursor: pointer;
}

.cf-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--contact-required);
  border-radius: 0;
  background: #fff center / 10px 10px no-repeat;
  appearance: none;
  cursor: pointer;
}

.cf-consent input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.6 8.6 2.4' fill='none' stroke='%23e70012' stroke-width='1.6'/%3E%3C/svg%3E");
}

.cf-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--contact-yellow);
  outline-offset: 2px;
}

/* 送信 */
.cf-submit {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.cf-submit .wpcf7-submit {
  width: min(464px, 100%);
  height: 66px;
  border: 0;
  border-radius: 0;
  background: var(--contact-yellow);
  color: #fff;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 24px;
  line-height: 16.46px;
  letter-spacing: 1.317px;
  cursor: pointer;
  appearance: none;
}

/* 同意チェック前は Contact Form 7 がボタンを無効化する */
.cf-submit .wpcf7-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cf-submit .wpcf7-spinner {
  position: absolute;
  top: 50%;
  left: calc(50% + min(232px, 50%) + 12px);
  margin: 0;
  transform: translateY(-50%);
}

/* バリデーション・送信結果（Contact Form 7 標準の表示を、フォームのトーンに合わせて最小限だけ調整） */
.contact .wpcf7-not-valid-tip {
  margin-top: 6px;
  color: var(--contact-required);
  font-family: var(--font-noto-sans);
  font-size: 12px;
  line-height: 1.5;
}

.cf-consent .wpcf7-not-valid-tip {
  text-align: center;
}

.contact .wpcf7 form .wpcf7-response-output {
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  font-family: var(--font-noto-sans);
  font-size: 14px;
  line-height: 1.6;
}

/* Mobile（Figma 375px）
   ========================================================================== */

@media (max-width: 767px) {
  .contact {
    padding: 40px 20px;
  }

  .contact__card {
    width: 100%;
    padding: 40px 0 0;
  }

  .contact__heading-en {
    font-size: 50px;
    line-height: 68px;
  }

  .contact__heading-ja {
    font-size: 20px;
    line-height: 32px;
    letter-spacing: 1.2px;
  }

  .contact__form {
    padding: 40px 20px;
  }

  .contact .wpcf7-form {
    gap: 30px;
  }

  .cf-row,
  .cf-row--textarea {
    align-items: center;
    gap: 10px;
    padding: 0;
  }

  /* ラベル列の幅は全行で統一（最長の「お問い合わせ」6 文字が 1 行に収まる幅）。
     ラベルは <wbr> の位置でだけ改行する */
  .cf-label {
    flex-basis: 128px;
    height: auto;
    padding: 24px 0;
  }

  .cf-label label {
    font-size: 13px;
    line-height: 1.23;
    letter-spacing: 0.78px;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .cf-badge {
    width: 35px;
    font-size: 8px;
  }

  .cf-field input,
  .cf-field textarea {
    padding-inline: 14px;
    font-size: 12px;
  }

  .cf-field textarea {
    height: 72px;
    padding-block: 12px;
  }

  .cf-consent label {
    font-size: 13px;
    letter-spacing: 0.78px;
  }

  .cf-submit .wpcf7-submit {
    width: 100%;
    height: 65px;
    font-size: 22px;
  }

  .cf-submit .wpcf7-spinner {
    left: auto;
    right: 12px;
  }
}
