body.promov-listing-contact-page .promov-contact-page {
  overflow-x: clip;
}

body.promov-listing-contact-page .promov-contact-page__content {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

body.promov-listing-contact-page .promov-contact-page__content > .wpcf7,
body.promov-listing-contact-page .promov-contact-page__content .wpcf7 {
  display: block;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-lg);
  background: #fff;
  box-shadow: var(--pv-sh-md);
}

body.promov-listing-contact-page .promov-contact-form,
body.promov-listing-contact-page .promov-contact-form-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
}

body.promov-listing-contact-page .promov-contact-form-shell > .promov-general-contact-guidance,
body.promov-listing-contact-page .promov-contact-form-shell > .promov-contact-form,
body.promov-listing-contact-page .promov-contact-form > :not(.promov-contact-form__field--half),
body.promov-listing-contact-page .promov-contact-form-shell > :not(.promov-contact-form__field--half) {
  grid-column: 1 / -1;
}

/* 親テーマ videopro は p へ padding: 8px 0 7px、input へ margin-bottom: 20px を当てている。
   grid の gap だけで間隔を制御しているため、打ち消さないと gap 24px の上にこの余白が
   足され、実際の見た目は company-register などより間延びして見える（実機で確認済み）。 */
body.promov-listing-contact-page .promov-contact-form p,
body.promov-listing-contact-page .promov-contact-form-shell > p {
  margin: 0;
  padding: 0;
}

body.promov-listing-contact-page .promov-contact-form label,
body.promov-listing-contact-page .promov-contact-form-shell label {
  display: block;
  color: var(--pv-ink);
  font-weight: 700;
  line-height: 1.65;
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) :is(input[type="text"], input[type="email"], input[type="url"], input[type="tel"], select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  /* 親テーマが input へ当てる margin-bottom: 20px を打ち消す。 */
  margin: 8px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-r-md);
  color: var(--pv-ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease;
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) textarea {
  min-height: 180px;
  resize: vertical;
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) :is(input, select, textarea):focus {
  outline: 0;
  border-color: var(--pv-accent);
  box-shadow: 0 0 0 3px rgba(216, 65, 47, .14);
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) small {
  display: block;
  margin-top: 7px;
  color: var(--pv-soft);
  font-weight: 400;
  line-height: 1.65;
}

body.promov-listing-contact-page :is(.promov-required, .promov-optional) {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

body.promov-listing-contact-page .promov-required { color: #fff; background: var(--pv-accent); }
body.promov-listing-contact-page .promov-optional { color: var(--pv-soft); background: var(--pv-surface2); }

body.promov-listing-contact-page .wpcf7-not-valid-tip {
  display: block;
  margin-top: 7px;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
}

body.promov-listing-contact-page .wpcf7 form .wpcf7-response-output {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--pv-r-md);
  line-height: 1.7;
}

body.promov-listing-contact-page :is(.promov-contact-form__turnstile, .cf-turnstile, .cf7-turnstile) {
  margin: 0;
}

body.promov-listing-contact-page .promov-contact-form__hidden {
  display: none !important;
}

/* /contact/ の隠しフィールド（例: source-page）を包む p が .promov-contact-form__hidden クラスを
   持たずに保存されており、gridの行として数えられて最後の入力欄と同意チェックボックスの間隔が
   二重（48px）になっていた（実機で確認済み）。中身が隠しinputだけのpは自動的にgridから除外する。 */
body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) > p:has(> input[type="hidden"]:only-child) {
  display: none;
}

body.promov-listing-contact-page .promov-contact-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  grid-column: 1 / -1;
  width: 100%;
}

body.promov-listing-contact-page .promov-contact-form__submit {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

body.promov-listing-contact-page .promov-contact-form__consent {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  color: var(--pv-ink);
  font-size: 13.5px;
  line-height: 1.7;
}

body.promov-listing-contact-page .promov-contact-form__consent .wpcf7-form-control-wrap,
body.promov-listing-contact-page .promov-contact-form__consent .wpcf7-acceptance {
  display: block;
}

/* company-register の同意チェックボックス（.promov-company-register__checkbox）と
   同じ余白・文字サイズに揃える。リンクをlabelの外に置く構造自体は、リンクをクリックした
   ときにチェックボックスまで一緒にトグルされないようにする既存の意図的な設計のため維持する。 */
body.promov-listing-contact-page .promov-contact-form__consent label {
	display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  width: auto;
  max-width: 100%;
  color: var(--pv-ink);
  font-weight: 400;
	cursor: pointer;
}

/* The policy links stay outside the labels so opening a policy never toggles the checkbox. */
body.promov-listing-contact-page .promov-contact-form__consent > label {
	display: inline;
}

body.promov-listing-contact-page .promov-contact-form__consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  /* align-items: flex-start は行の上端に揃うだけで、テキストの文字は行送りぶん
     四角より下から始まるため、実機で実測しながら上マージンで補正する（6px）。 */
  margin: 6px 0 0;
  accent-color: var(--pv-accent);
}

body.promov-listing-contact-page .promov-contact-form__consent input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(216, 65, 47, .28);
  outline-offset: 3px;
}

body.promov-listing-contact-page .promov-contact-form__consent a {
  color: var(--pv-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.promov-listing-contact-page .promov-contact-form__consent a:focus-visible {
  outline: 2px solid var(--pv-accent);
  outline-offset: 3px;
}

body.promov-listing-contact-page .promov-contact-form__consent .wpcf7-not-valid-tip {
  margin-top: 7px;
}

body.promov-listing-contact-page .promov-contact-form__consent .wpcf7-not-valid {
  outline: 3px solid rgba(180, 35, 24, .22);
  outline-offset: 3px;
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) :is(input[type="submit"], button[type="submit"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: min(100%, 260px);
  max-width: 100%;
  min-height: 54px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--pv-r-md);
  color: #fff;
  background: var(--pv-accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) :is(input[type="submit"], button[type="submit"]):is(:hover, :focus-visible) {
  background: #c93425;
  box-shadow: 0 8px 20px rgba(216, 65, 47, .24);
  transform: translateY(-1px);
}

body.promov-listing-contact-page .promov-general-contact-guidance {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--pv-r-md);
  background: var(--pv-surface);
}

body.promov-listing-contact-page .promov-general-contact-guidance__title { margin: 0 0 8px; font-weight: 800; }
body.promov-listing-contact-page .promov-general-contact-guidance ul { margin: 0; padding-left: 1.4em; line-height: 1.8; }
body.promov-general-contact-page .promov-contact-page__content > :not(.wpcf7) { margin-top: 36px; }

/* 見出し・カードは estimate-complete.php と同じヒーロー骨格・共有トークンを使うため、
   本文幅の制約だけをここで持つ（カードそのものの見た目は promov.css 側の
   完了ページ用body classスコープで共有する）。 */
.promov-listing-contact-complete,
.promov-general-contact-complete,
.promov-listing-contact-complete *,
.promov-general-contact-complete * {
  box-sizing: border-box;
}

:is(.promov-listing-contact-complete, .promov-general-contact-complete) .promov-consult-form {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0;
}

@media (max-width: 767px) {
  /* 実際の/contact/ではこのファイルの高詳細度ルールがpromov.cssより優先される。
     枠の内側を18pxに固定し、リストの既定インデントによる二重余白を解消する。 */
  body.promov-listing-contact-page .promov-general-contact-guidance { padding: 18px; }
  body.promov-listing-contact-page .promov-general-contact-guidance ul {
    padding-left: 0;
    list-style: none;
  }
  body.promov-listing-contact-page .promov-contact-page__content > .wpcf7,
  body.promov-listing-contact-page .promov-contact-page__content .wpcf7 { padding: 24px 18px; }
  body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body.promov-listing-contact-page .promov-contact-form__field--half { grid-column: 1 / -1; }
  body.promov-listing-contact-page .promov-contact-form__actions { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 16px; }
  body.promov-listing-contact-page :is(.promov-contact-form, .promov-contact-form-shell) :is(input[type="submit"], button[type="submit"]) { width: auto; min-width: min(100%, 240px); max-width: 100%; }
  body.promov-listing-contact-page .promov-contact-form__consent label { overflow-wrap: anywhere; }
}
