/*
 * Adminkeep contact form. The layout, plus a plain look for the fields that a theme can override:
 * the field rules sit inside :where(), which weighs nothing, so any theme or Custom CSS rule for
 * inputs wins. Many block themes (Twenty Twenty-Five among them) style no inputs at all, and the
 * browser's own are a thin line. The fields take the theme's font and colours through inherit and
 * currentColor, so they suit light and dark themes alike; the button's look is the theme's
 * (it carries wp-element-button for block themes). The status area gets .is-success or .is-error
 * after a send.
 */

.adminkeep-contact-form {
	max-width: 100%;
}

.adminkeep-contact-form *,
.adminkeep-contact-form *::before,
.adminkeep-contact-form *::after {
	box-sizing: border-box;
}

.adminkeep-contact-form__field {
	margin: 0 0 1.25em;
}

.adminkeep-contact-form__field label {
	display: block;
	margin: 0 0 0.35em;
}

.adminkeep-contact-form__field input,
.adminkeep-contact-form__field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
}

:where(.adminkeep-contact-form__field) :where(input, textarea) {
	margin: 0;
	padding: 0.6em 0.9em;
	font: inherit;
	line-height: 1.5;
	color: inherit;
	background: transparent;
	border: 1px solid;
	border-color: color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 2px;
	transition: border-color 0.15s ease;
}

:where(.adminkeep-contact-form__field) :where(textarea) {
	min-height: 9em;
	resize: vertical;
}

:where(.adminkeep-contact-form__field) :where(input, textarea):hover {
	border-color: color-mix(in srgb, currentColor 60%, transparent);
}

:where(.adminkeep-contact-form__field) :where(input, textarea):focus {
	border-color: currentColor;
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

:where(.adminkeep-contact-form__field) :where(input, textarea)[aria-invalid="true"] {
	border-color: #cc1818;
	outline-color: #cc1818;
}

:where(.adminkeep-contact-form__error) {
	color: #cc1818;
	font-size: 0.875em;
}

.adminkeep-contact-form__error {
	display: block;
	margin-top: 0.35em;
}

:where(.adminkeep-contact-form__submit):disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

:where(.adminkeep-contact-form__status.is-error) {
	color: #cc1818;
}

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

.adminkeep-contact-form__captcha:not(:empty) {
	margin: 0 0 1em;
}

.adminkeep-contact-form__status:not(:empty) {
	margin-top: 1em;
}
