/*
 * Nolimit Forms — the form as a visitor sees it.
 *
 * Deliberately close to unstyled. A form plugin that imposes its own design
 * fights every theme it is installed into, and the first thing anybody does
 * is override it. Layout, spacing and states are here; colours and fonts are
 * inherited so the form looks like the site it is on.
 */

.nlfrm-form {
	display: block;
	margin: 0 0 1.5em;
}

.nlfrm-form .nlfrm-field {
	margin: 0 0 1.1em;
}

.nlfrm-form .nlfrm-label {
	display: block;
	margin-bottom: .3em;
	font-weight: 600;
}

.nlfrm-form .nlfrm-required {
	color: #a4243b;
	margin-left: .2em;
}

.nlfrm-form .nlfrm-input {
	width: 100%;
	box-sizing: border-box;
	padding: .55em .7em;
	border: 1px solid currentColor;
	border-color: rgba(0, 0, 0, .25);
	border-radius: 4px;
	font: inherit;
	color: inherit;
	background: transparent;
}

.nlfrm-form .nlfrm-input:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.nlfrm-form .nlfrm-description {
	margin: .3em 0 0;
	font-size: .875em;
	opacity: .75;
}

.nlfrm-form .nlfrm-error {
	margin: .3em 0 0;
	font-size: .875em;
	color: #a4243b;
	min-height: 0;
}

.nlfrm-form .nlfrm-field.has-error .nlfrm-input {
	border-color: #a4243b;
}

.nlfrm-form .nlfrm-choices {
	display: flex;
	flex-direction: column;
	gap: .35em;
}

.nlfrm-form .nlfrm-choice {
	display: flex;
	align-items: flex-start;
	gap: .5em;
	font-weight: 400;
}

.nlfrm-form .nlfrm-parts {
	display: flex;
	flex-wrap: wrap;
	gap: .6em;
}

.nlfrm-form .nlfrm-part {
	flex: 1 1 45%;
	display: flex;
	flex-direction: column;
}

.nlfrm-form .nlfrm-part label {
	font-size: .8em;
	opacity: .75;
	margin-bottom: .2em;
}

/* Width modifiers, applied by the builder. */

.nlfrm-form .nlfrm-page {
	display: none;
}

.nlfrm-form .nlfrm-page.is-current {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.2em;
}

.nlfrm-form .nlfrm-width-full {
	flex: 1 1 100%;
}

.nlfrm-form .nlfrm-width-half {
	flex: 1 1 calc(50% - .6em);
}

.nlfrm-form .nlfrm-width-third {
	flex: 1 1 calc(33.333% - .8em);
}

/* Steps ----------------------------------------------------------------- */

.nlfrm-form .nlfrm-steps {
	display: flex;
	gap: 1em;
	list-style: none;
	margin: 0 0 1.4em;
	padding: 0;
	font-size: .875em;
}

.nlfrm-form .nlfrm-step {
	opacity: .45;
	padding-bottom: .4em;
	border-bottom: 2px solid transparent;
}

.nlfrm-form .nlfrm-step.is-current {
	opacity: 1;
	border-bottom-color: currentColor;
	font-weight: 600;
}

.nlfrm-form .nlfrm-step.is-done {
	opacity: .75;
}

/* Rating ---------------------------------------------------------------- */

.nlfrm-form .nlfrm-rating {
	display: flex;
	gap: .15em;
	font-size: 1.6em;
	line-height: 1;
}

.nlfrm-form .nlfrm-star input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.nlfrm-form .nlfrm-star span[aria-hidden] {
	cursor: pointer;
	opacity: .3;
}

.nlfrm-form .nlfrm-star:hover span[aria-hidden],
.nlfrm-form .nlfrm-star:focus-within span[aria-hidden],
.nlfrm-form .nlfrm-star input:checked ~ span[aria-hidden] {
	opacity: 1;
}

/* Honeypot -------------------------------------------------------------- */

/*
 * Off-screen rather than display:none. A bot that parses CSS skips a hidden
 * input; one positioned off-screen still looks fillable, which is the whole
 * point. Human visitors never reach it — it is aria-hidden and tabindex=-1.
 */
.nlfrm-form .nlfrm-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Messages -------------------------------------------------------------- */

.nlfrm-form .nlfrm-messages:empty {
	display: none;
}

.nlfrm-form .nlfrm-messages {
	padding: .8em 1em;
	margin-bottom: 1em;
	border-left: 4px solid currentColor;
	border-radius: 3px;
}

.nlfrm-form .nlfrm-messages.is-success {
	color: #14622a;
	background: #edfaef;
}

.nlfrm-form .nlfrm-messages.is-error {
	color: #8a2424;
	background: #fcf0f1;
}

.nlfrm-form .nlfrm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6em;
	margin-top: 1.2em;
}

/* Buttons --------------------------------------------------------------- */

/*
 * 🔴 Zero specificity on purpose, and that is the whole design.
 *
 * Until 0.1.6 the buttons had no rules at all, so a visitor got the BROWSER'S
 * button — measured on garageristeriet.live: Arial 13px, #efefef, an outset
 * border, 36px high, and blue on a Mac. The theme's own buttons on the same
 * page are dark, 44px, uppercase.
 *
 * The primary buttons carry WordPress core's `wp-element-button` class, which
 * is what a theme styles, so on any block theme they match the site with no
 * work from us. This block is only the FALLBACK for a theme that does not: it
 * has to beat the browser's default and lose to everything else. `:where()`
 * contributes no specificity, so a theme rule as weak as a single class wins
 * without needing `!important`, and a fallback that could not be overridden
 * would be the very thing this file's header promises not to be.
 *
 * Colours are a plain dark on white rather than anything of ours: readable
 * (15:1) on a light page, and a site with its own palette overrides them.
 */
:where(.nlfrm-form .nlfrm-submit, .nlfrm-form .nlfrm-next, .nlfrm-form .nlfrm-prev) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: .6em 1.6em;
	border: 1px solid transparent;
	border-radius: 4px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: #1d2327;
	-webkit-appearance: none;
	appearance: none;
}

/* Back is the quiet one: same shape, drawn in the page's own text colour. */
:where(.nlfrm-form .nlfrm-prev) {
	color: inherit;
	background: transparent;
	border-color: currentColor;
}

/*
 * Behaviour, not appearance — these hold whatever the theme does, so they use
 * real specificity. `[hidden]` is the one that matters: a `display` above beats
 * the browser's own `[hidden] { display: none }`, so without this the Back
 * button would stand on page one of a multi-step form and Send would show
 * before the last page.
 */
.nlfrm-form .nlfrm-submit,
.nlfrm-form .nlfrm-next,
.nlfrm-form .nlfrm-prev {
	cursor: pointer;
}

.nlfrm-form .nlfrm-submit[hidden],
.nlfrm-form .nlfrm-next[hidden],
.nlfrm-form .nlfrm-prev[hidden] {
	display: none !important;
}

.nlfrm-form .nlfrm-submit:hover:not(:disabled),
.nlfrm-form .nlfrm-next:hover:not(:disabled),
.nlfrm-form .nlfrm-prev:hover:not(:disabled) {
	opacity: .88;
}

.nlfrm-form .nlfrm-submit:focus-visible,
.nlfrm-form .nlfrm-next:focus-visible,
.nlfrm-form .nlfrm-prev:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* form.js sets `disabled` while a submission is in flight. */
.nlfrm-form .nlfrm-submit:disabled,
.nlfrm-form .nlfrm-next:disabled {
	opacity: .6;
	cursor: progress;
}

.nlfrm-form .nlfrm-captcha {
	margin: 1em 0;
}

.nlfrm-notice {
	padding: .8em 1em;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
}
