/**
 * The contact form and the e-mail sign-up form (templates/simplified-contact-page.php,
 * templates/template-hans-mc-signup-page.php). Loaded on those two pages only, after the theme's stylesheet.
 * Fields match the theme's search box; the button is the theme's .ifl-button.
 */

.chinese-cf-form-box {
	max-width: 840px;
	margin-block: 1.5em;
	margin-inline: auto;
}

.chinese-cf-form-box--signup {
	max-width: none;
	padding-block: 1.5em;
	padding-inline: 5%;
	background: var(--wp--preset--color--page);
	border-radius: var(--wp--custom--radius--medium);
}

.chinese-cf-form-box__title {
	margin-block: 0 0.75em;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--charcoal);
}

.chinese-cf-form--signup {
	max-width: 560px;
}

.chinese-cf-form__row {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 16px;
}

@media (min-width: 600px) {
	.chinese-cf-form__row--halves {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.chinese-cf-form__row--thirds {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.chinese-cf-form__field {
	margin-block: 0 12px;
}

.chinese-cf-form input[type="text"],
.chinese-cf-form textarea {
	display: block;
	box-sizing: border-box;
	inline-size: 100%;
	min-height: 42px;
	padding: 11px 16px;
	border: 1px solid #bbb;
	border-radius: 3px;
	background: #fff;
	color: #333;
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
}

.chinese-cf-form textarea {
	resize: vertical;
}

.chinese-cf-form input[type="text"]:focus,
.chinese-cf-form textarea:focus {
	border-color: var(--wp--preset--color--blue);
	box-shadow: 0 0 0 1px var(--wp--preset--color--blue);
	outline: none;
}

.chinese-cf-form__field--check {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* "(必填)" above a required field; the phone field's spacer keeps its box level with the e-mail box beside it. */
.chinese-cf-form__required {
	display: block;
	margin-block-end: 2px;
	color: var(--wp--preset--color--red);
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 599px) {
	.chinese-cf-form__required--spacer {
		display: none;
	}
}

.chinese-cf-form__status {
	margin-block: 0 1em;
	color: var(--wp--preset--color--red);
	font-weight: 600;
}

.chinese-cf-form__status--success {
	color: var(--wp--preset--color--blue);
}

.chinese-cf-form__actions {
	display: flex;
	justify-content: center;
	margin-block-start: 8px;
}

.chinese-cf-form__actions--start {
	justify-content: flex-start;
}

.chinese-cf-form__submit {
	min-inline-size: 140px;
	font-size: var(--wp--preset--font-size--body);
}

.chinese-cf-form__terms {
	margin-block-start: 1.5em;
}
