/*
 * Nexus Forms — front end.
 *
 * Every value a site owner is likely to want to change reads from a CSS custom
 * property set on .nxf-form-wrap by the Style tab, with a fallback here so the
 * form still looks right if the variables never arrive.
 */
.nxf-form-wrap {
	margin: 0 0 1.5rem;
	max-width: var( --nxf-max-width, 100% );
	font-size: var( --nxf-font-size, 16px );
}
.nxf-fields {
	display: flex;
	flex-wrap: wrap;
	gap: var( --nxf-gap, 18px );
}
.nxf-field {
	flex: 1 1 100%;
	min-width: 0;
}
.nxf-width-half { flex: 1 1 calc( 50% - ( var( --nxf-gap, 18px ) / 2 ) ); }
.nxf-width-third { flex: 1 1 calc( 33.333% - ( var( --nxf-gap, 18px ) * 2 / 3 ) ); }
@media (max-width: 640px) {
	.nxf-width-half,
	.nxf-width-third { flex: 1 1 100%; }
}
.nxf-label {
	display: block;
	font-weight: var( --nxf-label-weight, 600 );
	margin-bottom: 0.4em;
	line-height: 1.35;
}
.nxf-required { color: #d92d20; }
.nxf-input {
	width: 100%;
	padding: var( --nxf-pad, 11px ) var( --nxf-pad-x, 14px );
	border: 1px solid var( --nxf-field-border, #d0d5dd );
	border-radius: var( --nxf-radius, 6px );
	background: var( --nxf-field-bg, #fff );
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.4;
	box-sizing: border-box;
	margin: 0;
}
.nxf-input:focus {
	outline: 2px solid var( --nxf-accent, #1570ef );
	outline-offset: 1px;
	border-color: var( --nxf-accent, #1570ef );
}
textarea.nxf-input { resize: vertical; min-height: 7em; }
input.nxf-file { padding: calc( var( --nxf-pad, 11px ) * 0.75 ); background: transparent; }
.nxf-choices { display: flex; flex-direction: column; gap: 0.5em; }
.nxf-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.55em;
	font-weight: 400;
	line-height: 1.4;
}
.nxf-choice input { margin-top: 0.25em; flex: none; }
.nxf-desc { margin-top: 0.4em; font-size: 0.875em; }
.nxf-help { color: #667085; display: block; margin-top: 0.35em; font-size: 0.875em; }
.nxf-error { color: #b42318; display: block; font-weight: 600; }
.nxf-has-error .nxf-input { border-color: #f04438; }
.nxf-heading { margin: 0.5em 0 0.25em; }
.nxf-heading-text p:last-child { margin-bottom: 0; }
.nxf-actions {
	margin-top: var( --nxf-gap, 18px );
	display: flex;
	justify-content: var( --nxf-btn-justify, flex-start );
}
.nxf-submit {
	appearance: none;
	border: 0;
	border-radius: var( --nxf-btn-radius, 6px );
	background: var( --nxf-accent, #1570ef );
	color: var( --nxf-accent-text, #fff );
	padding: calc( var( --nxf-pad, 11px ) + 1px ) calc( var( --nxf-pad-x, 14px ) * 1.8 );
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	width: var( --nxf-btn-width, auto );
	transition: filter 0.15s ease;
}
.nxf-submit:hover { filter: brightness( 0.92 ); }
.nxf-submit[disabled] { opacity: 0.6; cursor: default; }
.nxf-alert {
	padding: 0.9em 1.1em;
	border-radius: var( --nxf-radius, 6px );
	margin-bottom: 1em;
	border: 1px solid transparent;
}
.nxf-alert p:last-child { margin-bottom: 0; }
.nxf-alert-success { background: #ecfdf3; border-color: #abefc6; color: #085d3a; }
.nxf-alert-error { background: #fef3f2; border-color: #fecdca; color: #912018; }
.nxf-alert-notice { background: #fffaeb; border-color: #fedf89; color: #93370d; }

/*
 * The honeypot is also hidden with inline styles in the markup. This is the
 * second layer, not the only one.
 */
.nxf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
.nxf-field[hidden] { display: none !important; }
