/* Password reset, desktop: the card and steps of registration (security.css, registration.css). Only what the reset
   adds: the fourth step as the current one, the ways to receive the code, and the code itself. */

/* ------- Back and "Step X of 4" on one row, on every step ------- */

.rst .reg-head {
	flex-wrap: nowrap;
	gap: 1em;
}

	.rst .reg-head .reg-back,
	.rst #regStepLabel {
		flex: none;
		white-space: nowrap;
	}

/* ------- Step 4 (ResetConfirmed): the new password is current, the rest done ------- */

.rst[data-step="4"] .reg-progress i {
	width: 100%;
}

.rst[data-step="4"] .reg-steps li[data-step="4"] {
	font-weight: 600;
	color: #0a2a4f;
}

	.rst[data-step="4"] .reg-steps li[data-step="4"] .reg-steps-mark {
		color: #fff;
		background: #1d61a1;
		border-color: #1d61a1;
		box-shadow: 0 0 0 4px rgba(29, 97, 161, .14);
	}

.rst[data-step="4"] .reg-steps li:not([data-step="4"]) {
	color: #1d5a2a;
}

	.rst[data-step="4"] .reg-steps li:not([data-step="4"])::after {
		background: #2e7d32;
	}

	.rst[data-step="4"] .reg-steps li:not([data-step="4"]) .reg-steps-mark {
		color: transparent;
		background: #2e7d32;
		border-color: #2e7d32;
	}

		.rst[data-step="4"] .reg-steps li:not([data-step="4"]) .reg-steps-mark::after {
			opacity: 1;
			transform: rotate(-45deg);
		}

/* ------- Step 2: email or phone, one under the other ------- */

.rst .rst-channels {
	grid-template-columns: minmax(0, 1fr);
	margin-bottom: .6em;
}

.signin .rst-channels .reg-who-row {
	gap: 12px;
	min-height: 68px;
	padding: 10px 16px;
}

.rst-channel-icon {
	flex: none;
	width: 36px;
	height: 36px;
	padding: 8px;
	color: #1d61a1;
	background: #eef4fa;
	border-radius: 10px;
	box-sizing: border-box;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rst-channel-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

	.rst-channel-text b {
		font-weight: 600;
	}

	.rst-channel-text small {
		overflow: hidden;
		font-size: .88em;
		font-weight: 400;
		color: #6b7a8c;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

.reg-who-row:has(input:checked) .rst-channel-text small {
	color: #1d61a1;
}

.rst label.rst-channel-error {
	margin: 0 0 1em;
}

.rst .reg-warning {
	margin-top: .4em;
}

/* ------- Step 3: the code ------- */

.rst .reg-lead b {
	font-weight: 600;
	color: #0a2a4f;
	word-break: break-all;
}

/* Four boxes, as on the mobile login (security.mobile.css): one input lies over them and reset.js draws its digits. */
.rst .login-otp {
	position: relative;
	display: flex;
	gap: 12px;
	max-width: 320px;
	margin-bottom: .4em;
}

	.rst .login-otp span {
		display: grid;
		flex: 1;
		place-items: center;
		height: 68px;
		font-size: 1.75em;
		font-weight: 700;
		font-variant-numeric: tabular-nums;
		color: #0a2a4f;
		background: #e2e9f5;
		border: 2px solid transparent;
		border-radius: 12px;
		box-sizing: border-box;
		transition: background-color .18s ease, border-color .18s ease, box-shadow .2s ease;
	}

		.rst .login-otp span.is-filled {
			background: #eef4fa;
			animation: rst-digit .2s cubic-bezier(.32, .72, 0, 1);
		}

		.rst .login-otp span.is-current {
			background: #fff;
			border-color: #1d61a1;
			box-shadow: 0 0 0 4px rgba(29, 97, 161, .13);
		}

			.rst .login-otp span.is-current::after {
				content: "";
				width: 2px;
				height: 28px;
				background: #1d61a1;
				animation: rst-caret 1s steps(1) infinite;
			}

	/* The real input covers the boxes, so a click anywhere focuses it; its own text and caret stay invisible. */
	.login-eid .signin .login-otp input {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 0;
		font-size: 16px;
		color: transparent;
		caret-color: transparent;
		background: transparent;
		border: 0;
		outline: 0;
		box-shadow: none;
		opacity: .01;
		cursor: text;
	}

	.rst .login-otp:hover span:not(.is-current) {
		border-color: #c9d6e5;
	}

	.rst .login-otp.is-invalid {
		animation: rst-shake .38s ease-out;
	}

		.rst .login-otp.is-invalid span {
			border-color: rgba(198, 40, 40, .45);
		}

			.rst .login-otp.is-invalid span.is-current {
				border-color: #c62828;
				box-shadow: 0 0 0 4px rgba(198, 40, 40, .12);
			}

				.rst .login-otp.is-invalid span.is-current::after {
					background: #c62828;
				}

@keyframes rst-digit {
	from {
		transform: scale(.85);
		opacity: .4;
	}
}

@keyframes rst-caret {
	50% {
		opacity: 0;
	}
}

@keyframes rst-shake {
	20%, 60% {
		transform: translateX(-5px);
	}

	40%, 80% {
		transform: translateX(5px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rst .login-otp,
	.rst .login-otp span,
	.rst .login-otp span::after {
		animation: none !important;
		transition: none;
	}
}

.reg-timer {
	display: flex;
	align-items: center;
	gap: 1em;
	min-height: 40px;
	margin: .3em 0 1em;
	font-size: .88em;
	color: #6b7a8c;
}

	.reg-timer b {
		font-weight: 600;
		font-variant-numeric: tabular-nums;
		color: #0a2a4f;
	}

/* countdown.js sets display:block on the counter. */
#smsCounter {
	display: inline !important;
}

.rst .reg-link {
	display: inline;
	width: auto;
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	color: #1d61a1;
	background: none;
	border: 0;
	cursor: pointer;
}

	.rst .reg-link:hover {
		text-decoration: underline;
	}

	.rst .reg-link:disabled {
		opacity: .5;
		cursor: default;
	}

/* The same box as the notice on step 2, here under the button. SMS-FAILURE has no <b> around "Attention:", so its
   first line is made bold as on step 2. */
.rst #rstCodeStep > .reg-warning {
	margin: 1.2em 0 0;
}

	.rst #rstCodeStep > .reg-warning::first-line {
		font-weight: 700;
	}

/* ------- Step 4: cancel and save side by side ------- */

.rst-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .75em;
}
