/**
 * Booking form (front end).
 *
 * Everything is scoped under .wpjab and every element it owns carries a class,
 * so no rule here leaks into the theme and — just as importantly — the theme's
 * own `input {}` / `button {}` rules are overridden explicitly rather than by
 * accident. Notarius and Elementor both style bare form elements, so the local
 * reset below is load-bearing, not decorative.
 */

.wpjab {
	/* Restyle by overriding these on .wpjab from the theme or a code snippet. */
	--wpjab-fg: #16202c;
	--wpjab-muted: #5d6b7a;
	--wpjab-accent: #1c4f8b;
	--wpjab-accent-fg: #ffffff;
	--wpjab-line: #d6dde5;
	--wpjab-placeholder: #9aa5b1;
	--wpjab-focus: #1c4f8b;
	--wpjab-error: #b32020;
	--wpjab-surface: #ffffff;
	--wpjab-surface-2: #f4f7fa;
	--wpjab-radius: 10px;
	--wpjab-max: 46rem;

	position: relative;
	display: flex;
	flex-direction: column;
	/* dvh, not vh: on mobile Safari 100vh sits under the browser chrome and
	   pushes the bottom of the form off screen. */
	min-height: 100dvh;
	box-sizing: border-box;
	color: var(--wpjab-fg);
	background: var(--wpjab-surface);
	font-size: 17px;
	line-height: 1.5;
}

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

/* Themes routinely restyle bare headings — Notarius uppercases them with extra
   letter-spacing. Our questions are written in sentence case on purpose, so the
   theme's treatment has to be undone rather than worked around. */
.wpjab h1,
.wpjab h2,
.wpjab h3 {
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
}

/* The WordPress admin bar sits above the page for logged-in users, so a full
   100dvh form overflows by exactly its height and the page picks up a small
   scroll. Subtract it so the form fits the space it actually has. */
body.admin-bar .wpjab {
	min-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .wpjab {
		min-height: calc(100dvh - 46px);
	}
}

/* -------------------------------------------------------------------------
   Progress
   ------------------------------------------------------------------------- */

.wpjab__progress {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem clamp(1rem, 5vw, 3rem);
	background: var(--wpjab-surface);
}

.wpjab__progress-track {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: var(--wpjab-line);
	overflow: hidden;
}

.wpjab__progress-bar {
	width: 0;
	height: 100%;
	border-radius: 2px;
	background: var(--wpjab-accent);
	transition: width 240ms ease;
}

.wpjab__progress-count {
	flex: none;
	font-size: 0.8125rem;
	color: var(--wpjab-muted);
	font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
   Viewport + slides
   ------------------------------------------------------------------------- */

.wpjab__viewport {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Extra room at the bottom so the fixed step arrows never sit on top of a
	   long answer. */
	padding: clamp(1.5rem, 6vw, 4rem) clamp(1rem, 5vw, 3rem) clamp(5rem, 10vw, 7rem);
	overflow: hidden;
}

.wpjab-screen,
.wpjab-q {
	width: 100%;
	max-width: var(--wpjab-max);
	margin: 0 auto;
}

.wpjab-screen[hidden],
.wpjab-q[hidden] {
	display: none;
}

.wpjab-screen__inner,
.wpjab-q__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Enter/exit animation. Direction is set by the stepper so going back slides
   the opposite way, which is what makes the movement feel like a position in a
   sequence rather than a page swap. */
@media (prefers-reduced-motion: no-preference) {
	.wpjab-q--enter,
	.wpjab-screen--enter {
		animation: wpjab-in 260ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
	}

	.wpjab-q--enter-back,
	.wpjab-screen--enter-back {
		animation: wpjab-in-back 260ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
	}
}

@keyframes wpjab-in {
	from {
		opacity: 0;
		transform: translateY(28px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes wpjab-in-back {
	from {
		opacity: 0;
		transform: translateY(-28px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* -------------------------------------------------------------------------
   Question chrome
   ------------------------------------------------------------------------- */

.wpjab-q__label {
	display: flex;
	align-items: baseline;
	gap: 0.65rem;
	margin: 0;
	font-size: clamp(1.35rem, 3.2vw, 1.75rem);
	/* Typeform sets its questions in a regular weight — the size carries the
	   emphasis, so bolding as well makes it shout. */
	font-weight: 400;
	line-height: 1.35;
	color: var(--wpjab-fg);
}

/* The question's position in the sequence. Set by the stepper, because
   conditional skips mean the number is not known until run time. */
.wpjab-q__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	min-width: 1.55rem;
	height: 1.35rem;
	padding: 0 0.3rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wpjab-accent-fg);
	background: var(--wpjab-accent);
	border-radius: 4px;
	transform: translateY(-0.15em);
}

.wpjab-q__number:empty {
	display: none;
}

.wpjab-q__required {
	color: var(--wpjab-fg);
	opacity: 0.55;
}

.wpjab-q__help {
	margin: -0.35rem 0 0;
	padding-left: 2.2rem;
	font-size: 0.95rem;
	color: var(--wpjab-muted);
}

.wpjab-q__field {
	margin-top: 0.9rem;
	padding-left: 2.2rem;
}

.wpjab-q__error {
	padding-left: 2.2rem;
}

/* Explanatory copy under a field. Set small and muted — it is reference
   material for the client who needs it, not part of the question. */
.wpjab-q__note {
	margin-top: 0.9rem;
	padding-left: 2.2rem;
	max-width: 42rem;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--wpjab-muted);
}

.wpjab-q__note p {
	margin: 0 0 0.6rem;
}

.wpjab-q__note p:last-child {
	margin-bottom: 0;
}

.wpjab .wpjab-q__note a {
	color: var(--wpjab-accent);
	text-decoration: underline;
}

.wpjab-q__ok {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 0.75rem;
	padding-left: 2.2rem;
}

.wpjab-q__ok[hidden] {
	display: none;
}

.wpjab-q__hint {
	font-size: 0.8125rem;
	color: var(--wpjab-muted);
}

@media (max-width: 34rem) {
	.wpjab-q__help,
	.wpjab-q__field,
	.wpjab-q__error,
	.wpjab-q__note,
	.wpjab-q__ok {
		padding-left: 0;
	}

	/* The hint names a key that a phone keyboard does not really have. */
	.wpjab-q__hint {
		display: none;
	}
}

.wpjab-q__error,
.wpjab-review__error {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--wpjab-error);
}

.wpjab-q__error[hidden],
.wpjab-review__error[hidden] {
	display: none;
}

.wpjab__job-context {
	max-width: var(--wpjab-max);
	margin: 0 auto 1.25rem;
	padding: 0.6rem 0.85rem;
	font-size: 0.875rem;
	color: var(--wpjab-muted);
	background: var(--wpjab-surface-2);
	border-radius: var(--wpjab-radius);
}

.wpjab__job-context[hidden] {
	display: none;
}

.wpjab__job-context strong {
	color: var(--wpjab-fg);
}

.wpjab__job-context button {
	margin-left: 0.5rem;
	padding: 0;
	font: inherit;
	color: var(--wpjab-accent);
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
   Inputs
   ------------------------------------------------------------------------- */

/* Fields are underlines, not boxes — the answer should read as a continuation
   of the sentence above it rather than as a form control. */
/* Beats the display:block below. Without it the browser's own [hidden] rule
   loses, and a field the stepper has put away stays on screen — the time
   question hides its typed h:mm and AM/PM pair this way when the device gets
   the native picker instead. */
.wpjab .wpjab-input[hidden] {
	display: none;
}

.wpjab .wpjab-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0.35rem 0 0.45rem;
	font: inherit;
	font-size: 1.0625rem;
	/* Inputs and selects have different intrinsic heights, which leaves their
	   underlines a couple of pixels apart when they sit side by side. Pinning
	   both to the same line-height and minimum height makes the rules even. */
	line-height: 1.5;
	min-height: 2.5rem;
	color: var(--wpjab-fg);
	background: transparent;
	border: 0;
	border-bottom: 2px solid var(--wpjab-line);
	border-radius: 0;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 140ms ease;
}

/* The primary answer to a single-field question, set large. Composite groups
   (address, time) keep the smaller size so their parts stay readable. */
.wpjab .wpjab-input--line {
	font-size: clamp(1.15rem, 2.6vw, 1.45rem);
	font-weight: 400;
}

/* Placeholders must never be mistaken for an answer — "9:30" and
   "(555) 123-4567" are format hints, and at anything near the text colour they
   read as data the client already entered.

   !important is deliberate. Notarius styles placeholders itself, including a
   :focus variant that darkens them, and its stylesheet loads after this one —
   so matching its specificity still loses on source order. Chasing it with
   ever-more-specific selectors is a race we do not need to run for a component
   that owns its own scope. Each vendor prefix gets its own block because a
   browser discards an entire selector list if any one entry is unknown to it. */
.wpjab input.wpjab-input::placeholder,
.wpjab textarea.wpjab-input::placeholder {
	color: var(--wpjab-placeholder) !important;
	opacity: 1 !important;
}

.wpjab input.wpjab-input::-webkit-input-placeholder,
.wpjab textarea.wpjab-input::-webkit-input-placeholder {
	color: var(--wpjab-placeholder) !important;
	opacity: 1 !important;
}

.wpjab input.wpjab-input::-moz-placeholder,
.wpjab textarea.wpjab-input::-moz-placeholder {
	color: var(--wpjab-placeholder) !important;
	opacity: 1 !important;
}

.wpjab input.wpjab-input:-ms-input-placeholder,
.wpjab textarea.wpjab-input:-ms-input-placeholder {
	color: var(--wpjab-placeholder) !important;
	opacity: 1 !important;
}

.wpjab .wpjab-input:focus {
	outline: none;
	border-bottom-color: var(--wpjab-accent);
}

.wpjab .wpjab-input--area {
	min-height: 3.5rem;
	resize: vertical;
}

.wpjab select.wpjab-input {
	padding-right: 1.75rem;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6b7a' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.35rem center;
}

/* Composite groups (phone, time, address, city/state) */

.wpjab-group {
	display: grid;
	gap: 0.75rem;
}

/* The dial code and the number are one field split in two, so they are set at
   the same size and their underlines are pinned to a shared baseline — aligning
   the boxes instead would leave the two rules at different heights. */
/* The first column holds the dial-code selector, whose options are country
   names — "United Arab Emirates (+971)" and friends — at the same large type as
   every other answer. Sized to fit the long ones rather than to the "(+1)" the
   client ends up looking at, so the dial code is not pushed out of sight. */
.wpjab-group--phone {
	grid-template-columns: minmax(13rem, 20rem) 1fr;
	align-items: end;
	gap: 1rem;
}

.wpjab-group--phone .wpjab-input {
	font-size: clamp(1.15rem, 2.6vw, 1.45rem);
}

.wpjab-group--time {
	grid-template-columns: 7rem 6.5rem 1fr;
	align-items: end;
	gap: 1rem;
}

/* Touchscreens get the operating system's own time spinner instead of the
   typed h:mm and the AM/PM dropdown, so the row is down to two fields. */
.wpjab-group--time.is-native {
	grid-template-columns: minmax(9rem, 13rem) 1fr;
}


/* Stacked, one field per row. An address is read top to bottom as it would be
   written on an envelope; splitting it into columns makes it a puzzle. */
.wpjab-group--address {
	grid-template-columns: 1fr;
	gap: 0.9rem;
}

.wpjab-group--address .wpjab-group__label {
	font-size: 0.875rem;
	color: var(--wpjab-fg);
}

.wpjab-group--city-state {
	grid-template-columns: 1fr 1fr;
	align-items: end;
	gap: 1rem 1.5rem;
}

.wpjab-group--zip {
	grid-template-columns: 1fr;
	gap: 1.5rem;
	max-width: 26rem;
}

.wpjab-input--zip {
	max-width: 9rem;
	letter-spacing: 0.08em;
}

/* -------------------------------------------------------------------------
   Radius slider
   ------------------------------------------------------------------------- */

.wpjab-radius {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.wpjab-radius__help {
	margin: -0.15rem 0 0.3rem;
	font-size: 0.8125rem;
	color: var(--wpjab-muted);
}

.wpjab-radius__control {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.wpjab-radius__value {
	flex: none;
	min-width: 5.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wpjab-accent);
	font-variant-numeric: tabular-nums;
}

.wpjab-radius__scale {
	display: flex;
	justify-content: space-between;
	/* Matches the readout's width so the ticks line up with the track above. */
	padding-right: 6.5rem;
	font-size: 0.6875rem;
	color: var(--wpjab-muted);
	font-variant-numeric: tabular-nums;
}

/* Range inputs need their track and thumb styled per engine — there is no
   shared shorthand, so each vendor gets its own rule. */
.wpjab .wpjab-range {
	flex: 1;
	min-width: 0;
	height: 1.5rem;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.wpjab .wpjab-range::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: var(--wpjab-line);
}

.wpjab .wpjab-range::-moz-range-track {
	height: 4px;
	border-radius: 2px;
	background: var(--wpjab-line);
}

.wpjab .wpjab-range::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: -0.475rem;
	border: 0;
	border-radius: 50%;
	background: var(--wpjab-accent);
	box-shadow: 0 1px 4px rgba(22, 32, 44, 0.3);
}

.wpjab .wpjab-range::-moz-range-thumb {
	width: 1.15rem;
	height: 1.15rem;
	border: 0;
	border-radius: 50%;
	background: var(--wpjab-accent);
	box-shadow: 0 1px 4px rgba(22, 32, 44, 0.3);
}

.wpjab .wpjab-range:focus-visible {
	outline: 3px solid rgba(28, 79, 139, 0.35);
	outline-offset: 4px;
}

.wpjab-group__full {
	grid-column: 1 / -1;
}

.wpjab-group__item {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
}

.wpjab-group__label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wpjab-muted);
}

@media (max-width: 34rem) {
	.wpjab-group--phone,
	.wpjab-group--time,
	/* Named in full because .wpjab-group--time.is-native above is the more
	   specific selector; a bare group class here would not override it. */
	.wpjab-group--time.is-native,
	.wpjab-group--address,
	.wpjab-group--city-state {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
   Choices
   ------------------------------------------------------------------------- */

.wpjab-choices {
	display: grid;
	gap: 0.6rem;
}

/* Beats the display:flex below, which would otherwise keep an option that a
   rule has taken off the table visible. */
.wpjab-choice[hidden] {
	display: none;
}

.wpjab-choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.8rem;
	color: var(--wpjab-accent);
	/* Plain values first so browsers without color-mix still get a visible
	   card rather than a transparent one. */
	background: var(--wpjab-surface-2);
	background: color-mix(in srgb, var(--wpjab-accent) 6%, transparent);
	border: 1px solid var(--wpjab-line);
	border-color: color-mix(in srgb, var(--wpjab-accent) 35%, transparent);
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.wpjab-choice:hover {
	background: var(--wpjab-surface-2);
	background: color-mix(in srgb, var(--wpjab-accent) 12%, transparent);
	border-color: var(--wpjab-accent);
}

.wpjab-choice__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* The letter is both a label and the key that selects the option. */
.wpjab-choice__key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	background: var(--wpjab-surface);
	border: 1px solid var(--wpjab-line);
	border-color: color-mix(in srgb, var(--wpjab-accent) 35%, transparent);
	border-radius: 4px;
}

.wpjab-choice__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}

.wpjab-choice__label {
	flex: 1;
}

/* "i" explainer, sitting inline with the option it explains. */
.wpjab-choice__info {
	position: relative;
	display: inline-flex;
	vertical-align: middle;
	margin-left: 0.4rem;
}

.wpjab-choice__info-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1rem;
	height: 1.1rem;
	padding: 0;
	font-family: inherit;
	font-size: 0.75rem;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 50%;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 120ms ease;
}

.wpjab-choice__info-btn:hover,
.wpjab-choice__info-btn:focus-visible,
.wpjab-choice__info-btn[aria-expanded="true"] {
	opacity: 1;
}

/* The bubble itself. Hidden by visibility rather than display so it can fade,
   and pinned above the icon so it never pushes the option list around. */
.wpjab-choice__tip {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 50%;
	z-index: 5;
	width: max-content;
	max-width: min(20rem, 70vw);
	transform: translateX(-50%);
	padding: 0.5rem 0.65rem;
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	color: var(--wpjab-fg);
	background: var(--wpjab-surface);
	border: 1px solid var(--wpjab-line);
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	visibility: hidden;
	opacity: 0;
	transition: opacity 120ms ease, visibility 120ms ease;
}

.wpjab-choice__info-btn:hover + .wpjab-choice__tip,
.wpjab-choice__info-btn:focus-visible + .wpjab-choice__tip,
.wpjab-choice__info-btn[aria-expanded="true"] + .wpjab-choice__tip {
	visibility: visible;
	opacity: 1;
}

/* Near the edge of a narrow screen a centred bubble would overflow, so it is
   pinned to the left of the option instead. */
@media (max-width: 480px) {
	.wpjab-choice__info {
		position: static;
	}

	.wpjab-choice__tip {
		left: 0;
		right: 0;
		width: auto;
		max-width: none;
		transform: none;
	}
}

/* A single line of supporting text — an address, say. Kept on its own row so
   it can be read and copied whole, unlike the bullets below it. */
.wpjab-choice__note {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--wpjab-muted);
}

/* Supporting detail for an option — a room's features, say. Set smaller and
   quieter so it informs the choice without competing with the option itself. */
.wpjab-choice__features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.85rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--wpjab-muted);
}

.wpjab-choice__feature {
	position: relative;
	padding-left: 0.9rem;
}

.wpjab-choice__feature::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.3rem;
	height: 0.3rem;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.55;
}

/* An option carrying detail is taller than one line, so its letter and tick
   sit at the top rather than floating in the vertical middle. */
.wpjab-choice:has(.wpjab-choice__features),
.wpjab-choice:has(.wpjab-choice__note) {
	align-items: flex-start;
}

.wpjab-choice:has(.wpjab-choice__features) .wpjab-choice__key,
.wpjab-choice:has(.wpjab-choice__features) .wpjab-choice__box,
.wpjab-choice:has(.wpjab-choice__note) .wpjab-choice__key,
.wpjab-choice:has(.wpjab-choice__note) .wpjab-choice__box {
	margin-top: 0.1rem;
}

/* Tick, shown once the option is selected. */
.wpjab-choice__box {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	background: var(--wpjab-accent) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='11' viewBox='0 0 14 11'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M1 5.6 5 9.6 13 1.4'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
	border-radius: 3px;
	opacity: 0;
	transition: opacity 120ms ease;
}

.wpjab-choice__input:checked ~ .wpjab-choice__box {
	opacity: 1;
}

.wpjab-choice:has(.wpjab-choice__input:checked) {
	background: var(--wpjab-surface-2);
	background: color-mix(in srgb, var(--wpjab-accent) 16%, transparent);
	border-color: var(--wpjab-accent);
}

.wpjab-choice:has(.wpjab-choice__input:focus-visible) {
	outline: 2px solid var(--wpjab-accent);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Autosuggest
   ------------------------------------------------------------------------- */

.wpjab-q__field {
	position: relative;
}

.wpjab-suggest {
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	max-height: 18rem;
	margin: 0.25rem 0 0;
	overscroll-behavior: contain;
	padding: 0.25rem;
	list-style: none;
	overflow-y: auto;
	background: var(--wpjab-surface);
	border: 1px solid var(--wpjab-line);
	border-radius: var(--wpjab-radius);
	box-shadow: 0 6px 20px rgba(22, 32, 44, 0.14);
}

.wpjab-suggest[hidden] {
	display: none;
}

.wpjab-suggest__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.65rem;
	font-size: 1rem;
	border-radius: 5px;
	cursor: pointer;
}

.wpjab-suggest__text {
	flex: 1;
	min-width: 0;
}

/* Credential marker on a suggestion. Deliberately a separate chip rather than
   text appended to the name — the name is what gets stored. */
.wpjab-suggest__badge {
	flex: none;
	padding: 0.1rem 0.45rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #1c6b2a;
	background: #e4f4e6;
	border-radius: 999px;
}

.wpjab-suggest__item:hover,
.wpjab-suggest__item--active {
	color: var(--wpjab-accent);
	background: var(--wpjab-surface-2);
}

.wpjab-other {
	margin-top: 0.75rem;
}

.wpjab-other[hidden] {
	display: none;
}

.wpjab-other__label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.875rem;
	color: var(--wpjab-muted);
}

/* -------------------------------------------------------------------------
   Uploads
   ------------------------------------------------------------------------- */

.wpjab-upload__drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 1.5rem 1rem;
	text-align: center;
	background: var(--wpjab-surface-2);
	border: 1px dashed var(--wpjab-line);
	border-radius: var(--wpjab-radius);
	cursor: pointer;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.wpjab-upload__drop:hover,
.wpjab-upload--dragging .wpjab-upload__drop {
	border-color: var(--wpjab-accent);
}

.wpjab-upload__cta {
	font-weight: 600;
}

.wpjab-upload__hint {
	font-size: 0.8125rem;
	color: var(--wpjab-muted);
}

.wpjab-upload__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.wpjab-upload__list {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.4rem;
}

.wpjab-upload__item {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.55rem 0.75rem;
	font-size: 0.9375rem;
	background: var(--wpjab-surface-2);
	border-radius: var(--wpjab-radius);
}

.wpjab-upload__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpjab-upload__size {
	flex: none;
	font-size: 0.8125rem;
	color: var(--wpjab-muted);
}

.wpjab-upload__remove {
	flex: none;
	padding: 0;
	font: inherit;
	font-size: 0.8125rem;
	color: var(--wpjab-error);
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

.wpjab-upload__item--pending .wpjab-upload__name {
	color: var(--wpjab-muted);
}

/* -------------------------------------------------------------------------
   Buttons + nav
   ------------------------------------------------------------------------- */

.wpjab .wpjab__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.4rem;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--wpjab-radius);
	cursor: pointer;
	transition: opacity 120ms ease, background-color 120ms ease;
}

.wpjab .wpjab__btn--primary {
	color: var(--wpjab-accent-fg);
	background: var(--wpjab-accent);
}

.wpjab .wpjab__btn--ghost {
	color: var(--wpjab-fg);
	background: transparent;
	border-color: var(--wpjab-line);
}

.wpjab .wpjab__btn--lg {
	padding: 0.9rem 2rem;
	font-size: 1.0625rem;
}

.wpjab-resume {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.wpjab-resume[hidden],
.wpjab .wpjab__btn[hidden] {
	display: none;
}

/* The welcome and end screens are author-written HTML, so their content can be
   aligned any way the author likes — but the button is ours, not theirs, so its
   alignment comes from a setting rather than being inherited. */
.wpjab-screen__actions {
	display: flex;
	justify-content: flex-start;
}

.wpjab-screen__actions--center {
	justify-content: center;
}

.wpjab-screen__actions--right {
	justify-content: flex-end;
}

.wpjab .wpjab__btn:focus-visible {
	outline: 3px solid rgba(28, 79, 139, 0.35);
	outline-offset: 2px;
}

.wpjab .wpjab__btn[disabled] {
	opacity: 0.55;
	cursor: default;
}

/* Step arrows, parked bottom-right. Deliberately quiet: the OK button under the
   field is the primary way forward, these are for going back and for anyone who
   prefers clicking through. */
.wpjab__nav {
	/* Absolute against .wpjab (which is position: relative) rather than fixed
	   against the viewport — the form sits in a white column and a viewport-
	   fixed element lands outside it, on the theme's background. The form is at
	   least full height, so this still reads as pinned to the bottom. */
	position: absolute;
	right: clamp(1rem, 4vw, 2.5rem);
	bottom: calc(clamp(2rem, 6vw, 3.5rem) + env(safe-area-inset-bottom));
	z-index: 4;
	display: flex;
	gap: 1px;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(22, 32, 44, 0.18);
}

.wpjab__nav[hidden] {
	display: none;
}

.wpjab .wpjab__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.4rem;
	padding: 0;
	color: var(--wpjab-accent-fg);
	background: var(--wpjab-accent);
	border: 0;
	cursor: pointer;
	transition: opacity 120ms ease;
}

.wpjab .wpjab__step:hover {
	opacity: 0.85;
}

.wpjab .wpjab__step:focus-visible {
	outline: 3px solid rgba(28, 79, 139, 0.35);
	outline-offset: 2px;
}

/* Kept in the layout when unavailable so the pair does not jump around. */
.wpjab .wpjab__step[hidden] {
	display: inline-flex;
	opacity: 0.35;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
   Review + end screens
   ------------------------------------------------------------------------- */

.wpjab-screen__title {
	margin: 0;
	font-size: clamp(1.35rem, 3.2vw, 1.9rem);
	font-weight: 600;
}

.wpjab-screen__lead {
	margin: -0.5rem 0 0;
	color: var(--wpjab-muted);
}

.wpjab-review {
	display: grid;
	gap: 1.25rem;
	margin-top: 0.5rem;
}

.wpjab-review__group {
	border: 1px solid var(--wpjab-line);
	border-radius: var(--wpjab-radius);
	overflow: hidden;
}

/* Job tabs. Only rendered when there is more than one job — with one, a tab
   strip is a label you cannot switch away from. */
.wpjab-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: -0.75rem;
}

.wpjab .wpjab-tab {
	padding: 0.5rem 0.9rem;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wpjab-muted);
	background: transparent;
	border: 1px solid var(--wpjab-line);
	border-radius: var(--wpjab-radius) var(--wpjab-radius) 0 0;
	border-bottom-color: transparent;
	cursor: pointer;
	transition: color 120ms ease, background-color 120ms ease;
}

.wpjab .wpjab-tab:hover {
	color: var(--wpjab-fg);
	background: var(--wpjab-surface-2);
}

.wpjab .wpjab-tab--active {
	color: var(--wpjab-accent);
	font-weight: 600;
	background: var(--wpjab-surface-2);
	border-color: var(--wpjab-line);
	border-bottom-color: var(--wpjab-surface-2);
}

.wpjab .wpjab-tab:focus-visible {
	outline: 2px solid var(--wpjab-accent);
	outline-offset: -2px;
}

.wpjab-review__group-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 0.7rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	background: var(--wpjab-surface-2);
}

.wpjab-review__remove {
	padding: 0;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wpjab-error);
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

.wpjab-review__row {
	display: grid;
	grid-template-columns: minmax(9rem, 40%) 1fr;
	gap: 0.5rem 1rem;
	width: 100%;
	padding: 0.65rem 1rem;
	font: inherit;
	font-size: 0.9375rem;
	text-align: left;
	background: none;
	border: 0;
	border-top: 1px solid var(--wpjab-line);
	cursor: pointer;
}

.wpjab-review__row:hover {
	background: var(--wpjab-surface-2);
}

.wpjab-review__label {
	color: var(--wpjab-muted);
}

.wpjab-review__value {
	font-weight: 500;
	white-space: pre-line;
}

.wpjab-review__value--empty {
	font-weight: 400;
	color: var(--wpjab-muted);
}

.wpjab-review__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

@media (max-width: 34rem) {
	.wpjab-review__row {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}

.wpjab-screen__content > *:first-child {
	margin-top: 0;
}

.wpjab-screen__content > *:last-child {
	margin-bottom: 0;
}
