/* =============================================================
 * NNG HCA Feedback Form
 * Form-specific overrides on top of `forms-base.css`.
 * Cloned from `feedback-form.css`; tweak independently as the
 * HCA variant diverges.
 * ============================================================= */

/* Intro paragraph above the first field. */
.nng-form.hca-feedback-form .form-intro {
	margin: 0;
	padding: 0.5rem 0 0.25rem;
	color: var(--nng-color-text);
	font-size: var(--nng-font-size);
	line-height: var(--nng-line-height);
}

/* Multi-line message field gets a wider, taller box. */
.nng-form.hca-feedback-form textarea {
	flex: 1 1 28rem;
	min-width: 0;
	max-width: 40rem;
	min-height: 8rem;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--nng-color-text);
	background: var(--nng-color-bg);
	border: 1px solid var(--nng-color-border-strong);
	border-radius: var(--nng-radius-sm);
	resize: vertical;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.nng-form.hca-feedback-form textarea:focus-visible {
	outline: 3px solid var(--nng-color-focus);
	outline-offset: 2px;
	border-color: var(--nng-color-focus);
}

/* Error state - matches selector specificity of the base textarea rule
 * above so the red border + tinted background actually paint. */
.nng-form.hca-feedback-form textarea[aria-invalid="true"] {
	border-color: var(--nng-color-error);
	background: var(--nng-color-error-bg);
}

@media (max-width: 720px) {

	.nng-form.hca-feedback-form textarea {
		max-width: 100%;
	}
}
