/* Contact form styles, scoped to the form class so nothing else is affected. */

/* Form container: stack the fields with consistent spacing. */
.kh-contact-form {
	display: grid;
	gap: 16px;
	max-width: 640px;
}

/* Each field wraps a label, a control and an error line. */
.kh-contact-form__field {
	display: grid;
	gap: 6px;
}

/* Labels stay readable and clearly tied to their control. */
.kh-contact-form__field label {
	font-weight: 600;
}

/* Controls fill the width and use a comfortable touch height. */
.kh-contact-form__field input,
.kh-contact-form__field textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	box-sizing: border-box;
}

/* Invalid controls get a clear red outline. */
.kh-contact-form__field [aria-invalid="true"] {
	border-color: #d63638;
}

/* Field errors reserve no space until they contain text. */
.kh-contact-form__error {
	margin: 0;
	color: #d63638;
	font-size: 13px;
}

.kh-contact-form__error:empty {
	display: none;
}

/* Honeypot is moved off screen instead of display none so naive bots still fill it. */
.kh-contact-form__trap {
	position: absolute;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Submit button keeps a comfortable touch height. */
.kh-contact-form__submit {
	min-height: 48px;
	cursor: pointer;
}

/* Busy button looks inactive while the request runs. */
.kh-contact-form__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Status line shows the overall result and stays hidden when empty. */
.kh-contact-form__status {
	margin: 0;
	font-weight: 600;
}

.kh-contact-form__status:empty {
	display: none;
}

.kh-contact-form__status[data-state="success"] {
	color: #1a7f37;
}

.kh-contact-form__status[data-state="error"] {
	color: #d63638;
}
