﻿/* Registration, desktop: the login page's card (security.css) holding the steps of the mobile flow (registration.mobile.css).
   registration.steps.js sets data-step on .reg; the side panel follows it with CSS alone. */

.reg-off {
	display: none !important;
}

.reg-hidden {
	visibility: hidden;
}

.reg {
	color: #0a2a4f;
}

/* ------- Card: the steps, then the overview ------- */

.reg-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
}

.reg-main {
	padding: 2em 2.75em 2.5em;
}

.reg-aside {
	display: flex;
	flex-direction: column;
	padding: 2.5em 2em;
	background: #f7fafd;
	border-left: 1px solid #e8eef4;
}

/* ------- Back, step label, progress ------- */

.reg-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 36px;
	margin-bottom: 1em;
	font-size: .85em;
	color: #6b7a8c;
}

	.reg-head b {
		font-weight: 600;
		color: #0a2a4f;
	}

.reg .reg-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 36px;
	margin-left: -8px;
	padding: 0 10px 0 4px;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	color: #1d61a1;
	background: none;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color .18s ease;
}

	.reg .reg-back:hover,
	.reg .reg-back:focus-visible {
		background: #eef4fa;
	}

	.reg-back svg {
		width: 20px;
		height: 20px;
		fill: none;
		stroke: currentColor;
		stroke-width: 2;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

/* The side panel shows the progress on wide windows; the bar takes over when the panel is hidden (see the bottom). */
.reg-progress {
	display: none;
	height: 4px;
	margin-bottom: 1.3em;
	overflow: hidden;
	background: #e3e9f0;
	border-radius: 2px;
}

	.reg-progress i {
		display: block;
		width: 25%;
		height: 100%;
		background: #1d61a1;
		border-radius: 2px;
		transition: width .3s cubic-bezier(.2, .8, .2, 1);
	}

.reg[data-step="2"] .reg-progress i {
	width: 50%;
}

.reg[data-step="3"] .reg-progress i {
	width: 75%;
}

/* ------- Steps overview ------- */

/* Auto margins centre the steps in the column, with the video link at the bottom. */
.reg-steps {
	margin: auto 0;
	padding: 0;
	list-style: none;
}

	.reg-steps li {
		position: relative;
		display: flex;
		align-items: center;
		gap: .8em;
		padding-bottom: 1.6em;
		font-size: .92em;
		line-height: 1.3;
		color: #8b9aac;
		transition: color .2s ease;
	}

		.reg-steps li:last-child {
			padding-bottom: 0;
		}

		/* The line to the next step, from under this mark to the next one. */
		.reg-steps li:not(:last-child)::after {
			content: "";
			position: absolute;
			top: 34px;
			bottom: 2px;
			left: 15px;
			width: 2px;
			background: #dde6ef;
			border-radius: 1px;
			transition: background-color .2s ease;
		}

.reg-steps-mark {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	font-size: .9em;
	color: #8b9aac;
	background: #fff;
	border: 1.5px solid #c9d6e5;
	border-radius: 50%;
	box-sizing: border-box;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

	.reg-steps-mark b {
		font-weight: 600;
	}

	/* The tick of a finished step, drawn in place of its number. */
	.reg-steps-mark::after {
		content: "";
		position: absolute;
		top: 9px;
		left: 9px;
		width: 10px;
		height: 5px;
		border-bottom: 2px solid #fff;
		border-left: 2px solid #fff;
		opacity: 0;
		transform: rotate(-45deg) scale(.5);
		transition: opacity .2s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
	}

/* The current step */
.reg[data-step="1"] .reg-steps li[data-step="1"],
.reg[data-step="2"] .reg-steps li[data-step="2"],
.reg[data-step="3"] .reg-steps li[data-step="3"] {
	font-weight: 600;
	color: #0a2a4f;
}

	.reg[data-step="1"] .reg-steps li[data-step="1"] .reg-steps-mark,
	.reg[data-step="2"] .reg-steps li[data-step="2"] .reg-steps-mark,
	.reg[data-step="3"] .reg-steps li[data-step="3"] .reg-steps-mark {
		color: #fff;
		background: #1d61a1;
		border-color: #1d61a1;
		box-shadow: 0 0 0 4px rgba(29, 97, 161, .14);
	}

/* The steps already done */
.reg[data-step="2"] .reg-steps li[data-step="1"],
.reg[data-step="3"] .reg-steps li[data-step="1"],
.reg[data-step="3"] .reg-steps li[data-step="2"] {
	color: #1d5a2a;
}

	.reg[data-step="2"] .reg-steps li[data-step="1"]::after,
	.reg[data-step="3"] .reg-steps li[data-step="1"]::after,
	.reg[data-step="3"] .reg-steps li[data-step="2"]::after {
		background: #2e7d32;
	}

	.reg[data-step="2"] .reg-steps li[data-step="1"] .reg-steps-mark,
	.reg[data-step="3"] .reg-steps li[data-step="1"] .reg-steps-mark,
	.reg[data-step="3"] .reg-steps li[data-step="2"] .reg-steps-mark {
		color: transparent;
		background: #2e7d32;
		border-color: #2e7d32;
	}

		.reg[data-step="2"] .reg-steps li[data-step="1"] .reg-steps-mark::after,
		.reg[data-step="3"] .reg-steps li[data-step="1"] .reg-steps-mark::after,
		.reg[data-step="3"] .reg-steps li[data-step="2"] .reg-steps-mark::after {
			opacity: 1;
			transform: rotate(-45deg);
		}

.reg .reg-video {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	min-height: 40px;
	margin-top: 2em;
	padding: 0;
	font-family: inherit;
	font-size: .85em;
	font-weight: 600;
	color: #1d61a1;
	background: none;
	border: 0;
	cursor: pointer;
}

	.reg .reg-video:hover span {
		text-decoration: underline;
	}

	.reg .reg-video img {
		display: block;
	}

/* ------- Steps ------- */

.reg fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.reg-step,
.reg-foreign {
	display: none;
}

	.reg-step.on,
	.reg-foreign.on {
		display: block;
	}

	.reg-step.on {
		animation: reg-forward .28s cubic-bezier(.2, .8, .2, 1);
	}

.reg[data-direction="back"] .reg-step.on {
	animation-name: reg-back;
}

@keyframes reg-forward {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
}

@keyframes reg-back {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.reg-step.on,
	.reg-steps li,
	.reg-steps li::after,
	.reg-steps-mark,
	.reg-steps-mark::after {
		animation: none;
		transition: none;
	}

	.reg-progress i {
		transition: none;
	}
}

.reg .reg-step h2 {
	margin: 0 0 .35em;
	font-size: 1.3em;
	font-weight: 600;
	text-align: left;
	color: #0a2a4f;
}

	.reg .reg-step h2:focus {
		outline: 0;
	}

/* A problem that belongs to no single field, and a refused request. */
.reg-banner {
	margin: 0 0 1.2em;
	padding: 12px 14px;
	font-size: .88em;
	line-height: 1.45;
	text-align: left;
	color: #8e1f1f;
	background: #fdf0f0;
	border: 1px solid #f5d5d5;
	border-radius: 10px;
}

	.reg-banner a {
		font-weight: 600;
		color: #8e1f1f;
		text-decoration: underline;
	}

.reg-lead {
	margin: 0 0 1.4em;
	font-size: .92em;
	line-height: 1.45;
	text-align: left;
	color: #6b7a8c;
}

.reg-hint {
	margin: .4em 0 0;
	font-size: .78em;
	line-height: 1.4;
	text-align: left;
	color: #6b7a8c;
}

#regSurnames {
	margin: -.5em 0 1.1em;
}

#phoneFormat .attention {
	color: #1d61a1;
	cursor: pointer;
}

	#phoneFormat .attention:hover {
		text-decoration: underline;
	}

/* ------- Fields ------- */

.reg-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1em;
}

.reg .login-eid-field {
	position: relative;
	margin-bottom: 1.1em;
}

	.reg .login-eid-field > label,
	.reg-field-label {
		display: block;
		margin-bottom: .35em;
		font-size: .85em;
		text-align: left;
		color: #6b7a8c;
	}

/* The icon and the eye sit on the input; a validation message may follow under it. */
.reg .login-input {
	position: relative;
}

.reg .login-input-icon {
	position: absolute;
	top: 16px;
	left: 12px;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: #8b9aac;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.login-eid .signin .login-input input,
.reg .login-input select {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 12px 0 42px;
	font-size: 1em;
	color: #0a2a4f;
	background: #fff;
	border: 1px solid #c9d6e5;
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}

	.login-eid .signin .login-input input:hover,
	.reg .login-input select:hover {
		border-color: #a9bdd3;
	}

	.login-eid .signin .login-input input:focus,
	.reg .login-input select:focus {
		border-color: #1d61a1;
		outline: 0;
		box-shadow: 0 0 0 3px rgba(29, 97, 161, .12);
	}

	.login-eid .signin .login-input input.error {
		border-color: #c62828;
	}

.login-eid .signin .login-input.plain input {
	padding-left: 12px;
}

.login-eid .signin .login-input:has(.login-eye) input {
	padding-right: 48px;
}

.reg .login-input select {
	padding: 0 36px 0 12px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.reg-chevron {
	position: absolute;
	top: 16px;
	right: 12px;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: #6b7a8c;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.reg .login-eye {
	position: absolute;
	top: 4px;
	right: 2px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: #8b9aac;
	background: none;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

	.reg .login-eye:hover {
		color: #1d61a1;
	}

	.reg .login-eye[aria-pressed="true"] {
		color: #1d61a1;
	}

	.reg .login-eye svg {
		width: 20px;
		height: 20px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.8;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

.login-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ------- Citizen or foreign citizen ------- */

.reg-who {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .75em;
	margin-bottom: 1.3em;
}

.signin .reg-who-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	margin: 0;
	padding: 8px 14px;
	font-size: .92em;
	line-height: 1.3;
	text-align: left;
	color: #0a2a4f;
	background: #fff;
	border: 1.5px solid #dde6ef;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease;
}

	.signin .reg-who-row:hover {
		border-color: #a9bdd3;
	}

	.signin .reg-who-row:has(input:checked) {
		font-weight: 600;
		background: #f7fafd;
		border-color: #1d61a1;
	}

	/* The whole row is the target; the input stays focusable under it. */
	.signin .reg-who-row input,
	.signin .reg-seg input {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: 0;
		padding: 0;
		opacity: 0;
	}

	.reg-who-row i {
		display: grid;
		flex: none;
		place-items: center;
		width: 20px;
		height: 20px;
		background: #fff;
		border: 2px solid #8b9aac;
		border-radius: 50%;
		box-sizing: border-box;
		transition: border-color .18s ease;
	}

		.reg-who-row i::after {
			content: "";
			width: 10px;
			height: 10px;
			background: #1d61a1;
			border-radius: 50%;
			transform: scale(0);
			transition: transform .2s cubic-bezier(.2, .8, .2, 1);
		}

	.reg-who-row input:checked + i {
		border-color: #1d61a1;
	}

		.reg-who-row input:checked + i::after {
			transform: none;
		}

	.reg-who-row:has(input:focus-visible) {
		box-shadow: 0 0 0 3px rgba(29, 97, 161, .25);
	}

/* ------- Gender ------- */

.reg-seg {
	display: flex;
	gap: 8px;
}

.reg .login-eid-field .reg-seg label {
	position: relative;
	display: grid;
	flex: 1;
	place-items: center;
	height: 52px;
	margin: 0;
	font-size: .92em;
	color: #0a2a4f;
	background: #fff;
	border: 1px solid #c9d6e5;
	border-radius: 10px;
	box-sizing: border-box;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease;
}

	.reg .login-eid-field .reg-seg label:hover {
		border-color: #a9bdd3;
	}

	.reg .login-eid-field .reg-seg label:has(input:checked) {
		font-weight: 600;
		color: #fff;
		background: #1d61a1;
		border-color: #1d61a1;
	}

	.reg-seg label:has(input:focus-visible) {
		box-shadow: 0 0 0 3px rgba(29, 97, 161, .25);
	}

/* ------- Password rules ------- */

.reg-rules {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 12px;
	margin: .7em 0 0;
	padding: 0;
	list-style: none;
}

	.reg-rules li {
		display: flex;
		align-items: center;
		gap: 6px;
		font-size: .8em;
		line-height: 1.35;
		text-align: left;
		color: #6b7a8c;
		transition: color .18s ease;
	}

		.reg-rules li::before {
			content: "";
			flex: none;
			box-sizing: border-box;
			width: 14px;
			height: 14px;
			border: 1.5px solid #8b9aac;
			border-radius: 50%;
			transition: background-color .18s ease, border-color .18s ease;
		}

		.reg-rules li.ok {
			color: #1d5a2a;
		}

			.reg-rules li.ok::before {
				background: #2e7d32;
				border-color: #2e7d32;
				box-shadow: inset 0 0 0 2.5px #fff;
			}

/* ------- Consent and the residence permit ------- */

.signin .checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: .3em 0 1.2em;
	font-size: .85em;
	line-height: 1.5;
	text-align: left;
	color: #3a4a5e;
	cursor: pointer;
}

	.checkbox .radio__label a {
		color: #1d61a1;
		text-decoration: underline;
	}

.checkbox__input {
	position: relative;
	display: grid;
	flex: none;
	width: 22px;
	height: 22px;
}

.signin .checkbox__input input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}

.checkbox__control {
	display: grid;
	place-items: center;
	color: #fff;
	background: #fff;
	border: 1.5px solid #8b9aac;
	border-radius: 6px;
	box-sizing: border-box;
	transition: background-color .15s ease, border-color .15s ease;
}

	.checkbox__control svg {
		width: 13px;
		height: 13px;
		transform: scale(0);
		transition: transform .15s ease;
	}

.checkbox__input input:checked + .checkbox__control {
	background: #1d61a1;
	border-color: #1d61a1;
}

	.checkbox__input input:checked + .checkbox__control svg {
		transform: scale(1);
	}

.checkbox__input input:focus-visible + .checkbox__control {
	box-shadow: 0 0 0 3px rgba(29, 97, 161, .25);
}

.reg-warning {
	margin: 0 0 1.2em;
	padding: 12px 14px;
	font-size: .85em;
	line-height: 1.45;
	text-align: left;
	color: #0a2a4f;
	background: #f3f6fa;
	border-radius: 10px;
}

/* ------- Validation ------- */

.reg label.error {
	display: block;
	margin: .35em 0 0;
	padding: 0;
	font-size: .8em;
	font-weight: 400;
	line-height: 1.35;
	text-align: left !important;
	color: #c62828;
}

.signin .checkbox + label.error {
	margin: -.8em 0 1.2em;
}

/* ------- Captcha and actions ------- */

.reg-actions {
	margin-top: .5em;
}

	.reg-actions .btn {
		width: 100%;
		height: 50px;
		margin-top: 0;
	}

		/* Waiting for the backend: the label gives way to a spinner. */
		.reg-actions .btn.reg-busy {
			position: relative;
			color: transparent;
		}

			.reg-actions .btn.reg-busy::after {
				content: "";
				position: absolute;
				top: 50%;
				left: 50%;
				width: 20px;
				height: 20px;
				margin: -10px 0 0 -10px;
				border: 2px solid rgba(255, 255, 255, .4);
				border-top-color: #fff;
				border-radius: 50%;
				box-sizing: border-box;
				animation: captchaSpin .8s linear infinite;
			}

/* ------- Narrow desktop windows: one column, the progress bar instead of the overview ------- */

@media (max-width: 991.98px) {
	.reg-columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.reg-main {
		padding: 1.75em 1.5em 2em;
	}

	.reg-progress {
		display: block;
	}

	.reg-aside {
		padding: 0 1.5em 1.25em;
		background: none;
		border-left: 0;
	}

	.reg-steps {
		display: none;
	}

	.reg .reg-video {
		margin-top: 0;
	}
}

@media (max-width: 575.98px) {
	.reg-row,
	.reg-who,
	.reg-rules {
		grid-template-columns: minmax(0, 1fr);
	}
}
