/* =============================================================
 * NNG Legal Entity Request / Updates Form
 * Form-specific overrides on top of `forms-base.css`.
 * Mirrors the Feedback form's textarea + intro tweaks.
 * ============================================================= */

/* Intro paragraph above the first field. */
.nng-form.legal-entity-request-updates-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 so users have
 * room to describe the request / update. */
.nng-form.legal-entity-request-updates-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.legal-entity-request-updates-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 so the red border + tinted background actually paint. */
.nng-form.legal-entity-request-updates-form textarea[aria-invalid="true"] {
	border-color: var(--nng-color-error);
	background: var(--nng-color-error-bg);
}

/* Preliminary Information checkboxes: each option's label is a long
 * sentence ("Certificate of Formation from Secretary of State's
 * Office - This certificate is required..."), so stack them in a
 * single column at every viewport. A multi-column grid squeezes
 * each label onto 3+ lines and makes the red required-doc copy hard
 * to scan; one-per-row keeps every sentence on its own baseline. */
.nng-form.legal-entity-request-updates-form .preliminary-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	margin: 0 0 var(--nng-gap);
}

.nng-form.legal-entity-request-updates-form .preliminary-checkboxes > .form-row.checkbox-row {
	flex: 1 1 100%;
	max-width: 100%;
	margin: 0;
}

/* `.checkbox-label` is a `<label>` directly under `.form-row`, so the
 * shared `forms-base.css` rule
 *   .nng-form .form-row > label { flex: 0 0 18rem; max-width: 18rem; }
 * caps it at the label-column width (~288px). The preliminary-info
 * labels are long sentences and should also act as a full-width
 * click target, so widen them out to the row's full width here.
 * Scoped to `.preliminary-checkboxes` so we don't unintentionally
 * stretch standalone checkboxes elsewhere on the form. */
.nng-form.legal-entity-request-updates-form .preliminary-checkboxes .checkbox-label {
	flex: 1 1 100%;
	width: 100%;
	max-width: 100%;
	align-items: flex-start;
	min-height: 0;
	line-height: 1.4;
}

/* Narrow viewports only need the textarea override now that the
 * preliminary checkboxes are always single-column. */
@media (max-width: 720px) {

	.nng-form.legal-entity-request-updates-form textarea {
		max-width: 100%;
	}
}
