/*
 * Contact Form 7（/entry/ のカジュアル面談フォーム 882）。
 * 本番で効いていた次の CSS の「結果」を .wpcf7 の中だけに移したもの（他のページの input には効かせない）。
 *   - ewebot dist/css/base.css     input / select / textarea / button / table / label の既定
 *   - ewebot dist/css/cf7.css      CF7 の余白・応答メッセージ・エラー表示
 *   - gt3 の動的 CSS               入力欄の文字色・下線の色、送信ボタンのグラデーション
 *   - カスタマイザーの追加 CSS     .CF7_table / .CF7_req / .CF7_btn と送信ボタン（フォーム本文のクラス）
 * フォーム本文の <style>（.pmark-consent の同意欄）は CF7 のフォームのデータに入っているので、ここには書かない。
 * ブレークポイントは本番の追加 CSS どおり 768px（Elementor の 767px ではない）。
 */

/* ---- フォームの土台（cf7.css） ---- */
.wpcf7-form p {
	margin: 0;
	padding: 0;
	line-height: 1.5;
}

.wpcf7-form p br,
.wpcf7 .wpcf7-spinner {
	display: none;
}

.wpcf7 .wpcf7-form-control-wrap {
	position: relative;
	display: block;
	margin-bottom: 0;
}

.wpcf7-form label {
	position: relative;
	display: block;
	margin-top: 10px;
	margin-bottom: 10px;
	color: #304577;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"] {
	display: inline;
	margin: 3px;
	vertical-align: middle;
}

.wpcf7-form span.wpcf7-list-item {
	margin: 0 15px 0 0;
}

/* ---- 入力欄（base.css + gt3 の動的 CSS）。:where で詳細度を下げ、下の .CF7_table の指定を優先させる ---- */
.wpcf7-form :where(input[type="date"], input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], select, textarea) {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	height: 41px;
	margin: 0 0 15px;
	padding: 8px 0;
	border: none;
	border-bottom: 1px solid rgb(0 130 228 / 30%);
	border-radius: 0;
	outline: none;
	background: transparent;
	color: #54595f;
	font-family: "LINE Seed JP", sans-serif;
	font-size: 0.78em;
	font-weight: 400;
	line-height: 1.5;
	transition: all 0.3s;
}

.wpcf7-form :where(input[type="date"], input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], textarea) {
	appearance: none;
}

.wpcf7-form textarea {
	height: 111px;
	margin-bottom: 32px;
	padding-top: 10px;
	padding-bottom: 10px;
	resize: none;
}

.wpcf7-form ::placeholder {
	color: #54595f;
	opacity: 1;
}

.wpcf7-form :is(input, textarea):focus::placeholder {
	color: transparent !important;
}

/* ---- 表（base.css の table + 追加 CSS の .CF7_table） ---- */
.wpcf7-form table.CF7_table {
	width: 80%;
	margin: 0 auto;
	border: 1px solid #e5e5e5;
}

.CF7_table tr {
	border: 1px solid #f9f9f9;
	border-top-color: #e5e5e5;
}

.CF7_table :is(th, td) {
	padding: 5px 10px;
	text-align: left;
}

.CF7_table th {
	border-right: 1px solid #f5f6f7;
}

.CF7_table td {
	padding: 15px 15px 0;
}

.CF7_table :is(input, textarea) {
	padding: 10px;
	border: 1px solid #d8d8d8;
	background-color: #fff;
	font-size: 0.9em !important;
}

.CF7_table ::placeholder {
	color: #d8d8d8 !important;
	opacity: 1;
}

/* 数値と選択（追加 CSS。本番では全ページの input[type=number], select に効いていた） */
.wpcf7-form :is(input[type="number"], select) {
	max-width: 30%;
	padding: 8px;
	background-color: #fff;
	font-size: 0.9em;
}

/*
 * 選択欄の矢印は画像で描く（appearance: none）。
 * ブラウザ任せの矢印は、Chromium が矢印の箱の幅を OS のスクロールバーの幅から決めるため、macOS の
 * 「スクロールバーを表示: 自動」でマウスの有無によって 2px 動き、表示できる文字の幅も変わる（本番も同じ）。
 * 基準画像（従来型のスクロールバー）の矢印を写した画像（1x / 3x）を置き、どの環境でも同じ見た目にする。
 * 余白は既定の見た目のときにブラウザが内側に足していた分（左 4px・右 16px・上 1px）を足した値。
 * 詳しくは AGENTS.md「見た目の一致の進め方」。
 */
.wpcf7-form select.wpcf7-select {
	padding: 9px 24px 8px 12px;
	background: #fff url("../../images/form/select-arrow.png") no-repeat right 2px center / 12px 9px;
	background-image: image-set(url("../../images/form/select-arrow.png") 1x, url("../../images/form/select-arrow@3x.png") 3x);
	appearance: none;
}

/* 「必須」「任意」 */
.CF7_req,
.CF7_unreq {
	margin-right: 1em;
	padding: 7px;
	border-radius: 3px;
	background: #00a0d5;
	color: #fff;
	font-size: 0.8em;
}

.CF7_unreq {
	background: #bdbdbd;
}

@media screen and (min-width: 768px) {
	.CF7_table th {
		width: 30%;
		background-color: #ebedf5;
		font-size: 0.9em !important;
	}
}

@media screen and (max-width: 768px) {
	.wpcf7-form table.CF7_table {
		width: 95%;
	}

	.CF7_table :is(tr, td, th) {
		display: block;
		width: 100%;
		line-height: 2.5em;
	}

	.CF7_table th {
		background-color: #ebedf5;
	}
}

/* ---- 送信ボタン（base.css の input[type=submit] + gt3 のグラデーション + 追加 CSS） ---- */
.CF7_btn {
	text-align: center;
}

.wpcf7 input.wpcf7-submit {
	display: inline-block;
	width: auto;
	height: 50px;
	margin: 30px auto;
	padding: 10px 30px;
	border: 0;
	border-radius: 5px;
	outline: none;
	background-color: #f79034;
	background-image: linear-gradient(96deg, #89aff1 0%, #0082e4 51%, #89aff1 100%);
	background-size: 150% 100%;
	color: #fff;
	font-family: "LINE Seed JP", sans-serif;
	font-size: 1.2em;
	font-weight: 700;
	line-height: 23px;
	letter-spacing: 0.2px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.4s ease-in-out;
	appearance: none;
}

.wpcf7 input.wpcf7-submit:hover {
	background-position: 100% 150%;
}

.wpcf7 input.wpcf7-submit:disabled {
	cursor: not-allowed;
}

/* ---- 送信後のメッセージ・エラー（cf7.css） ---- */
.wpcf7 form div.wpcf7-response-output {
	position: relative;
	z-index: 1;
	margin: 1em 0;
	padding: 0.344em 1em 0.344em 50px !important;
	border: none;
	background-color: #255379;
	color: #fff;
	font-size: 12px;
}

.wpcf7 form div.wpcf7-response-output::before {
	content: "\f05a";
	position: absolute;
	top: 50%;
	left: 17px;
	display: inline-block;
	margin-top: -9px;
	font: normal normal normal 18px/1 FontAwesome;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
}

.wpcf7 form.invalid div.wpcf7-response-output,
.wpcf7 form.unaccepted div.wpcf7-response-output,
.wpcf7 form.failed div.wpcf7-response-output {
	background-color: #d61d1d;
}

.wpcf7 form.invalid div.wpcf7-response-output::before,
.wpcf7 form.unaccepted div.wpcf7-response-output::before,
.wpcf7 form.failed div.wpcf7-response-output::before {
	content: "\f057";
}

.wpcf7 form.sent div.wpcf7-response-output {
	background-color: #0fa55d;
}

.wpcf7 form.sent div.wpcf7-response-output::before {
	content: "\f058";
}

.wpcf7 span.wpcf7-not-valid-tip {
	padding-bottom: 5px;
	color: #d61d1d;
	font-size: 12px;
	font-weight: 400;
}
