/**
 * Neoly Employment Application — front-end styles.
 *
 * Scoped under .nef-wrap so nothing leaks into the Bizberg theme, and written
 * with high specificity on the basics that themes tend to override (inputs,
 * buttons, fieldsets, legends).
 */

.nef-wrap {
	--nef-accent: #17325e;
	--nef-accent-alt: #b3202e;
	--nef-ink: #1b2331;
	--nef-muted: #626b7a;
	--nef-line: #dde3ec;
	--nef-line-strong: #c3ccda;
	--nef-bg: #ffffff;
	--nef-bg-soft: #f6f8fb;
	--nef-error: #c0261f;
	--nef-radius: 10px;
	--nef-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px -12px rgba(16, 24, 40, .16);

	box-sizing: border-box;
	max-width: 940px;
	margin: 0 auto;
	color: var(--nef-ink);
	font-size: 16px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

.nef-wrap *,
.nef-wrap *::before,
.nef-wrap *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- shell */

.nef-form {
	background: var(--nef-bg);
	border: 1px solid var(--nef-line);
	border-radius: 14px;
	box-shadow: var(--nef-shadow);
	padding: 0;
	margin: 0;
	overflow: hidden;
}

.nef-head {
	padding: 30px 32px 24px;
	background: linear-gradient(135deg, var(--nef-accent) 0%, #0f2547 100%);
	color: #fff;
}

.nef-wrap .nef-head__title {
	margin: 0 0 8px;
	font-size: 1.875em;
	line-height: 1.25;
	font-weight: 700;
	color: #fff;
}

.nef-wrap .nef-head__intro {
	margin: 0;
	font-size: 1.0625em;
	line-height: 1.6;
	color: rgba(255, 255, 255, .82);
	max-width: 62ch;
}

/* ------------------------------------------------------------- progress */

.nef-progress {
	padding: 20px 32px 4px;
	border-bottom: 1px solid var(--nef-line);
	background: var(--nef-bg-soft);
}

.nef-progress__track {
	height: 4px;
	border-radius: 999px;
	background: #e2e8f1;
	overflow: hidden;
	margin-bottom: 16px;
}

.nef-progress__bar {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--nef-accent), var(--nef-accent-alt));
	transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.nef-progress__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 2px;
	list-style: none;
	margin: 0;
	padding: 0 0 16px;
}

.nef-progress__step {
	display: flex;
	align-items: center;
	gap: 7px;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nef-progress__step::before {
	content: none;
}

.nef-progress__dot {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1.5px solid var(--nef-line-strong);
	border-radius: 50%;
	background: #fff;
	color: var(--nef-muted);
	font-size: .8125em;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, border-color .2s, color .2s;
}

.nef-progress__dot:hover {
	border-color: var(--nef-accent);
	color: var(--nef-accent);
}

.nef-wrap .nef-progress__label {
	font-size: .8125em;
	font-weight: 600;
	color: var(--nef-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-right: 8px;
}

.nef-progress__step.is-active .nef-progress__dot {
	background: var(--nef-accent);
	border-color: var(--nef-accent);
	color: #fff;
}

.nef-progress__step.is-active .nef-progress__label {
	color: var(--nef-accent);
}

.nef-progress__step.is-done .nef-progress__dot {
	background: #e8f3ec;
	border-color: #47915f;
	color: #2f6b43;
}

.nef-progress__step.is-done .nef-progress__num::before {
	content: "\2713";
}

.nef-progress__step.is-done .nef-progress__num {
	font-size: 0;
}

.nef-progress__step.is-done .nef-progress__num::before {
	font-size: .875em;
}

/* ----------------------------------------------------------------- draft */

.nef-wrap .nef-draft {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0;
	padding: 12px 32px;
	background: #fff8e6;
	border-bottom: 1px solid #f1e2b8;
	font-size: .9375em;
	color: #6b5400;
}

.nef-wrap .nef-draft[hidden] {
	display: none;
}

.nef-draft__clear {
	background: none;
	border: 0;
	padding: 0;
	color: #8a6d00;
	font-size: .9375em;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* ----------------------------------------------------------------- steps */

.nef-steps {
	padding: 28px 32px 8px;
}

.nef-step[hidden] {
	display: none;
}

.nef-step__head {
	margin-bottom: 22px;
}

.nef-wrap .nef-step__eyebrow {
	margin: 0 0 4px;
	font-size: .8125em;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--nef-accent-alt);
}

.nef-wrap .nef-step__title {
	margin: 0 0 6px;
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nef-ink);
}

.nef-wrap .nef-step__blurb {
	margin: 0;
	font-size: 1em;
	color: var(--nef-muted);
	max-width: 70ch;
}

/* -------------------------------------------------------------- sections */

.nef-wrap .nef-section {
	border: 1px solid var(--nef-line);
	border-radius: var(--nef-radius);
	padding: 20px 20px 8px;
	margin: 0 0 20px;
	background: #fff;
	min-width: 0;
}

.nef-wrap .nef-section__title {
	display: block;
	float: none;
	width: auto;
	padding: 0 8px;
	margin: 0 0 2px -8px;
	font-size: .8125em;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--nef-accent);
	line-height: 1.4;
}

.nef-wrap .nef-section__note {
	margin: 0 0 14px;
	font-size: .875em;
	line-height: 1.55;
	color: var(--nef-muted);
}

/* ------------------------------------------------------------------ grid */

.nef-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 16px 14px;
	align-items: start;
}

.nef-field {
	min-width: 0;
	grid-column: span 12;
}

.nef-field[hidden] {
	display: none;
}

.nef-col-1  { grid-column: span 12; }
.nef-col-2  { grid-column: span 12; }
.nef-col-3  { grid-column: span 12; }
.nef-col-4  { grid-column: span 12; }
.nef-col-5  { grid-column: span 12; }
.nef-col-6  { grid-column: span 12; }
.nef-col-7  { grid-column: span 12; }
.nef-col-8  { grid-column: span 12; }
.nef-col-9  { grid-column: span 12; }
.nef-col-10 { grid-column: span 12; }
.nef-col-11 { grid-column: span 12; }
.nef-col-12 { grid-column: span 12; }

@media (min-width: 600px) {
	.nef-col-1  { grid-column: span 2; }
	.nef-col-2  { grid-column: span 3; }
	.nef-col-3  { grid-column: span 4; }
	.nef-col-4  { grid-column: span 6; }
	.nef-col-5  { grid-column: span 6; }
	.nef-col-6  { grid-column: span 6; }
	.nef-col-7  { grid-column: span 12; }
	.nef-col-8  { grid-column: span 12; }
	.nef-col-9  { grid-column: span 12; }
	.nef-col-10 { grid-column: span 12; }
	.nef-col-11 { grid-column: span 12; }
	.nef-col-12 { grid-column: span 12; }
}

@media (min-width: 860px) {
	.nef-col-1  { grid-column: span 1; }
	.nef-col-2  { grid-column: span 2; }
	.nef-col-3  { grid-column: span 3; }
	.nef-col-4  { grid-column: span 4; }
	.nef-col-5  { grid-column: span 5; }
	.nef-col-6  { grid-column: span 6; }
	.nef-col-7  { grid-column: span 7; }
	.nef-col-8  { grid-column: span 8; }
	.nef-col-9  { grid-column: span 9; }
	.nef-col-10 { grid-column: span 10; }
	.nef-col-11 { grid-column: span 11; }
	.nef-col-12 { grid-column: span 12; }
}

/* --------------------------------------------------------------- inputs */

.nef-wrap .nef-label {
	display: block;
	margin-bottom: 6px;
	font-size: .9375em;
	font-weight: 600;
	line-height: 1.35;
	color: #3c4553;
}

.nef-req {
	margin-left: 3px;
	color: var(--nef-accent-alt);
	text-decoration: none;
	border: 0;
	font-weight: 700;
}

.nef-wrap .nef-input,
.nef-wrap select.nef-input,
.nef-wrap textarea.nef-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 1em;
	line-height: 1.45;
	color: var(--nef-ink);
	background-color: #fff;
	background-image: none;
	border: 1px solid var(--nef-line-strong);
	border-radius: 8px;
	box-shadow: none;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	appearance: none;
	-webkit-appearance: none;
	min-height: 44px;
}

.nef-wrap textarea.nef-input {
	min-height: 84px;
	resize: vertical;
}

.nef-wrap select.nef-input {
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23626b7a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.nef-wrap .nef-input:focus {
	border-color: var(--nef-accent);
	box-shadow: 0 0 0 3px rgba(23, 50, 94, .14);
}

.nef-wrap .nef-input::placeholder {
	color: #9aa3b2;
	opacity: 1;
}

.nef-wrap .nef-input--sensitive {
	font-variant-numeric: tabular-nums;
	letter-spacing: .04em;
}

.nef-field.has-error .nef-input,
.nef-field.has-error .nef-radios,
.nef-field.has-error .nef-sig {
	border-color: var(--nef-error);
}

.nef-field.has-error .nef-input:focus {
	box-shadow: 0 0 0 3px rgba(192, 38, 31, .14);
}

.nef-wrap .nef-help {
	margin: 6px 0 0;
	font-size: .875em;
	line-height: 1.5;
	color: var(--nef-muted);
}

.nef-wrap .nef-error {
	margin: 6px 0 0;
	font-size: .875em;
	font-weight: 600;
	line-height: 1.45;
	color: var(--nef-error);
}

.nef-error[hidden] {
	display: none;
}

.nef-wrap .nef-note {
	margin: 0;
	padding: 13px 15px;
	font-size: .9375em;
	line-height: 1.65;
	color: #3f4856;
	background: var(--nef-bg-soft);
	border-left: 3px solid var(--nef-accent);
	border-radius: 0 8px 8px 0;
}

/* --------------------------------------------------------------- radios */

.nef-radios {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border: 1px solid transparent;
	border-radius: 8px;
}

.nef-wrap .nef-radio {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 14px 9px 12px;
	font-size: 1em;
	font-weight: 500;
	line-height: 1.35;
	color: var(--nef-ink);
	background: #fff;
	border: 1px solid var(--nef-line-strong);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s, background .15s, box-shadow .15s;
	min-height: 44px;
}

.nef-radio:hover {
	border-color: var(--nef-accent);
}

.nef-radio input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.nef-radio__mark {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	border: 2px solid var(--nef-line-strong);
	border-radius: 50%;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}

.nef-radio input:checked ~ .nef-radio__mark {
	border-color: var(--nef-accent);
	box-shadow: inset 0 0 0 3.5px #fff, inset 0 0 0 10px var(--nef-accent);
}

.nef-radio:has(input:checked) {
	border-color: var(--nef-accent);
	background: #f2f6fc;
}

.nef-radio input:focus-visible ~ .nef-radio__mark {
	box-shadow: 0 0 0 3px rgba(23, 50, 94, .2);
}

/* ------------------------------------------------------------ checkboxes */

.nef-wrap .nef-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0;
	padding: 12px 14px;
	font-size: 1em;
	font-weight: 500;
	line-height: 1.55;
	color: var(--nef-ink);
	background: #fff;
	border: 1px solid var(--nef-line-strong);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.nef-check:hover {
	border-color: var(--nef-accent);
}

.nef-check input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.nef-check__mark {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 2px solid var(--nef-line-strong);
	border-radius: 5px;
	background: #fff;
	color: transparent;
	transition: background .15s, border-color .15s, color .15s;
}

.nef-check input:checked ~ .nef-check__mark {
	background: var(--nef-accent);
	border-color: var(--nef-accent);
	color: #fff;
}

.nef-check:has(input:checked) {
	border-color: var(--nef-accent);
	background: #f2f6fc;
}

.nef-check input:focus-visible ~ .nef-check__mark {
	box-shadow: 0 0 0 3px rgba(23, 50, 94, .2);
}

.nef-check__text {
	min-width: 0;
}

/* ------------------------------------------------------------- signature */

.nef-sig {
	position: relative;
	border: 1px dashed var(--nef-line-strong);
	border-radius: 10px;
	background: repeating-linear-gradient(0deg, #fff, #fff 27px, #f0f3f8 27px, #f0f3f8 28px);
	overflow: hidden;
	touch-action: none;
}

.nef-sig__canvas {
	display: block;
	width: 100%;
	height: 150px;
	cursor: crosshair;
	touch-action: none;
}

.nef-sig__placeholder {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 1.0625em;
	font-weight: 600;
	color: #b3bcc9;
	pointer-events: none;
	letter-spacing: .02em;
}

.nef-sig.is-signed .nef-sig__placeholder {
	display: none;
}

.nef-wrap .nef-sig__clear {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 6px 12px;
	font-size: .875em;
	font-weight: 700;
	color: var(--nef-muted);
	background: rgba(255, 255, 255, .94);
	border: 1px solid var(--nef-line-strong);
	border-radius: 6px;
	cursor: pointer;
}

.nef-sig__clear:hover {
	color: var(--nef-accent-alt);
	border-color: var(--nef-accent-alt);
}

/* -------------------------------------------------------------- repeater */

.nef-repeater__head {
	display: none;
	gap: 10px;
	padding: 0 0 8px;
	font-size: .8125em;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--nef-muted);
}

.nef-repeater__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	padding: 12px;
	margin-bottom: 10px;
	background: var(--nef-bg-soft);
	border: 1px solid var(--nef-line);
	border-radius: 9px;
	align-items: center;
}

.nef-repeater__sn {
	font-size: .875em;
	font-weight: 700;
	color: var(--nef-muted);
}

@media (min-width: 700px) {
	.nef-repeater__head,
	.nef-repeater__row {
		display: grid;
		grid-template-columns: 32px minmax(0, 6fr) minmax(0, 4fr) minmax(0, 2fr) 38px;
		align-items: center;
	}

	.nef-repeater__row {
		background: #fff;
		padding: 8px;
	}

	.nef-repeater__row .nef-input {
		min-height: 40px;
		padding: 8px 10px;
	}
}

.nef-repeater__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--nef-muted);
	background: #fff;
	border: 1px solid var(--nef-line-strong);
	border-radius: 7px;
	cursor: pointer;
	justify-self: start;
}

.nef-repeater__remove:hover {
	color: var(--nef-accent-alt);
	border-color: var(--nef-accent-alt);
	background: #fff5f5;
}

.nef-wrap .nef-repeater__add {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 15px;
	font-size: .9375em;
	font-weight: 700;
	color: var(--nef-accent);
	background: #fff;
	border: 1.5px dashed var(--nef-line-strong);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.nef-repeater__add:hover {
	border-color: var(--nef-accent);
	background: #f2f6fc;
}

/* ------------------------------------------------------------ honeypot */

.nef-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* -------------------------------------------------------------- alerts */

.nef-wrap .nef-alert {
	margin: 0 32px 4px;
	padding: 13px 16px;
	font-size: .9375em;
	font-weight: 600;
	line-height: 1.55;
	border-radius: 9px;
}

.nef-alert[hidden] {
	display: none;
}

.nef-alert--error {
	color: #8c1a15;
	background: #fdf0ef;
	border: 1px solid #f3c9c6;
}

/* ------------------------------------------------------------ nav / btns */

.nef-nav {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 32px 26px;
	border-top: 1px solid var(--nef-line);
	background: var(--nef-bg-soft);
	margin-top: 12px;
}

.nef-nav__spacer {
	flex: 1 1 auto;
}

.nef-wrap .nef-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 12px 26px;
	font-family: inherit;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	border: 1.5px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, opacity .15s;
	min-height: 46px;
}

.nef-wrap .nef-btn[hidden] {
	display: none;
}

.nef-wrap .nef-btn--primary {
	color: #fff;
	background: var(--nef-accent);
	border-color: var(--nef-accent);
}

.nef-wrap .nef-btn--primary:hover {
	background: #0f2547;
	border-color: #0f2547;
	color: #fff;
}

.nef-wrap .nef-btn--ghost {
	color: var(--nef-accent);
	background: #fff;
	border-color: var(--nef-line-strong);
}

.nef-wrap .nef-btn--ghost:hover {
	border-color: var(--nef-accent);
}

.nef-wrap .nef-btn:disabled,
.nef-wrap .nef-btn.is-busy {
	opacity: .65;
	cursor: not-allowed;
}

.nef-spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nef-spin .7s linear infinite;
}

.nef-btn.is-busy .nef-spinner {
	display: inline-block;
}

@keyframes nef-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.nef-spinner { animation-duration: 2s; }
	.nef-progress__bar { transition: none; }
}

/* ------------------------------------------------------------- success */

.nef-success {
	padding: 52px 32px 56px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--nef-line);
	border-radius: 14px;
	box-shadow: var(--nef-shadow);
}

.nef-success[hidden] {
	display: none;
}

.nef-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 20px;
	color: #2f6b43;
	background: #e8f3ec;
	border-radius: 50%;
}

.nef-wrap .nef-success__title {
	margin: 0 0 10px;
	font-size: 1.5em;
	font-weight: 700;
	color: var(--nef-ink);
}

.nef-wrap .nef-success__text {
	margin: 0 auto;
	max-width: 56ch;
	font-size: 1.0625em;
	line-height: 1.65;
	color: var(--nef-muted);
}

.nef-wrap .nef-success__ref {
	display: inline-block;
	margin: 20px 0 0;
	padding: 9px 18px;
	font-size: .9375em;
	font-weight: 700;
	color: var(--nef-accent);
	background: var(--nef-bg-soft);
	border: 1px solid var(--nef-line);
	border-radius: 8px;
}

.nef-success__ref[hidden] {
	display: none;
}

/* ------------------------------------------------------------- narrow */

@media (max-width: 640px) {
	.nef-head,
	.nef-progress,
	.nef-steps,
	.nef-nav,
	.nef-draft {
		padding-left: 18px;
		padding-right: 18px;
	}

	.nef-alert {
		margin-left: 18px;
		margin-right: 18px;
	}

	.nef-head__title {
		font-size: 1.5em;
	}

	.nef-progress__label {
		display: none;
	}

	.nef-progress__dot {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.nef-progress__steps {
		gap: 6px;
		justify-content: space-between;
	}

	.nef-progress__step {
		flex: 0 0 auto;
	}

	.nef-wrap .nef-section {
		padding: 16px 14px 6px;
	}

	/* iOS Safari auto-zooms on focus when the field is under 16px. */
	.nef-wrap .nef-input,
	.nef-wrap select.nef-input,
	.nef-wrap textarea.nef-input {
		font-size: 16px;
	}

	.nef-nav {
		flex-wrap: wrap;
	}

	.nef-wrap .nef-btn {
		flex: 1 1 auto;
	}
}
