/**
 * cf7-style.css
 * Contact Form 7 スタイル
 * ★ CF7の class: 指定に頼らず、要素セレクタで強制適用
 */


/* --- tmpl_form_rows の上線を除去（CF7内では不要） --- */
.tmpl_form_wrap .tmpl_form_rows {
	border-top: none;
}

/* --- CF7ラッパー幅制御 --- */
.tmpl_form_field .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}
.tmpl_form_select_wrap .wpcf7-form-control-wrap {
	display: block;
}

/* --- テキスト入力 = tmpl_form_input --- */
.tmpl_form_field input[type="text"],
.tmpl_form_field input[type="email"],
.tmpl_form_field input[type="tel"],
.tmpl_form_field input[type="url"],
.tmpl_form_field input[type="number"] {
	width: 100%;
	padding: 12px 16px;
	font-size: 1rem;
	color: #333;
	background: #f5f6f7;
	border: none;
	border-radius: 6px;
	outline: none;
	font-family: inherit;
	transition: background 0.2s;
	box-sizing: border-box;
}
.tmpl_form_field input[type="text"]:focus,
.tmpl_form_field input[type="email"]:focus,
.tmpl_form_field input[type="tel"]:focus {
	background: #edf0fa;
}

/* --- テキストエリア = tmpl_form_textarea --- */
.tmpl_form_field textarea {
	width: 100%;
	padding: 14px 16px;
	font-size: 1rem;
	color: #333;
	background: #f5f6f7;
	border: none;
	border-radius: 6px;
	outline: none;
	font-family: inherit;
	resize: vertical;
	min-height: 160px;
	line-height: 1.8;
	transition: background 0.2s;
	box-sizing: border-box;
}
.tmpl_form_field textarea:focus {
	background: #edf0fa;
}

/* --- セレクト = tmpl_form_select --- */
.tmpl_form_select_wrap select,
.tmpl_form_field select {
	padding: 12px 44px 12px 16px;
	font-size: 1rem;
	color: #333;
	background: #f5f6f7;
	border: none;
	border-radius: 6px;
	outline: none;
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	min-width: 240px;
	box-sizing: border-box;
}
.tmpl_form_select_wrap select:focus,
.tmpl_form_field select:focus {
	background: #edf0fa;
}
.tmpl_form_select_wrap {
	position: relative;
	display: inline-block;
}
.tmpl_form_select_wrap::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	width: 10px;
	height: 6px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='%23333'/%3E%3C/svg%3E") no-repeat center center;
	background-size: contain;
	pointer-events: none;
}

/* --- ファイル添付 --- */
.tmpl_form_field input[type="file"] {
	width: 100%;
	padding: 10px;
	background: #f5f6f7;
	border: none;
	border-radius: 6px;
	font-size: 0.9375rem;
	font-family: inherit;
	box-sizing: border-box;
}

/* --- ラジオ・チェック --- */
.tmpl_form_field .wpcf7-radio,
.tmpl_form_field .wpcf7-checkbox,
.tmpl_form_field .wpcf7-acceptance {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
	padding-top: 8px;
}
.tmpl_form_field .wpcf7-list-item {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
	color: #333;
	cursor: pointer;
}
.tmpl_form_field .wpcf7-list-item input[type="radio"],
.tmpl_form_field .wpcf7-list-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #56ace1;
	cursor: pointer;
	flex-shrink: 0;
}

/* --- 送信ボタン = tmpl_form_submit --- */
.tmpl_form_submit_wrap input[type="submit"],
.tmpl_form_submit_wrap .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #edf0fa;
	border: none;
	border-radius: 50px;
	padding: 20px 60px;
	font-size: 1.125rem;
	font-weight: 500;
	color: #1a2353;
	cursor: pointer;
	font-family: inherit;
	letter-spacing: 0.05em;
	transition: background 0.3s, color 0.3s;
	min-width: 280px;
}
.tmpl_form_submit_wrap input[type="submit"]:hover,
.tmpl_form_submit_wrap .wpcf7-submit:hover {
	background: #1a2353;
	color: #fff;
}

/* --- バリデーションエラー --- */
.tmpl_form_wrap .wpcf7-not-valid-tip {
	color: #e05050;
	font-size: 0.8125rem;
	margin-top: 6px;
	display: block;
}
.tmpl_form_wrap .wpcf7-not-valid {
	background: #fef2f2 !important;
	box-shadow: inset 0 0 0 1px #e05050;
}

/* --- 送信結果メッセージ --- */
.tmpl_form_wrap .wpcf7-response-output {
	border: none !important;
	border-radius: 8px;
	padding: 16px 24px;
	margin: 24px 0 0;
	font-size: 0.9375rem;
	text-align: center;
}
.wpcf7 form.sent .wpcf7-response-output {
	background: #f0fdf4;
	color: #166534;
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
	background: #fef2f2;
	color: #991b1b;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
	background: #fffbeb;
	color: #92400e;
}
.tmpl_form_wrap .wpcf7-spinner {
	margin: 16px auto 0;
	display: block;
}

/* --- 横並び行 --- */
.tmpl_form_row--inline {
	display: flex;
	gap: 24px;
}
.tmpl_form_row--inline .tmpl_form_row_half {
	flex: 1;
	padding: 30px 0;
}
.tmpl_form_row--inline .tmpl_form_row_half .tmpl_form_label_wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.tmpl_form_row--inline .tmpl_form_row_half .tmpl_form_label {
	font-size: 1rem;
	color: #1a2353;
	font-weight: 400;
}

/* --- SP --- */
@media screen and (max-width: 768px) {
	.tmpl_form_row--inline {
		flex-direction: column;
		gap: 0;
	}
	.tmpl_form_row--inline .tmpl_form_row_half {
		padding: 20px 0;
		border-bottom: 2px solid #e3e3e6;
	}
	.tmpl_form_field select {
		min-width: 0;
		width: 100%;
	}
	.tmpl_form_field input[type="text"],
	.tmpl_form_field input[type="email"],
	.tmpl_form_field input[type="tel"],
	.tmpl_form_field textarea,
	.tmpl_form_field select {
		font-size: 3.8vw;
	}
	.tmpl_form_submit_wrap input[type="submit"] {
		font-size: 4.5vw;
		padding: 18px 40px;
		min-width: 0;
		width: 80%;
	}
	.tmpl_form_field .wpcf7-radio,
	.tmpl_form_field .wpcf7-checkbox {
		gap: 20px;
	}
	.tmpl_form_field .wpcf7-list-item {
		font-size: 3.8vw;
	}
}
