/* =====================================================================
   UWT Job Applications – form styles
   Built to match the UWT Charity theme: Nunito Sans, navy #082c5e and
   blue #0f6fa4, light-blue hero with soft circles, white pill labels,
   rounded cards with a thin blue top line, and gradient pill buttons.
   The theme's own type sizes (--uwt-*-size) are used when present.
   To switch these styles off: add_filter( 'uwt_ja_load_css', '__return_false' );
   ===================================================================== */

.uwt-ja,
.uwt-ja-section {
	--ja-navy: var(--uwt-primary, #082c5e);
	--ja-blue: var(--uwt-secondary, #0f6fa4);
	--ja-sky: #6cc8f1;
	--ja-ink: #0c2234;
	--ja-text: #34475c;
	--ja-muted: #5d7186; /* 4.9:1 on white, readable at small sizes */
	--ja-light: #f4f9fc;
	--ja-tint: #eaf6fd;
	--ja-chip: #f7fafc;
	--ja-line: #e2ebf1;
	--ja-line-2: #cfdde8;
	--ja-hair: rgba(8, 44, 94, .08);
	--ja-error: #c62828;
	--ja-ok: #1b8a5a;
	--ja-grad: linear-gradient(135deg, var(--ja-blue) 0%, var(--ja-navy) 100%);
	--ja-shadow: 0 20px 54px rgba(8, 44, 94, .08);
	--ja-ring: 0 0 0 4px rgba(15, 111, 164, .15);
}

.uwt-ja {
	max-width: 980px;
	margin: 0 auto;
	color: var(--ja-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	container: uwtja / inline-size;
}

.uwt-ja *,
.uwt-ja *::before,
.uwt-ja *::after { box-sizing: border-box; }

.uwt-ja [hidden] { display: none !important; }

.uwt-ja .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* =====================================================================
   Section: full-width light-blue hero, like the theme's vacancy pages
   ===================================================================== */

.uwt-ja-section {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	overflow: clip; /* "clip" also stops focus/scrolling from nudging the band sideways */
	width: 100vw;
	max-width: 100vw;
	margin: 0 calc(50% - 50vw) !important;
	padding: clamp(52px, 7vw, 88px) 0 clamp(56px, 7vw, 96px);
	background:
		radial-gradient(circle at 12% 12%, rgba(15, 111, 164, .16), transparent 26%),
		radial-gradient(circle at 92% 6%, rgba(15, 111, 164, .10), transparent 24%),
		linear-gradient(180deg, #f4f9fc 0%, #eef7fc 100%);
	color: var(--ja-text);
	font-family: inherit;
}

.uwt-ja-section::before,
.uwt-ja-section::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 520px;
	height: 520px;
	border-radius: 50%;
	background: rgba(15, 111, 164, .08);
	pointer-events: none;
}

.uwt-ja-section::before { top: -200px; right: -170px; }
.uwt-ja-section::after { bottom: -260px; left: -200px; background: rgba(15, 111, 164, .06); }

.uwt-ja-section *,
.uwt-ja-section *::before,
.uwt-ja-section *::after { box-sizing: border-box; }

.uwt-ja-section__inner {
	width: min(1340px, calc(100% - 32px));
	margin: 0 auto;
}

.uwt-ja-section__head {
	max-width: 760px;
	margin: 0 auto clamp(28px, 4vw, 44px);
	text-align: center;
}

.uwt-ja-section__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	margin: 0 0 18px !important;
	padding: 0 15px;
	border: 1px solid var(--ja-hair);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(8, 44, 94, .06);
	color: var(--ja-blue);
	font-size: var(--uwt-badge-size, 13px);
	font-weight: 700;
	text-transform: uppercase;
}

.uwt-ja-section__title {
	margin: 0 0 14px !important;
	padding: 0 !important;
	color: var(--ja-navy);
	font-size: var(--uwt-h1-size, clamp(32px, 4.4vw, 48px)) !important;
	font-weight: 800 !important;
	line-height: 1.125 !important;
	text-wrap: balance;
}

.uwt-ja-section__intro {
	max-width: 620px;
	margin: 0 auto !important;
	color: var(--ja-text);
	font-size: var(--uwt-lead-size, clamp(17px, 1.7vw, 20px));
	line-height: 1.5;
}

/* =====================================================================
   The card
   ===================================================================== */

.uwt-ja-form { margin: 0; }

.uwt-ja-card {
	position: relative;
	overflow: clip;
	border: 1px solid var(--ja-hair);
	border-radius: 30px;
	background: #fff;
	box-shadow: var(--ja-shadow);
}

/* ---------- Step tracker ---------- */

.uwt-ja-stepper {
	padding: 30px clamp(22px, 4.5vw, 48px) 0;
}

/* The card's thin top line doubles as the progress bar. */
.uwt-ja-stepper__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: var(--ja-tint);
}

.uwt-ja-stepper__bar span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 0 99px 99px 0;
	background: linear-gradient(90deg, var(--ja-blue), var(--ja-sky));
	transition: width .5s ease;
}

.uwt-ja-stepper__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	margin-bottom: 20px;
}

.uwt-ja-stepper__now {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0 !important;
}

.uwt-ja-stepper__count {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--ja-tint);
	color: var(--ja-blue);
	font-size: var(--uwt-badge-size, 13px);
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
}

.uwt-ja-stepper__current { color: var(--ja-ink); font-size: 16px; font-weight: 700; }

.uwt-ja-stepper__pct { color: var(--ja-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Numbered dots joined by a line */
.uwt-ja-steps {
	display: flex;
	margin: 0 !important;
	padding: 0 0 26px !important;
	border-bottom: 1px solid var(--ja-line);
	list-style: none !important;
	overflow-x: auto;
	scrollbar-width: none;
}

.uwt-ja-steps::-webkit-scrollbar { display: none; }

.uwt-ja-steps li {
	position: relative;
	flex: 1 1 0;
	min-width: 76px;
	margin: 0 !important;
	padding: 0 !important;
}

.uwt-ja-steps li::marker { content: none; }

/* connecting line */
.uwt-ja-steps li::before {
	content: "";
	position: absolute;
	top: 17px;
	left: calc(-50% + 22px);
	right: calc(50% + 22px);
	height: 2px;
	border-radius: 2px;
	background: var(--ja-line);
}

.uwt-ja-steps li:first-child::before { display: none; }
.uwt-ja-steps li:has(.is-done)::before,
.uwt-ja-steps li:has(.is-active)::before { background: linear-gradient(90deg, var(--ja-blue), var(--ja-sky)); }

.uwt-ja-steps__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 0 4px;
	border: 0;
	background: none;
	color: var(--ja-muted);
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.uwt-ja-steps__btn:focus-visible { outline: none; }
.uwt-ja-steps__btn:focus-visible .uwt-ja-steps__icon { box-shadow: var(--ja-ring); }

.uwt-ja-steps__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 2px solid var(--ja-line-2);
	border-radius: 50%;
	background: #fff;
	color: var(--ja-muted);
	font-size: 13px;
	font-weight: 800;
	transition: transform .2s, background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.uwt-ja-steps__icon svg { display: none; width: 16px; height: 16px; }

.uwt-ja-steps__label {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.uwt-ja-steps__btn:hover .uwt-ja-steps__icon { border-color: var(--ja-blue); color: var(--ja-blue); }

.uwt-ja-steps__btn.is-active { color: var(--ja-navy); font-weight: 800; }
.uwt-ja-steps__btn.is-active .uwt-ja-steps__icon {
	border-color: transparent;
	background: var(--ja-grad);
	color: #fff;
	box-shadow: 0 10px 22px rgba(8, 44, 94, .25);
	transform: scale(1.08);
}

.uwt-ja-steps__btn.is-done { color: var(--ja-ink); }
.uwt-ja-steps__btn.is-done .uwt-ja-steps__icon { border-color: var(--ja-ok); background: var(--ja-ok); color: #fff; }
.uwt-ja-steps__btn.is-done .i-done { display: block; }
.uwt-ja-steps__btn.is-done .i-num { display: none; }

.uwt-ja-steps__btn.is-error { color: var(--ja-error); }
.uwt-ja-steps__btn.is-error .uwt-ja-steps__icon { border-color: var(--ja-error); background: var(--ja-error); color: #fff; }
.uwt-ja-steps__btn.is-error .i-error { display: block; }
.uwt-ja-steps__btn.is-error .i-num,
.uwt-ja-steps__btn.is-error .i-done { display: none; }

.uwt-ja-steps__btn.is-locked { opacity: .45; cursor: not-allowed; }
.uwt-ja-steps__btn.is-locked:hover .uwt-ja-steps__icon { border-color: var(--ja-line-2); color: var(--ja-muted); }

/* ---------- Current step ---------- */

.uwt-ja-main {
	min-width: 0;
	padding: clamp(26px, 4vw, 44px) clamp(22px, 4.5vw, 48px) clamp(26px, 4vw, 40px);
}

.uwt-ja--js .uwt-ja-step { display: none; }
.uwt-ja--js .uwt-ja-step.is-active { display: block; animation: uwtJaIn .35s ease; }

@keyframes uwtJaIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

.uwt-ja-step__head { margin-bottom: 26px; }

/* The tracker already shows "Step x of y". */
.uwt-ja-step__count { display: none; }

.uwt-ja-step__title {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--ja-navy);
	font-size: clamp(26px, 3.2vw, 34px) !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	outline: none;
}

.uwt-ja-step__lead {
	margin: 8px 0 0 !important;
	color: var(--ja-text);
	font-size: var(--uwt-body-size, 17px);
}

.uwt-ja-intro {
	margin: 0 0 28px;
	color: var(--ja-text);
	font-size: 16px;
}

.uwt-ja-intro p { margin: 0 0 10px; }
.uwt-ja-intro p:last-child { margin-bottom: 0; }
.uwt-ja-intro strong { color: var(--ja-ink); }
.uwt-ja-intro a { color: var(--ja-blue); }

.uwt-ja-intro--notice {
	padding: 18px 22px;
	border: 1px solid #f1dfb0;
	border-radius: 20px;
	background: #fffaf0;
	color: #5c4a1e;
}

.uwt-ja-intro--notice strong { color: #4a3600; }

.uwt-ja-declaration { margin: 14px 0 0; padding-left: 22px; }
.uwt-ja-declaration li { margin-bottom: 10px; color: var(--ja-text); }

/* Privacy statement panel (like the theme's light CTA box) */
.uwt-ja-privacy {
	max-height: 420px;
	overflow-y: auto;
	padding: 8px 28px 24px;
	border: 1px solid var(--ja-hair);
	border-radius: 24px;
	background: var(--ja-light);
	color: var(--ja-text);
	font-size: 15.5px;
	scrollbar-width: thin;
}

.uwt-ja-privacy:focus-visible { outline: none; box-shadow: var(--ja-ring); }
.uwt-ja-privacy h3 { margin: 20px 0 8px !important; color: var(--ja-navy); font-size: 19px !important; font-weight: 800 !important; line-height: 1.35 !important; }
.uwt-ja-privacy h4 { margin: 18px 0 6px !important; color: var(--ja-navy); font-size: 16px !important; font-weight: 800 !important; }
.uwt-ja-privacy ul { margin: 0 0 10px; padding-left: 20px; }
.uwt-ja-privacy li { margin-bottom: 4px; }
.uwt-ja-privacy p { margin: 0 0 10px; }

/* =====================================================================
   Fields
   ===================================================================== */

.uwt-ja-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 0 18px;
}

.uwt-ja-w-full    { grid-column: span 12; }
.uwt-ja-w-half    { grid-column: span 6; }
.uwt-ja-w-third   { grid-column: span 4; }
.uwt-ja-w-quarter { grid-column: span 3; }
/* Start a new row but keep the field's normal width */
.uwt-ja-newrow.uwt-ja-w-half    { grid-column: 1 / span 6; }
.uwt-ja-newrow.uwt-ja-w-third   { grid-column: 1 / span 4; }
.uwt-ja-newrow.uwt-ja-w-quarter { grid-column: 1 / span 3; }

.uwt-ja-field { margin-bottom: 24px; }

.uwt-ja-label {
	display: block;
	margin: 0 0 9px;
	padding: 0;
	color: var(--ja-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.uwt-ja-field[data-key="address_2"],
.uwt-ja-field[data-key="address_3"] { margin-top: -14px; }

.uwt-ja-optional { color: var(--ja-muted); font-size: 14px; font-weight: 500; }

.uwt-ja-desc { margin: -4px 0 10px !important; color: var(--ja-muted); font-size: 14px; }

.uwt-ja-input {
	display: block;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 15px 18px;
	border: 1px solid var(--ja-line);
	border-radius: 18px;
	background-color: var(--ja-chip);
	color: var(--ja-ink);
	font: inherit;
	font-size: 16px;
	box-shadow: none;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.uwt-ja-input:hover { border-color: var(--ja-line-2); }

.uwt-ja-input:focus {
	outline: none;
	border-color: var(--ja-blue);
	background-color: #fff;
	box-shadow: var(--ja-ring);
}

textarea.uwt-ja-input { min-height: 140px; resize: vertical; line-height: 1.55; }

select.uwt-ja-input {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 50px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath fill='none' stroke='%230f6fa4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	cursor: pointer;
}

.uwt-ja-input::placeholder { color: #7e90a3; opacity: 1; }

.uwt-ja-field.has-error .uwt-ja-input { border-color: var(--ja-error); background-color: #fff8f8; }
.uwt-ja-field.has-error .uwt-ja-input:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, .12); }

.uwt-ja-error {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: var(--ja-error);
	font-size: 14px;
	font-weight: 600;
}

.uwt-ja-error::before {
	content: "";
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23c62828'/%3E%3Cpath d='M12 7v6m0 3.5v.5' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.uwt-ja-error:empty { display: none; }

.uwt-ja-counter { display: block; margin-top: 6px; color: var(--ja-muted); font-size: 13px; text-align: right; }

/* ---------- Choices: theme "chip" cards ---------- */

.uwt-ja-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.uwt-ja-fieldset legend { float: left; width: 100%; }
.uwt-ja-fieldset legend + * { clear: both; }

.uwt-ja-choices { display: flex; flex-wrap: wrap; gap: 10px; }

.uwt-ja-choice {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	min-height: 54px;
	margin: 0;
	padding: 12px 22px 12px 16px;
	border: 1px solid var(--ja-line);
	border-radius: 20px;
	background: var(--ja-chip);
	color: var(--ja-ink);
	font-weight: 600;
	cursor: pointer;
	transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

.uwt-ja-choice input {
	appearance: none;
	-webkit-appearance: none;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 2px solid var(--ja-line-2);
	border-radius: 50%;
	background: #fff;
	transition: border-color .2s, box-shadow .2s, background .2s;
}

.uwt-ja-choice input:checked { border-color: var(--ja-blue); background: var(--ja-blue); box-shadow: inset 0 0 0 4px #fff; }
.uwt-ja-choice:hover { border-color: rgba(15, 111, 164, .35); transform: translateY(-1px); }
.uwt-ja-choice:has(input:checked) { border-color: var(--ja-blue); background: var(--ja-tint); color: var(--ja-navy); box-shadow: 0 10px 22px rgba(8, 44, 94, .08); }
.uwt-ja-choice:has(input:focus-visible) { box-shadow: var(--ja-ring); }
.uwt-ja-field.has-error .uwt-ja-choice { border-color: var(--ja-error); }

/* ---------- Tick boxes ---------- */

.uwt-ja-check {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	padding: 18px 20px;
	border: 1px solid var(--ja-line);
	border-radius: 20px;
	background: var(--ja-chip);
	color: var(--ja-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	cursor: pointer;
	transition: border-color .2s, background .2s;
}

.uwt-ja-check input {
	appearance: none;
	-webkit-appearance: none;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin: 0;
	border: 2px solid var(--ja-line-2);
	border-radius: 8px;
	background: #fff center / 15px no-repeat;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}

.uwt-ja-check input:checked {
	border-color: transparent;
	background-color: var(--ja-blue);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.uwt-ja-check input:focus-visible { outline: none; box-shadow: var(--ja-ring); }
.uwt-ja-check:hover { border-color: rgba(15, 111, 164, .35); }
.uwt-ja-check:has(input:checked) { border-color: var(--ja-blue); background: var(--ja-tint); }
.uwt-ja-field.has-error .uwt-ja-check { border-color: var(--ja-error); background: #fff8f8; }

/* ---------- Vacancy details under the drop-down ---------- */

.uwt-ja-vacancy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-top: 12px;
	padding: 14px 16px 14px 20px;
	border: 1px solid var(--ja-hair);
	border-radius: 20px;
	background: var(--ja-light);
	color: var(--ja-ink);
	font-size: 15px;
	font-weight: 600;
}

.uwt-ja-vacancy__links { display: flex; flex-wrap: wrap; gap: 8px; }

.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link,
.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link:visited {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid rgba(15, 111, 164, .28);
	border-radius: 999px;
	background: #fff;
	color: var(--ja-navy) !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	box-shadow: 0 8px 18px rgba(8, 44, 94, .06);
	transition: background-color .2s, border-color .2s, box-shadow .2s;
}

.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link svg { flex-shrink: 0; color: var(--ja-blue); }

/* Hover keeps dark text on a light background, so it stays readable. */
.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link:hover,
.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link:focus-visible {
	border-color: var(--ja-blue);
	background: var(--ja-tint) !important;
	color: var(--ja-navy) !important;
	box-shadow: 0 10px 22px rgba(8, 44, 94, .10);
	outline: none;
}

.uwt-ja .uwt-ja-vacancy a.uwt-ja-vacancy__link:focus-visible { box-shadow: var(--ja-ring); }

/* ---------- File upload ---------- */

.uwt-ja-file { position: relative; display: block; margin: 0; cursor: pointer; }

.uwt-ja-file__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.uwt-ja-file__ui {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 160px;
	padding: 24px;
	border: 2px dashed var(--ja-line-2);
	border-radius: 24px;
	background: var(--ja-light);
	text-align: center;
	transition: border-color .2s, background .2s, box-shadow .2s;
}

.uwt-ja-file__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 8px;
	border-radius: 18px;
	background: var(--ja-grad);
	color: #fff;
	box-shadow: 0 12px 28px rgba(8, 44, 94, .22);
}

.uwt-ja-file__text {
	max-width: 100%;
	overflow: hidden;
	color: var(--ja-ink);
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.uwt-ja-file__hint { color: var(--ja-muted); font-size: 13.5px; }

.uwt-ja-file:hover .uwt-ja-file__ui,
.uwt-ja-file.is-drag .uwt-ja-file__ui { border-color: var(--ja-blue); background: var(--ja-tint); }
.uwt-ja-file:focus-within .uwt-ja-file__ui { border-color: var(--ja-blue); box-shadow: var(--ja-ring); }
.uwt-ja-file.has-file .uwt-ja-file__ui { border-style: solid; border-color: var(--ja-ok); background: #eef8f3; }
.uwt-ja-file.has-file .uwt-ja-file__icon { background: var(--ja-ok); box-shadow: 0 12px 28px rgba(27, 138, 90, .25); }
.uwt-ja-field.has-error .uwt-ja-file__ui { border-color: var(--ja-error); background: #fff8f8; }

/* ---------- Repeating blocks: like the theme's role cards ---------- */

.uwt-ja-repeater { margin-bottom: 24px; }
.uwt-ja-rows { display: grid; gap: 18px; }

.uwt-ja-row {
	position: relative;
	overflow: hidden;
	overflow: clip;
	padding: 24px 24px 2px;
	border: 1px solid #e1e9ef;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(8, 44, 94, .06);
}

.uwt-ja-row::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ja-blue), var(--ja-sky));
}

.uwt-ja-row__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.uwt-ja-row__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--ja-ink);
	font-size: 19px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}

.uwt-ja-row__num {
	display: inline-grid;
	place-items: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--ja-tint);
	color: var(--ja-blue);
	font-size: 13px;
	font-weight: 800;
}

.uwt-ja-row__remove {
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid #f3d6d6;
	border-radius: 999px;
	background: #fff;
	color: var(--ja-error);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
	transition: background .2s;
}

.uwt-ja .uwt-ja-row__remove:hover,
.uwt-ja .uwt-ja-row__remove:focus-visible { border-color: #e9b4b4; background: #fdf0f0; color: var(--ja-error); outline: none; }

.uwt-ja-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 58px;
	margin-top: 16px;
	padding: 10px 20px;
	border: 2px dashed var(--ja-line-2);
	border-radius: 20px;
	background: var(--ja-light);
	color: var(--ja-blue);
	font: inherit;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}

.uwt-ja .uwt-ja-add:hover,
.uwt-ja .uwt-ja-add:focus-visible { border-color: var(--ja-blue); background: var(--ja-tint); color: var(--ja-navy); outline: none; }

/* =====================================================================
   Buttons: theme gradient pills
   ===================================================================== */

.uwt-ja-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding-top: 26px;
	border-top: 1px solid var(--ja-line);
}

.uwt-ja-actions .uwt-ja-btn--primary { margin-left: auto; }

.uwt-ja-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 54px;
	min-width: 160px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: var(--uwt-button-size, 16px);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	text-decoration: none;
	cursor: pointer;
	transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
}

.uwt-ja-btn svg { flex-shrink: 0; transition: transform .2s; }

/* Every state sets its own colours, so other stylesheets' button:hover rules can't hide the text. */
.uwt-ja button.uwt-ja-btn--primary,
.uwt-ja button.uwt-ja-btn--primary:hover,
.uwt-ja button.uwt-ja-btn--primary:focus,
.uwt-ja button.uwt-ja-btn--primary:active {
	background: var(--ja-grad) !important;
	color: #fff !important;
	border: 0 !important;
}

.uwt-ja button.uwt-ja-btn--primary { box-shadow: 0 12px 28px rgba(8, 44, 94, .28); }
.uwt-ja button.uwt-ja-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(8, 44, 94, .32); }
.uwt-ja button.uwt-ja-btn--primary:hover svg { transform: translateX(3px); }

.uwt-ja button.uwt-ja-btn--ghost,
.uwt-ja button.uwt-ja-btn--ghost:focus,
.uwt-ja button.uwt-ja-btn--ghost:active {
	border: 1px solid rgba(8, 44, 94, .16) !important;
	background: #fff !important;
	color: var(--ja-navy) !important;
}

.uwt-ja button.uwt-ja-btn--ghost:hover {
	border: 1px solid rgba(15, 111, 164, .4) !important;
	background: var(--ja-tint) !important;
	color: var(--ja-navy) !important;
}

.uwt-ja button.uwt-ja-btn--ghost:hover svg { transform: translateX(-3px); }

.uwt-ja .uwt-ja-btn:focus-visible { outline: none; box-shadow: var(--ja-ring), 0 12px 28px rgba(8, 44, 94, .2); }
.uwt-ja .uwt-ja-btn:active { transform: translateY(0); }
.uwt-ja button.uwt-ja-btn:disabled,
.uwt-ja button.uwt-ja-btn:disabled:hover { opacity: .7; cursor: wait; transform: none; box-shadow: none; }

/* =====================================================================
   Review
   ===================================================================== */

.uwt-ja-review { display: grid; gap: 16px; margin-bottom: 8px; }

.uwt-ja-review__card {
	padding: 22px 24px;
	border: 1px solid var(--ja-hair);
	border-radius: 24px;
	background: var(--ja-light);
}

.uwt-ja-review__card.needs-attention { border-color: var(--ja-error); background: #fff7f7; }

.uwt-ja-review__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.uwt-ja-review__head h3 { margin: 0 !important; color: var(--ja-navy); font-size: 19px !important; font-weight: 800 !important; line-height: 1.3 !important; }

.uwt-ja-review__edit {
	min-height: 38px;
	padding: 0 18px;
	border: 1px solid var(--ja-hair);
	border-radius: 999px;
	background: #fff;
	color: var(--ja-blue);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(8, 44, 94, .06);
	transition: background .2s, color .2s;
}

.uwt-ja .uwt-ja-review__edit:hover,
.uwt-ja .uwt-ja-review__edit:focus-visible { border-color: var(--ja-blue); background: var(--ja-tint); color: var(--ja-navy); outline: none; }

.uwt-ja-review__sub { margin: 16px 0 2px !important; color: var(--ja-blue); font-size: 14px !important; font-weight: 800 !important; text-transform: uppercase; }

.uwt-ja-review__list { margin: 0; }

.uwt-ja-review__item {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 4px 20px;
	padding: 10px 0;
	border-bottom: 1px solid var(--ja-line);
	font-size: 15px;
}

.uwt-ja-review__list:last-child .uwt-ja-review__item:last-child { border-bottom: 0; }
.uwt-ja-review__item dt { color: var(--ja-muted); }
.uwt-ja-review__item dd { margin: 0; color: var(--ja-ink); white-space: pre-line; overflow-wrap: anywhere; }
.uwt-ja-review__item dd.is-missing { color: var(--ja-error); font-weight: 700; }

/* =====================================================================
   Messages
   ===================================================================== */

.uwt-ja-form-error {
	margin-bottom: 24px;
	padding: 16px 20px;
	border: 1px solid #f3d6d6;
	border-radius: 20px;
	background: #fff5f5;
	color: #8e1c1c;
	font-weight: 600;
}

.uwt-ja-notice {
	margin: 0;
	padding: 28px 32px;
	border: 1px solid var(--ja-hair);
	border-radius: 30px;
	background: #fff;
	color: var(--ja-navy);
	font-size: 17px;
	font-weight: 600;
	text-align: center;
	box-shadow: var(--ja-shadow);
}

.uwt-ja-success {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 48px);
	border: 1px solid var(--ja-hair);
	border-radius: 30px;
	background: #fff;
	box-shadow: var(--ja-shadow);
	text-align: center;
	outline: none;
}

.uwt-ja-success__icon {
	display: inline-grid;
	place-items: center;
	width: 76px;
	height: 76px;
	margin-bottom: 20px;
	border-radius: 24px;
	background: var(--ja-grad);
	color: #fff;
	box-shadow: 0 18px 42px rgba(8, 44, 94, .22);
}

.uwt-ja-success__title { margin: 0 0 10px !important; color: var(--ja-navy); font-size: clamp(26px, 3vw, 34px) !important; font-weight: 800 !important; line-height: 1.2 !important; }
.uwt-ja-success__text { max-width: 520px; margin: 0 auto; color: var(--ja-text); font-size: 17px; }

.uwt-ja.is-busy .uwt-ja-main { opacity: .7; pointer-events: none; }

/* Spam trap: hidden from people */
.uwt-ja-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   Phones: Back / Continue float at the bottom while a long step is on
   screen. The script adds .is-floating; the padding stops the page jumping.
   ===================================================================== */

.uwt-ja-step.is-floating { padding-bottom: var(--uwt-ja-actions-h, 90px); }

.uwt-ja-step.is-floating .uwt-ja-actions {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	margin: 0;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--ja-line);
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 -10px 30px rgba(8, 44, 94, .10);
	backdrop-filter: blur(8px);
	animation: uwtJaUp .2s ease;
}

@keyframes uwtJaUp {
	from { transform: translateY(100%); }
	to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.uwt-ja--js .uwt-ja-step.is-active,
	.uwt-ja-step.is-floating .uwt-ja-actions { animation: none; }
	.uwt-ja-stepper__bar span { transition: none; }
	.uwt-ja-btn,
	.uwt-ja-choice { transition: none; }
}

/* =====================================================================
   Responsive – follows the width the form has, not the screen,
   so it also works inside narrow page columns.
   ===================================================================== */

/* Tablets: the step names hide; the line above says which step you're on. */
@container uwtja (max-width: 760px) {
	.uwt-ja-card { border-radius: 24px; }
	.uwt-ja-steps li { min-width: 44px; }
	.uwt-ja-steps__label { display: none; }
	.uwt-ja-steps li::before { left: calc(-50% + 20px); right: calc(50% + 20px); }
	.uwt-ja-steps { padding-bottom: 22px !important; }
}

/* Phones */
@container uwtja (max-width: 600px) {
	.uwt-ja-stepper { padding: 22px 18px 0; }
	.uwt-ja-stepper__meta { margin-bottom: 16px; }
	.uwt-ja-stepper__current { font-size: 15px; }
	.uwt-ja-stepper__pct { display: none; } /* the bar along the top shows progress */
	.uwt-ja-steps {
		justify-content: flex-start;
		-webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
		mask-image: linear-gradient(90deg, #000 82%, transparent);
	}
	.uwt-ja-steps li { flex: 0 0 46px; min-width: 46px; }
	.uwt-ja-steps__icon { width: 32px; height: 32px; font-size: 12px; }
	.uwt-ja-steps li::before { top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); }

	.uwt-ja-main { padding: 22px 18px 0; }
	.uwt-ja-step__head { margin-bottom: 20px; }
	.uwt-ja-step__lead { font-size: 16px; }

	.uwt-ja-w-half,
	.uwt-ja-w-third,
	.uwt-ja-newrow.uwt-ja-w-half,
	.uwt-ja-newrow.uwt-ja-w-third { grid-column: 1 / -1; }
	.uwt-ja-newrow.uwt-ja-w-quarter { grid-column: 1 / span 6; }
	.uwt-ja-w-quarter { grid-column: span 6; }

	.uwt-ja-row { padding: 20px 16px 2px; border-radius: 20px; }
	.uwt-ja-choice { flex: 1 1 auto; }
	.uwt-ja-review__card { padding: 18px; border-radius: 20px; }
	.uwt-ja-review__item { grid-template-columns: minmax(0, 1fr); }
	.uwt-ja-privacy { padding: 6px 18px 18px; border-radius: 20px; }

	/* Tells the script to keep Back / Continue in reach */
	.uwt-ja-actions { --uwt-ja-float: 1; padding: 18px 0 22px; }
	.uwt-ja-btn { min-width: 0; flex: 1; padding: 0 18px; }
	.uwt-ja-btn--ghost { flex: 0 0 auto; }
	.uwt-ja-actions .uwt-ja-btn--primary { margin-left: 0; }
}

/* Small phones */
@container uwtja (max-width: 400px) {
	.uwt-ja-stepper { padding: 20px 14px 0; }
	.uwt-ja-main { padding: 20px 14px 0; }
	.uwt-ja-choice { flex-basis: 100%; }
	.uwt-ja-w-quarter { grid-column: span 12; }
	.uwt-ja-privacy { max-height: 360px; padding: 4px 14px 14px; }
	.uwt-ja-file__ui { min-height: 130px; padding: 18px; }
	.uwt-ja-btn--ghost { padding: 0 14px; }
}

@media (max-width: 600px) {
	.uwt-ja-section__inner { width: calc(100% - 24px); }
	.uwt-ja-section__head { margin-bottom: 24px; }
}

/* No white strip under the section: drop the bottom spacing that
   WordPress blocks and WPBakery add around the element holding the form. */
.uwt-ja-section + p:empty,
p:empty + .uwt-ja-section { display: none; }

:is(.wpb_text_column, .wpb_raw_code, .wpb_content_element, .wpb_wrapper, .vc_column-inner, .vc_column_container, .vc_row, .wp-block-shortcode, .wp-block-group, .entry-content, .uwt-entry-content):has(> .uwt-ja-section:last-child),
:is(.wpb_text_column, .wpb_raw_code, .wpb_content_element, .wpb_wrapper, .vc_column-inner, .vc_column_container, .vc_row):has(.uwt-ja-section) {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* =====================================================================
   Small details
   ===================================================================== */

/* Buttons: keep other stylesheets' generic button styles out */
.uwt-ja button {
	-webkit-tap-highlight-color: transparent;
	text-shadow: none;
	letter-spacing: 0;
	text-transform: none;
}

.uwt-ja button.uwt-ja-steps__btn,
.uwt-ja button.uwt-ja-steps__btn:hover,
.uwt-ja button.uwt-ja-steps__btn:focus {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

/* Links inside the privacy statement and notes */
.uwt-ja .uwt-ja-intro a,
.uwt-ja .uwt-ja-privacy a,
.uwt-ja .uwt-ja-check a {
	color: var(--ja-blue) !important;
	font-weight: 700;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.uwt-ja .uwt-ja-intro a:hover,
.uwt-ja .uwt-ja-privacy a:hover,
.uwt-ja .uwt-ja-check a:hover { color: var(--ja-navy) !important; }

/* Browser autofill keeps the field colours readable */
.uwt-ja .uwt-ja-input:-webkit-autofill,
.uwt-ja .uwt-ja-input:-webkit-autofill:hover,
.uwt-ja .uwt-ja-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--ja-ink);
	-webkit-box-shadow: 0 0 0 100px #fff inset;
	caret-color: var(--ja-ink);
	transition: background-color 9999s ease 0s;
}

/* Date fields: same height and left-aligned text on iPhone */
.uwt-ja input[type="date"].uwt-ja-input,
.uwt-ja input[type="month"].uwt-ja-input {
	-webkit-appearance: none;
	appearance: none;
	text-align: left;
}

.uwt-ja input[type="date"].uwt-ja-input::-webkit-date-and-time-value,
.uwt-ja input[type="month"].uwt-ja-input::-webkit-date-and-time-value { text-align: left; }

.uwt-ja input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }

/* Long vacancy titles don't push the arrow off the drop-down */
.uwt-ja select.uwt-ja-input { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Text selection in the form's colours */
.uwt-ja ::selection { background: rgba(15, 111, 164, .18); color: var(--ja-ink); }

/* Step names: a touch darker so they're easy to read */
.uwt-ja-steps__btn { color: #5d7186; }
.uwt-ja-steps__btn.is-locked .uwt-ja-steps__label { color: #8696a7; }

/* The vacancy box with no links still lines up nicely */
.uwt-ja-vacancy__meta:empty { display: none; }
.uwt-ja-vacancy__links:empty { display: none; }

/* Lock the colours of every small button in every state, so site-wide
   "button:hover" rules from other plugins can never make the text unreadable. */
.uwt-ja button.uwt-ja-review__edit,
.uwt-ja button.uwt-ja-review__edit:focus,
.uwt-ja button.uwt-ja-review__edit:active {
	border: 1px solid var(--ja-hair) !important;
	background: #fff !important;
	color: var(--ja-blue) !important;
}

.uwt-ja button.uwt-ja-review__edit:hover,
.uwt-ja button.uwt-ja-review__edit:focus-visible {
	border-color: var(--ja-blue) !important;
	background: var(--ja-tint) !important;
	color: var(--ja-navy) !important;
}

.uwt-ja button.uwt-ja-add,
.uwt-ja button.uwt-ja-add:focus,
.uwt-ja button.uwt-ja-add:active {
	border: 2px dashed var(--ja-line-2) !important;
	background: var(--ja-light) !important;
	color: var(--ja-blue) !important;
}

.uwt-ja button.uwt-ja-add:hover,
.uwt-ja button.uwt-ja-add:focus-visible {
	border-color: var(--ja-blue) !important;
	background: var(--ja-tint) !important;
	color: var(--ja-navy) !important;
}

.uwt-ja button.uwt-ja-row__remove,
.uwt-ja button.uwt-ja-row__remove:focus,
.uwt-ja button.uwt-ja-row__remove:active {
	border: 1px solid #f3d6d6 !important;
	background: #fff !important;
	color: var(--ja-error) !important;
}

.uwt-ja button.uwt-ja-row__remove:hover,
.uwt-ja button.uwt-ja-row__remove:focus-visible {
	border-color: #e9b4b4 !important;
	background: #fdf0f0 !important;
	color: var(--ja-error) !important;
}

.uwt-ja button.uwt-ja-steps__btn,
.uwt-ja button.uwt-ja-steps__btn:hover,
.uwt-ja button.uwt-ja-steps__btn:focus { color: #5d7186 !important; }
.uwt-ja button.uwt-ja-steps__btn.is-done { color: var(--ja-ink) !important; }
.uwt-ja button.uwt-ja-steps__btn.is-active { color: var(--ja-navy) !important; }
.uwt-ja button.uwt-ja-steps__btn.is-error { color: var(--ja-error) !important; }

/* reCAPTCHA: Google's floating badge would sit on top of the phone buttons, so it's
   hidden and the required notice is shown above the Submit button instead. */
body:has(.uwt-ja-recaptcha-note) .grecaptcha-badge { visibility: hidden !important; }

.uwt-ja-recaptcha-note {
	margin: 18px 0 0 !important;
	color: var(--ja-muted);
	font-size: 13px;
	line-height: 1.5;
}

.uwt-ja .uwt-ja-recaptcha-note a { color: var(--ja-blue) !important; text-decoration: underline !important; }

/* UK-only notice (shown when "My address is not in the UK" is ticked) */
.uwt-ja-alert {
	padding: 18px 22px;
	border: 1px solid #f1c7c7;
	border-radius: 20px;
	background: #fff5f5;
	color: #7a1f1f;
	font-size: 15.5px;
	line-height: 1.55;
}

.uwt-ja-alert strong { display: block; margin-bottom: 4px; color: #8e1c1c; font-size: 16.5px; }
.uwt-ja-type-html { margin-top: -8px; }
/* The notice below explains it, so the short error line isn't repeated. */
.uwt-ja-field[data-block].has-error .uwt-ja-error { display: none; }
