/*
 * ALS Join
 *
 * The palette is the site's own, taken from the working upgrade panel rather
 * than invented here, so this page does not look like a foreign object dropped
 * next to the pricing page it sends people to.
 *
 *   page    #070F23     surface #101E36     border #344764
 *   text    #D5DDF1     muted   #B5C6DF     accent #56DDD0
 *
 * The first version of this file was written for a white page: dark navy text,
 * light grey rules, white inputs. Dropped onto the real page it was dark navy
 * text on a dark navy background, and the heading was unreadable against the
 * world map behind it. Nobody looked at it before shipping, which is the lesson
 * worth keeping: a stylesheet cannot be reasoned about, it has to be seen.
 *
 * The panel is a solid card rather than transparent, so the page's background
 * artwork sits behind it instead of showing through the text.
 *
 * Nothing here is red. Red means the person must change something before they
 * can continue, and that is the only thing it is used for. A licence held by a
 * brokerage and a name that reads differently from the licence record are
 * ordinary facts about a record, not failures by the agent, and they are shown
 * in plain text with no alarm colour at all.
 */

.als-join {
	--als-page: #070F23;
	--als-surface: #101E36;
	--als-surface-2: #16273F;
	--als-border: #344764;
	--als-border-soft: #23324D;
	--als-text: #D5DDF1;
	--als-heading: #F3F6FB;
	--als-muted: #B5C6DF;
	--als-accent: #56DDD0;
	--als-accent-ink: #06283A;
	--als-warn: #F0C987;
	--als-warn-bg: #2A2415;
	--als-good: #7FE0B4;
	--als-good-bg: #10301F;
	--als-bad: #F2A7A7;
	--als-bad-bg: #331B1B;

	box-sizing: border-box;
	max-width: 760px;
	margin: 36px auto 64px;
	color: var(--als-text);
	font-size: 16px;
	line-height: 1.6;
}

.als-join *,
.als-join *::before,
.als-join *::after { box-sizing: inherit; }

/* ------------------------------------------------------------------- the card */

.als-join [data-step] {
	padding: 32px 34px;
	border: 1px solid var(--als-border);
	border-radius: 16px;
	background: linear-gradient(180deg, var(--als-surface) 0%, var(--als-page) 100%);
}

@media (max-width: 560px) {
	.als-join { margin: 20px auto 40px; }
	.als-join [data-step] { padding: 24px 20px; }
}

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

.als-join__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	list-style: none;
	margin: 0 0 26px;
	padding: 0 0 18px;
	border-bottom: 1px solid var(--als-border-soft);
	font-size: 14px;
	color: var(--als-muted);
}

.als-join__steps li { display: flex; align-items: center; gap: 9px; }

.als-join__steps li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid var(--als-border);
	border-radius: 50%;
	background: var(--als-surface-2);
	font-size: 13px;
	font-weight: 700;
	color: var(--als-muted);
}

.als-join__steps .is-current { color: var(--als-heading); font-weight: 700; }
.als-join__steps .is-current span { border-color: var(--als-accent); background: var(--als-accent); color: var(--als-accent-ink); }
.als-join__steps .is-done span { border-color: var(--als-accent); color: var(--als-accent); }

/* ------------------------------------------------------------------ heading */

.als-join__eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 750;
	letter-spacing: 1.7px;
	text-transform: uppercase;
	color: var(--als-accent);
}

.als-join__heading {
	margin: 0 0 12px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--als-heading);
}

.als-join__intro { margin: 0 0 24px; color: var(--als-muted); }

/* ------------------------------------------------------------------- fields */

.als-join__field { display: block; margin-bottom: 18px; }

.als-join__field > span {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 700;
	color: var(--als-heading);
}

.als-join__field em {
	font-style: normal;
	font-weight: 400;
	color: var(--als-muted);
}

.als-join__field input,
.als-join__field select {
	width: 100%;
	padding: 13px 15px;
	border: 1px solid var(--als-border);
	border-radius: 10px;
	background: var(--als-surface-2);
	color: var(--als-heading);
	font: inherit;
}

.als-join__field input::placeholder { color: #7E8CAB; }

.als-join__field select {
	appearance: none;
	padding-right: 40px;
	background-image: linear-gradient(45deg, transparent 50%, var(--als-muted) 50%), linear-gradient(135deg, var(--als-muted) 50%, transparent 50%);
	background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.als-join__field select option { background: var(--als-surface-2); color: var(--als-heading); }

.als-join__field input:focus,
.als-join__field select:focus {
	outline: 2px solid var(--als-accent);
	outline-offset: 1px;
	border-color: var(--als-accent);
}

.als-join__hint {
	display: block;
	margin-top: 7px;
	font-size: 13px;
	color: var(--als-muted);
}

.als-join__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 18px;
}

@media (min-width: 560px) {
	.als-join__row { grid-template-columns: 2fr 1fr; }
}

/* ------------------------------------------------------------------ buttons */

.als-join__submit,
.als-join__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 24px;
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.als-join__submit {
	border: 1px solid var(--als-accent);
	background: var(--als-accent);
	color: var(--als-accent-ink);
}

.als-join__submit:hover:not([disabled]) { background: #7BE6DC; border-color: #7BE6DC; }
.als-join__submit[disabled] { opacity: 0.5; cursor: default; }

.als-join__back {
	border: 1px solid var(--als-border);
	background: transparent;
	color: var(--als-heading);
}

.als-join__back:hover { border-color: var(--als-muted); }

.als-join__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 24px;
}

/* -------------------------------------------------------------------- plans */

.als-join__plans { margin: 26px 0; padding: 0; border: 0; }

.als-join__plans legend {
	padding: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--als-heading);
}

.als-join__plan {
	display: flex;
	align-items: flex-start;
	gap: 13px;
	margin-bottom: 10px;
	padding: 16px 18px;
	border: 1px solid var(--als-border);
	border-radius: 12px;
	background: var(--als-surface-2);
	cursor: pointer;
}

.als-join__plan:hover { border-color: var(--als-muted); }

.als-join__plan input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--als-accent); }

.als-join__plan:has(input:checked) {
	border-color: var(--als-accent);
	box-shadow: inset 0 0 0 1px var(--als-accent);
}

.als-join__plan-text { display: block; color: var(--als-muted); }
.als-join__plan-text strong { display: block; font-size: 17px; color: var(--als-heading); }

/* ------------------------------------------------------------------ notices
 *
 * The only place a warm colour is used on this page, and only when the person
 * has to change something before they can carry on.
 */
.als-join__notice {
	margin: 0 0 22px;
	padding: 15px 17px;
	border-radius: 10px;
	font-size: 15px;
}

.als-join__notice--error { background: var(--als-bad-bg); color: var(--als-bad); border: 1px solid #57302F; }
.als-join__notice--info { background: var(--als-surface-2); color: var(--als-text); border: 1px solid var(--als-border); }
.als-join__notice a { color: inherit; }

/* --------------------------------------------------------------- the verdict
 *
 * Badges, not alarms. Amber for waiting, green for confirmed, plain surface for
 * everything else. A licence held by a company and a name reading differently
 * from the licence record are ordinary facts about a record.
 */
.als-join__verdict {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 7px;
	background: var(--als-surface-2);
	border: 1px solid var(--als-border);
	color: var(--als-text);
	font-size: 14px;
	font-weight: 700;
}

.als-join__verdict.is-verified { background: var(--als-good-bg); border-color: #2E5B44; color: var(--als-good); }
.als-join__verdict.is-pending_validation { background: var(--als-warn-bg); border-color: #4E4222; color: var(--als-warn); }

.als-join__licence {
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--als-border);
	border-radius: 12px;
	background: var(--als-surface-2);
}

.als-join__licence p { margin: 10px 0 0; color: var(--als-muted); }

.als-join__fine {
	margin: 18px 0 0;
	font-size: 14px;
	color: var(--als-muted);
}

.als-join__fine a { color: var(--als-accent); }

.als-join__done .als-join__heading { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
	.als-join { scroll-behavior: auto; }
}