/* ==========================================================================
   ご相談（/contact/）・送信完了（/thanks/）で共通の見た目
   A. ご相談
     1. ページの頭の「（無料）」
     2. 左右の組み方（左：30分でやること／右：フォーム）
     3. 左の案内の箱
     4. フォームの箱と、フォームが無いときの案内
     5. フォームの部品（Contact Form 7 が出すHTMLに当てる）
     6. 送信まわり（同意・Turnstile・送信ボタン・結果のメッセージ）
   B. 送信完了
     7. お礼の頭
     8. このあとの流れ（停留所）・メールが届かないとき
     9. お手元にあれば・ほかのページへ

   ▼ フォームの項目は CF7 の管理画面で作る（ひな形：docs/contact-form-7.md）。
     ひな形の class 名（cf-field / cf-label / cf-row / cf-choices / cf-hint / cf-agree / cf-submit）と、ここを対応させている
   ▼ スマホ：入力欄・選択肢・ボタンは高さ52px以上、文字は16px以上（iPhoneで入力時に拡大されないように）
   ========================================================================== */


/* ==========================================================================
   A. ご相談
   ========================================================================== */

/* ---------- 1. ページの頭の「（無料）」 ---------- */
.contact-head__free { margin-left: 10px; font-size: 28px; }

/* ---------- 2. 左右の組み方 ---------- */
.contact-body { padding-block: clamp(48px, 6vw, 80px) clamp(72px, 8vw, 110px); }
.contact-layout { display: grid; grid-template-columns: 400px 1fr; gap: 64px; align-items: start; }

/* ---------- 3. 左の案内（読みながら入力できるよう、PCでは上にとどまる） ---------- */
.contact-aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 20px; }
.contact-aside__box { background: var(--white); border: 2px solid var(--ink); border-radius: 20px; padding: 26px 28px; }
.contact-aside__box--cream { background: var(--cream); }
.contact-aside__title { font-size: 19px; font-weight: 900; }
.contact-aside__list { margin-top: 12px; padding-left: 1.3em; font-size: 16px; line-height: 1.9; }
.contact-aside__note { margin-top: 12px; font-size: 14px; color: var(--muted); }
/* お電話の受け口（2026-11-18）：番号は大きく・押しやすく。受付時間は番号のすぐ下 */
.contact-aside__tel { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-soft); font-size: 14px; line-height: 1.7; }
.contact-aside__tel-num { display: inline-block; margin-top: 2px; font-size: 22px; font-weight: 900; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.contact-aside__tel-hours { display: block; color: var(--muted); font-size: 13px; }
/* 送ったあとの流れ：数字の小さな丸 */
.contact-steps { list-style: none; margin-top: 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.contact-steps li { display: flex; gap: 12px; align-items: flex-start; }
.contact-steps__num {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--orange); color: #fff; border: 2px solid var(--ink);
	font-family: var(--font-num); font-weight: 800; font-size: 14px;
}

/* ---------- 4. フォームの箱と、フォームが無いときの案内 ---------- */
.contact-form { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); padding: 44px 48px; }
.contact-form__intro { margin-bottom: 30px; font-size: 15px; color: var(--muted); }
.contact-form__fallback { padding: 24px; background: var(--cream); border: 2px dashed var(--ink); border-radius: 16px; font-size: 17px; font-weight: 700; }

/* 必須・任意の印（フォームの中でも、案内文でも使う） */
.req, .opt { display: inline-block; font-size: 12px; font-weight: 900; line-height: 1.6; border-radius: 4px; padding: 1px 8px; vertical-align: middle; white-space: nowrap; }
.req { color: #fff; background: var(--orange-text); }
.opt { color: var(--muted); background: #EFE7DA; font-weight: 700; }

/* ---------- 5. フォームの部品（CF7 の出すHTMLに当てる） ---------- */
.wpcf7-form { display: flex; flex-direction: column; gap: 30px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cf-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 17px; font-weight: 900; line-height: 1.5; }
.cf-label__sub { font-size: 14px; font-weight: 500; color: var(--muted); }
/* 選択肢のまとまり（fieldset）は、ブラウザ標準の枠と余白を消す */
.wpcf7-form fieldset.cf-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.wpcf7-form fieldset.cf-field > legend { padding: 0; margin-bottom: 8px; }
.cf-hint { margin: 0; font-size: 14px; color: var(--muted); }
.wpcf7-form-control-wrap { display: block; }

/* 入力欄（1行・複数行） */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-tel,
.wpcf7-form .wpcf7-textarea {
	display: block; width: 100%; min-height: 52px; padding: 12px 16px;
	font: inherit; font-size: 17px; line-height: 1.6; color: var(--ink);
	background: var(--white); border: 2px solid var(--ink); border-radius: 12px;
	-webkit-appearance: none; appearance: none;
}
.wpcf7-form .wpcf7-textarea { min-height: 150px; resize: vertical; }
.wpcf7-form .wpcf7-form-control::placeholder { color: #9A9088; }
.wpcf7-form .wpcf7-form-control:focus { outline: 3px solid var(--yellow-mark); outline-offset: 2px; }
/* 入力が足りないとき（CF7 が aria-invalid を付ける） */
.wpcf7-form .wpcf7-form-control[aria-invalid="true"] { border-color: #B42318; background: #FFF6F5; }

/* 選ぶ項目：大きめの四角いボタン風（チェック・ひとつだけ選ぶチェック） */
.cf-choices .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-choices .wpcf7-list-item { margin: 0; }
.cf-choices .wpcf7-list-item label,
.cf-agree .wpcf7-list-item label {
	display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px;
	background: var(--white); border: 2px solid var(--ink); border-radius: 12px;
	font-size: 16px; font-weight: 700; line-height: 1.5; cursor: pointer;
}
.cf-choices .wpcf7-list-item label:hover { background: var(--cream); }
/* 選んだ項目は、枠の色を薄いオレンジにして分かりやすく */
.cf-choices .wpcf7-list-item label:has(input:checked) { background: #FFF1E6; }

/* チェックの四角（ブラウザの標準の見た目をやめて、大きく描く） */
.wpcf7-form input[type="checkbox"] {
	-webkit-appearance: none; appearance: none; flex: none; margin: 0;
	width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white);
	cursor: pointer;
}
.wpcf7-form input[type="checkbox"]:checked {
	background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
/* 「ひとつだけ選ぶ」項目（ご希望の方法）は丸にする */
.wpcf7-exclusive-checkbox input[type="checkbox"] { border-radius: 50%; }
.wpcf7-exclusive-checkbox input[type="checkbox"]:checked { background-image: none; box-shadow: inset 0 0 0 4px var(--white); }
.wpcf7-form input[type="checkbox"]:focus-visible { outline: 3px solid var(--yellow-mark); outline-offset: 2px; }

/* 入力が足りないときの赤い文字 */
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; color: #B42318; }

/* ---------- 6. 送信まわり ---------- */
.cf-submit { border-top: 1px solid var(--line-soft); padding-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
/* 同意のチェック（枠は薄い色） */
.cf-agree .wpcf7-list-item { margin: 0; }
.cf-agree .wpcf7-list-item label { border-color: var(--line-soft); text-align: left; }
.cf-agree .wpcf7-list-item-label .req { margin-left: 6px; }

/* Cloudflare Turnstile（迷惑な送信の防止。CF7 が出す） */
.wpcf7-turnstile, .cf-turnstile { display: flex; justify-content: center; min-height: 65px; }

/* 送信ボタン（.btn-main の見た目を、少し大きく） */
.wpcf7-form .wpcf7-submit {
	min-height: 60px; padding: 0 48px; font-family: inherit; font-size: 20px; cursor: pointer;
	-webkit-appearance: none; appearance: none;
}
/* 同意にチェックするまでは押せない（CF7 の動き）。押せないことが見て分かるように */
.wpcf7-form .wpcf7-submit:disabled { background: #CFC6BC; color: var(--white); cursor: not-allowed; }
/* 送信中のくるくる：ボタンの下に出す */
.wpcf7-spinner { margin: 0; }

/* 送信の結果のメッセージ（エラーのときなど） */
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 14px 18px; border: 2px solid var(--line-soft); border-radius: 12px; font-size: 15px; font-weight: 700; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output { border-color: #E8A33D; background: #FFF8E8; }
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-color: #B42318; background: #FFF6F5; color: #B42318; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #2E7D32; background: #F1F8F1; }


/* ==========================================================================
   B. 送信完了
   ========================================================================== */

/* ---------- 7. お礼の頭（お辞儀のキャラ＋大きな見出し） ---------- */
.page-head.thanks-head { padding-block: clamp(48px, 6vw, 80px); }
.thanks-head .page-head__inner { justify-content: flex-start; gap: 56px; }
.thanks-head .page-head__chara { width: clamp(120px, 15vw, 220px); }
.thanks-head .page-head__lead { margin-top: 16px; font-size: 19px; }

/* ---------- 8. このあとの流れ・メールが届かないとき ---------- */
.thanks-next { padding-block: clamp(64px, 7vw, 90px); }
.thanks-h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; line-height: 1.35; }

.flow { --flow-cols: 3; margin-top: 40px; gap: 28px; } /* 共通部分は base.css「9.」 */
.flow h3 { font-size: 22px; font-weight: 900; line-height: 1.4; }
.flow p { font-size: 16px; }

.thanks-nomail { margin-top: 44px; background: var(--white); border: 2px solid var(--ink); border-radius: 20px; padding: 24px 30px; display: flex; gap: 18px; align-items: flex-start; }
.thanks-nomail svg { flex: none; margin-top: 4px; }
.thanks-nomail__title { font-size: 18px; font-weight: 900; }
.thanks-nomail__text { margin-top: 4px; font-size: 16px; }

/* ---------- 9. お手元にあれば・ほかのページへ ---------- */
.thanks-before { padding-block: clamp(64px, 7vw, 80px); }
.thanks-before__inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.thanks-before__sub { margin-top: 14px; font-size: 16px; color: var(--ink-sub); }
.thanks-items { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 18px; font-weight: 700; }
.thanks-items li { display: flex; gap: 14px; align-items: center; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 20px; line-height: 1.5; }
.thanks-items__num { flex: none; font-family: var(--font-num); font-weight: 800; color: var(--orange-text); }

.thanks-links { padding-block: clamp(56px, 6vw, 70px) clamp(72px, 7vw, 90px); text-align: center; }
.thanks-links__lead { font-size: 18px; font-weight: 700; }
.thanks-links__btns { margin-top: 20px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.thanks-links .btn-sub { min-height: 54px; padding: 0 30px; font-size: 17px; }


/* ==========================================================================
   組み替え（タブレット：900px以下）
   ========================================================================== */
@media (max-width: 900px) {
	.contact-layout { grid-template-columns: 1fr; gap: 32px; }
	.contact-aside { position: static; }
	.thanks-before__inner { grid-template-columns: 1fr; gap: 28px; }

	/* 流れ：縦に並べ、点線も縦に */
	.flow { grid-template-columns: 1fr; gap: 24px; }
	.flow::before { left: 24px; right: auto; top: 26px; bottom: 26px; width: 3px; height: auto; background: repeating-linear-gradient(to bottom, var(--ink) 0 14px, transparent 14px 26px); }
	.flow li { display: grid; grid-template-columns: 52px 1fr; gap: 4px 18px; align-items: start; }
	.flow li .stop { grid-row: span 2; }
	.flow li h3 { padding-top: 10px; }
}


/* ==========================================================================
   組み替え（スマホ：767px以下）余裕を意識
   ========================================================================== */
@media (max-width: 767px) {
	.contact-head__free { margin-left: 0; font-size: 22px; }

	.contact-aside__box { padding: 22px 20px; }
	.contact-aside__title { font-size: 18px; }

	/* フォームの箱：左右の余白を詰めすぎない（中身の左右20px） */
	.contact-form { padding: 28px 20px; border-radius: 20px; }
	.wpcf7-form { gap: 26px; }
	.cf-row { grid-template-columns: 1fr; gap: 26px; }
	.cf-label { font-size: 16px; }
	/* 入力欄の文字は16px以上（iPhoneで入力時に画面が拡大されないように） */
	.wpcf7-form .wpcf7-text,
	.wpcf7-form .wpcf7-email,
	.wpcf7-form .wpcf7-tel,
	.wpcf7-form .wpcf7-textarea { font-size: 16px; }
	/* 選択肢は横幅いっぱい・1列（押しやすく） */
	.cf-choices .wpcf7-checkbox { flex-direction: column; }
	.cf-choices .wpcf7-list-item label { display: flex; width: 100%; }
	.cf-agree .wpcf7-list-item label { display: flex; width: 100%; }
	.cf-agree .wpcf7-list-item-label { flex: 1; }
	.wpcf7-form .wpcf7-submit { width: 100%; padding: 0 20px; }

	/* 送信完了 */
	.thanks-head .page-head__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
	.thanks-head .page-head__chara { display: block; width: 110px; order: -1; } /* 送信完了はお辞儀のキャラが主役なのでスマホでも出す */
	.thanks-head .page-head__lead { font-size: 17px; }
	.flow h3 { font-size: 19px; }
	.thanks-nomail { padding: 20px; gap: 12px; }
	.thanks-nomail__title { font-size: 17px; }
	.thanks-items { font-size: 16px; }
	.thanks-items li { padding: 14px 16px; }
	.thanks-links .btn-sub { width: 100%; }
}
