/*
 * Contact Form 7 styles for TumugiyaDesign.
 * Mincho typography, monochrome palette and large accessible controls.
 */

.tdp-cf7 {
	--tdp-form-black: #111111;
	--tdp-form-gray: #666666;
	--tdp-form-muted: #858585;
	--tdp-form-line: #c8c8c8;
	--tdp-form-soft: #f7f7f7;
	--tdp-form-white: #ffffff;
	--tdp-form-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", "Times New Roman", serif;
	width: 100% !important;
	max-width: 920px !important;
	margin: clamp(36px, 6vw, 72px) auto 0 !important;
	padding: clamp(32px, 5vw, 60px) !important;
	border: 1px solid #dedede;
	background: var(--tdp-form-white);
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.045);
	color: var(--tdp-form-black);
	font-family: var(--tdp-form-serif);
	font-feature-settings: "palt" 1;
}

.tdp-cf7,
.tdp-cf7 *,
.tdp-cf7 *::before,
.tdp-cf7 *::after {
	box-sizing: border-box;
}

.tdp-cf7 p {
	margin: 0;
}

.tdp-cf7__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(28px, 5vw, 56px);
}

.tdp-cf7__field {
	display: block !important;
	width: 100%;
	margin: 0 0 clamp(36px, 5vw, 52px) !important;
	color: var(--tdp-form-black);
}

.tdp-cf7__heading {
	display: flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	min-height: 30px;
	margin: 0 0 13px !important;
	line-height: 1.5;
}

.tdp-cf7__heading > span {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.tdp-cf7__heading small {
	color: var(--tdp-form-muted);
	font-family: "Times New Roman", serif;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.14em;
}

.tdp-cf7__heading em {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	margin-left: auto;
	padding: 4px 7px;
	border: 1px solid var(--tdp-form-black);
	background: var(--tdp-form-black);
	color: var(--tdp-form-white);
	font-family: var(--tdp-form-serif);
	font-size: 10px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.08em;
}

.tdp-cf7 .wpcf7-form-control-wrap {
	display: block !important;
	width: 100% !important;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__control,
.wpcf7 .tdp-cf7 textarea.tdp-cf7__control {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border: 1px solid var(--tdp-form-line) !important;
	border-radius: 0 !important;
	outline: none !important;
	background: var(--tdp-form-soft) !important;
	box-shadow: none !important;
	color: var(--tdp-form-black) !important;
	font-family: var(--tdp-form-serif) !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
	letter-spacing: 0.02em;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__control {
	height: 62px !important;
	padding: 0 18px !important;
}

.wpcf7 .tdp-cf7 textarea.tdp-cf7__control {
	min-height: 230px !important;
	padding: 17px 18px !important;
	resize: vertical;
}

.tdp-cf7__control::placeholder {
	color: #777777 !important;
	opacity: 1;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__control:hover,
.wpcf7 .tdp-cf7 textarea.tdp-cf7__control:hover {
	border-color: #777777 !important;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__control:focus,
.wpcf7 .tdp-cf7 textarea.tdp-cf7__control:focus {
	border-color: var(--tdp-form-black) !important;
	background: var(--tdp-form-white) !important;
	box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.12) !important;
}

.tdp-cf7__submit-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__submit {
	width: min(340px, 100%) !important;
	min-height: 64px !important;
	margin: 0 !important;
	padding: 17px 30px !important;
	border: 1px solid var(--tdp-form-black) !important;
	border-radius: 0 !important;
	background: var(--tdp-form-black) !important;
	box-shadow: none !important;
	color: var(--tdp-form-white) !important;
	font-family: var(--tdp-form-serif) !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.5;
	letter-spacing: 0.14em;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__submit:hover,
.wpcf7 .tdp-cf7 input.tdp-cf7__submit:focus-visible {
	background: var(--tdp-form-white) !important;
	color: var(--tdp-form-black) !important;
}

.wpcf7 .tdp-cf7 input.tdp-cf7__submit:disabled {
	cursor: wait;
	opacity: 0.55;
}

.tdp-cf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 8px;
	color: var(--tdp-form-black);
	font-family: var(--tdp-form-serif);
	font-size: 12px;
	line-height: 1.6;
}

.wpcf7 .tdp-cf7 .wpcf7-not-valid {
	border-color: var(--tdp-form-black) !important;
	background: #eeeeee !important;
}

.tdp-cf7 + .wpcf7-response-output,
.wpcf7 form .tdp-cf7 ~ .wpcf7-response-output {
	margin: 30px 0 0 !important;
	padding: 17px 20px !important;
	border: 1px solid var(--tdp-form-black) !important;
	border-radius: 0 !important;
	font-family: var(--tdp-form-serif);
	font-size: 13px;
	line-height: 1.8;
}

.tdp-cf7__submit-wrap .wpcf7-spinner {
	position: absolute;
	top: 50%;
	left: calc(50% + 185px);
	margin: 0;
	background-color: var(--tdp-form-gray);
	transform: translateY(-50%);
}

@media (max-width: 700px) {
	.tdp-cf7 {
		margin-top: 30px !important;
		padding: 32px 20px 36px !important;
		box-shadow: none;
	}

	.tdp-cf7__row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.tdp-cf7__field {
		margin-bottom: 34px !important;
	}

	.tdp-cf7__heading > span {
		font-size: 16px;
	}

	.wpcf7 .tdp-cf7 input.tdp-cf7__control {
		height: 58px !important;
	}

	.wpcf7 .tdp-cf7 textarea.tdp-cf7__control {
		min-height: 200px !important;
	}

	.wpcf7 .tdp-cf7 input.tdp-cf7__submit {
		width: 100% !important;
	}

	.tdp-cf7__submit-wrap {
		flex-wrap: wrap;
	}

	.tdp-cf7__submit-wrap .wpcf7-spinner {
		position: static;
		margin: 16px 0 0 12px;
		transform: none;
	}
}

/* Hide the Twenty Twenty-Four footer only on /contact/. */
body.tumugiya-contact-page footer.wp-block-template-part,
body.tumugiya-contact-page .wp-site-blocks > footer {
	display: none !important;
}

/*
 * The reCAPTCHA badge may be hidden when the disclosure and policy links
 * included in contact-form-7-code.txt remain visible below the form.
 */
.grecaptcha-badge {
	visibility: hidden !important;
}

.tdp-cf7 .tdp-cf7__recaptcha-notice {
	margin: 24px auto 0 !important;
	color: #777777;
	font-family: var(--tdp-form-serif);
	font-size: 10px;
	font-weight: 400;
	line-height: 1.9;
	text-align: center;
}

.tdp-cf7__recaptcha-notice a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.tdp-cf7__recaptcha-notice a:hover,
.tdp-cf7__recaptcha-notice a:focus-visible {
	color: var(--tdp-form-black);
}
