/* ============================================================================
   Coursecheck login (cc-login.css) - Account/Logon.xsl, prototype LoginPage.
   The login page uses the public layout, which doesn't load cc-rework.css, so
   the few tokens it needs are repeated here under .lg-page.
   ========================================================================== */
.lg-page {
	--lg-font: 'Inter', system-ui, -apple-system, 'Open Sans', sans-serif;
	--lg-ink: #0E2732;
	--lg-slate: #64748B;
	--lg-border: #E5E8EC;
	--lg-paper: #F5F6F8;
	--lg-blue: #0083CA;
	--lg-blue-dark: #006FAD;
	--lg-blue-soft: #E6F3FA;
	--lg-red: #D9534F;
	--lg-red-soft: #FBEAEA;

	display: flex;
	align-items: center;
	justify-content: center;
	/* the card sits in the middle of the space under the 64px header (cc-header.css) */
	min-height: calc(100vh - 64px);
	padding: 32px 0;
	font-family: var(--lg-font);
	color: var(--lg-ink);
}
.lg-page *,
.lg-page *::before,
.lg-page *::after {
	box-sizing: border-box;
}
/* grey behind the card from header to footer, as in the prototype */
#main:has(.lg-page:not(.is-flow)),
#main-content:has(.lg-page:not(.is-flow)),
#main > .page-wrap:has(#cc-content-panel .lg-page:not(.is-flow)),
#cc-content-panel:has(> .lg-page:not(.is-flow)),
body.rw-shell #cc-content-panel:has(> .lg-page:not(.is-flow)) {
	/* the last three: the logged-in layout's content band and panel are white */
	background: var(--lg-paper, #F5F6F8);
}
/* the multi-factor set-up steps while logging in (.is-flow: Setup2FA when enforced, then the recovery
   codes) stay on a plain white page, the card outlined */
#main:has(.lg-page.is-flow),
#main > .page-wrap:has(.lg-page.is-flow),
body.rw-shell #cc-content-panel:has(> .lg-page.is-flow) {
	background: #fff;
}
/* the public layout's breadcrumb strip is empty on the login page (no crumbs), leaving a white bar under
   the header. Only when the card is in #main-content: in the logged-in layout .page-wrap holds the page */
#main:has(> #main-content .lg-page) > .page-wrap {
	display: none;
}

.lg-card {
	width: 100%;
	max-width: 384px;
	padding: 32px;
	border: 1px solid var(--lg-border);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.lg-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 20px;
	border-radius: 12px;
	background: var(--lg-blue-soft);
	color: var(--lg-blue);
}
/* the ids: the public layout styles "#main-content h1" (size, underline) and the logged-in one
   "#cc-content-panel h1" (weight 400), which a class alone can't beat */
.lg-page .lg-title,
#main-content .lg-page .lg-title,
#cc-content-panel .lg-page .lg-title {
	margin: 0;
	padding: 0;
	border: 0;
	letter-spacing: normal;
	font-family: inherit;
	font-size: 24px;
	line-height: 32px;
	font-weight: 700;
	color: var(--lg-ink);
}
.lg-sub {
	margin: 4px 0 24px;
	font-size: 14px;
	line-height: 20px;
	color: var(--lg-slate);
}
.lg-message {
	margin: 8px 0 24px;
	font-size: 14px;
	line-height: 20px;
	color: var(--lg-slate);
}
.lg-message p {
	margin: 0 0 8px;
}
.lg-alert {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--lg-red-soft);
	font-size: 13px;
	line-height: 18px;
	color: #A23A36;
}
.lg-alert a {
	color: inherit;
	text-decoration: underline;
}

/* fields */
.lg-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}
.lg-label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	color: var(--lg-slate);
}
.lg-page .lg-input {
	display: block;
	width: 100%;
	height: auto;
	padding: 10px 12px;
	border: 1px solid var(--lg-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: var(--lg-ink);
	outline: 0;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.lg-page .lg-input:focus {
	border-color: var(--lg-blue);
	box-shadow: 0 0 0 3px var(--lg-blue-soft);
}
.lg-page .lg-input.is-invalid {
	border-color: var(--lg-red);
}
.lg-error {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--lg-red);
}
.lg-error[hidden] {
	display: none;
}
.lg-password {
	position: relative;
}
.lg-page .lg-password .lg-input {
	padding-right: 40px;
}
.lg-eye {
	position: absolute;
	top: 50%;
	right: 8px;
	display: flex;
	padding: 4px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--lg-slate);
	transform: translateY(-50%);
	cursor: pointer;
}
.lg-eye:hover {
	background: #F3F4F6;
}
.lg-eye [hidden] {
	display: none;
}

/* remember me + forgot password */
.lg-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.lg-page .lg-check {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--lg-ink);
	cursor: pointer;
}
.lg-check input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.lg-tick {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 1px solid #CBD2D9;
	border-radius: 4px;
	background: #fff;
	color: transparent;
	transition: background 0.15s, border-color 0.15s;
}
.lg-check input:checked + .lg-tick {
	border-color: var(--lg-blue);
	background: var(--lg-blue);
	color: #fff;
}
.lg-check input:focus-visible + .lg-tick {
	box-shadow: 0 0 0 3px var(--lg-blue-soft);
}
.lg-link {
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--lg-blue);
	cursor: pointer;
}
.lg-link:hover {
	color: var(--lg-blue-dark);
	text-decoration: underline;
}

/* buttons */
.lg-page .lg-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--lg-blue);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s, background 0.15s;
}
.lg-page .lg-submit:hover,
.lg-page .lg-submit:focus {
	background: var(--lg-blue-dark);
	color: #fff;
	text-decoration: none;
}
.lg-page .lg-submit:hover:not(:disabled) {
	transform: translateY(-2px);
}
.lg-page .lg-submit:disabled {
	opacity: 0.6;
	cursor: default;
}
.lg-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: lg-spin 0.8s linear infinite;
}
.lg-spinner[hidden] {
	display: none;
}
@keyframes lg-spin {
	to { transform: rotate(360deg); }
}

/* reset password dialog */
.lg-overlay {
	position: fixed;
	inset: 0;
	z-index: 1050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 32, 0.5);
}
.lg-overlay[hidden] {
	display: none;
}
.lg-modal {
	width: 100%;
	max-width: 384px;
	padding: 24px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.lg-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}
.lg-page .lg-modal-title {
	margin: 0;
	padding: 0;
	border: 0;
	letter-spacing: normal;
	font-family: inherit;
	font-size: 18px;
	line-height: 28px;
	font-weight: 700;
	color: var(--lg-ink);
}
.lg-close {
	display: flex;
	padding: 4px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--lg-slate);
	cursor: pointer;
}
.lg-close:hover {
	background: #F3F4F6;
}
.lg-modal-text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 20px;
	color: var(--lg-slate);
}
.lg-page .lg-modal .lg-input {
	margin-bottom: 16px;
}
.lg-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* legal links under the card (the login page has no footer bar) */
.lg-page {
	flex-direction: column;
}
.lg-legal {
	margin-top: 20px;
	text-align: center;
	font-size: 12px;
	line-height: 18px;
	color: var(--lg-slate);
}
.lg-legal nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 16px;
}
.lg-page .lg-legal a {
	color: var(--lg-slate);
	text-decoration: none;
}
.lg-page .lg-legal a:hover,
.lg-page .lg-legal a:focus {
	color: var(--lg-blue);
	text-decoration: underline;
}
.lg-legal p {
	margin: 6px 0 0;
}

/* ---------------------------------------------------------------------------
   The other sign-in pages on this card (Account/_AuthCard.xsl): account
   activation, multi-factor set-up and log in. They use the logged-in layout,
   so a few of its rules are matched here too.
   ------------------------------------------------------------------------- */
.lg-card.is-wide {
	max-width: 480px;
}
/* part-way through logging in (Setup2FA.xsl with MFA enforced, then the recovery codes): no app side
   menu or its toggle yet, and no footer bar (the card's legal links are there, as on the login page).
   They're signed in by then, so the layout would otherwise draw both */
#cc-wrapper-row:has(.lg-page.is-flow) > .cc-side-panel,
#cc-wrapper-row:has(.lg-page.is-flow) > .cc-side-toggle,
body:has(.lg-page.is-flow) #footer {
	display: none;
}
.lg-badge.is-success {
	background: #BFEDE5;
	color: #0E8A7C;
}
.lg-badge.is-error {
	background: #F8D5D4;
	color: var(--lg-red);
}
.lg-hint {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--lg-slate);
}
.lg-card > .lg-hint {
	margin-top: 20px;
}
.lg-note {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--lg-blue-soft);
	font-size: 13px;
	line-height: 18px;
	color: #1F6185;
}
.lg-alert[hidden] {
	display: none;
}
.lg-alt {
	margin-top: 12px;
	text-align: center;
}

/* multi-factor set-up: numbered steps */
.lg-steps {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.lg-steps > li {
	display: flex;
	gap: 12px;
}
.lg-step-num {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--lg-blue);
	font-size: 12px;
	font-weight: 700;
	color: #fff;
}
.lg-step-body {
	flex: 1 1 auto;
	min-width: 0;
}
.lg-page .lg-step-title {
	margin: 2px 0 4px;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 15px;
	line-height: 20px;
	font-weight: 600;
	letter-spacing: normal;
	color: var(--lg-ink);
}
.lg-step-text {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 19px;
	color: var(--lg-slate);
}
.lg-qr {
	display: inline-flex;
	margin: 0 0 12px;
	padding: 8px;
	border: 1px solid var(--lg-border);
	border-radius: 12px;
	background: #fff;
}
.lg-qr img {
	display: block;
	width: 180px;
	height: 180px;
}
.lg-page .lg-key {
	display: inline-block;
	max-width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--lg-border);
	border-radius: 8px;
	background: var(--lg-paper);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	letter-spacing: 0.08em;
	color: var(--lg-ink);
	word-break: break-all;
	white-space: normal;
}
/* the 6-digit code box: big, spaced digits */
.lg-page .lg-input.lg-code {
	max-width: 200px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 20px;
	letter-spacing: 0.3em;
}

/* recovery codes after set-up */
.lg-codes {
	margin: 0 0 24px;
	padding: 16px;
	border: 1px solid var(--lg-border);
	border-radius: 12px;
	background: var(--lg-paper);
}
.lg-codes-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.lg-codes-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}
.lg-page .lg-codes-list code {
	display: block;
	padding: 6px 10px;
	border: 1px solid var(--lg-border);
	border-radius: 8px;
	background: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	text-align: center;
	color: var(--lg-ink);
}
.lg-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid var(--lg-border);
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--lg-ink);
	cursor: pointer;
}
.lg-link-btn:hover {
	border-color: var(--lg-blue);
	color: var(--lg-blue);
}

/* activation: the generated password fields (_AutoGen/User.xsl) drawn as the card's fields */
.lg-generated .form-group {
	display: block;
	margin: 0 0 16px;
}
.lg-page .lg-generated .form-group > label.control-label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	text-align: left;
	color: var(--lg-slate);
}
.lg-page .lg-generated .form-group > .controls {
	float: none;
	width: 100%;
	padding: 0;
}
.lg-page .lg-generated .form-control {
	display: block;
	width: 100%;
	height: auto;
	padding: 10px 12px;
	border: 1px solid var(--lg-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: var(--lg-ink);
}
.lg-page .lg-generated .form-control:focus {
	border-color: var(--lg-blue);
	box-shadow: 0 0 0 3px var(--lg-blue-soft);
	outline: 0;
}
.lg-page .lg-generated .form-control.error {
	border-color: var(--lg-red);
}
.lg-page .lg-generated label.error {
	display: block;
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 16px;
	font-weight: 400;
	color: var(--lg-red);
}
.lg-generated > .lg-hint {
	margin: -8px 0 16px;
}

@media (max-width: 480px) {
	.lg-card {
		padding: 24px;
	}
}
