/*
	Mentor Portal sign-in and password pages: index.aspx and ResetPassword.aspx. The form itself is
	styled by password-login.css. Shared with IMS.MentorPortal.Mobile (ResetPassword.aspx) - keep both
	copies identical. Everything is scoped under body.mp-page so nothing reaches ExtJS dialogs.

	The login page is sized to fit a laptop screen without scrolling: two columns (welcome + sign-in on
	the left, the device or account note on the right), and a more compact mode for short windows.
*/
body.mp-page {
	--mp-primary: #1565c0;
	--mp-gradient: linear-gradient(135deg, #1e88e5 0%, #1565c0 55%, #0d47a1 100%);
	--mp-bg: #f3f6fb;
	--mp-surface: #ffffff;
	--mp-text: #1f2937;
	--mp-muted: #5b6575;
	--mp-border: #e3e8ef;
	--mp-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 28px rgba(16, 24, 40, 0.08);
	--mp-radius: 16px;
	--mp-header: 56px;
	--mp-width: 1120px;
}

html, body.mp-page, body.mp-page.x-body {
	min-height: 100%;
}

body.mp-page, body.mp-page.x-body {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: var(--mp-bg);
	color: var(--mp-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

body.mp-page *, body.mp-page *::before, body.mp-page *::after {
	box-sizing: border-box;
}

/* ResetPassword.aspx wraps the whole page in its ASP.NET form; pass the column layout through it */
body.mp-page > form {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
}

body.mp-page a {
	color: var(--mp-primary);
	font-weight: 600;
	text-decoration: none;
}

body.mp-page a:hover {
	text-decoration: underline;
}

/* ExtJS's reset removes every focus outline; keyboard users still need one */
body.mp-page a:focus-visible,
body.mp-page button:focus-visible {
	outline: 3px solid rgba(21, 101, 192, 0.45);
	outline-offset: 2px;
}

body.mp-page b {
	font-weight: 700;
}

/* Header ---------------------------------------------------------------------------------------- */

/* Transparent: the one gradient band drawn by .mp-main::before runs behind it, so there is no seam */
.mp-header {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	color: #ffffff;
	padding: 0 24px;
}

.mp-header__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: var(--mp-width);
	height: var(--mp-header);
	margin: 0 auto;
}

.mp-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.mp-logo svg {
	width: 20px;
	height: 20px;
}

body.mp-page .mp-header h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: #ffffff;
}

/* Main ------------------------------------------------------------------------------------------ */

.mp-main {
	position: relative;
	flex: 1 0 auto;
	padding: 16px 24px 20px;
}

/* One gradient band behind the header and the top of the cards */
.mp-main::before {
	content: "";
	position: absolute;
	top: calc(-1 * var(--mp-header));
	left: 0;
	right: 0;
	height: calc(var(--mp-header) + 150px);
	background: var(--mp-gradient);
	border-bottom-left-radius: 50% 36px;
	border-bottom-right-radius: 50% 36px;
}

.mp-layout {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	max-width: var(--mp-width);
	margin: 0 auto;
}

.mp-col,
.mp-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mp-card {
	background: var(--mp-surface);
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	box-shadow: var(--mp-shadow);
}

/* Welcome card (left, above the sign-in card) ------------------------------------------------------ */

.mp-welcome {
	padding: 18px 22px;
}

body.mp-page .mp-welcome .message p {
	margin: 0;
}


/* Sign-in card ---------------------------------------------------------------------------------- */

.mp-signin {
	padding: 20px 22px 22px;
}

/* Inside the sign-in card the form needs no card of its own, and runs a little tighter */
body.mp-page .mp-signin .pw-login {
	max-width: none;
	margin-bottom: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}

body.mp-page .mp-signin .pw-login .pw-title {
	margin-bottom: 6px;
	font-size: 18px;
}

body.mp-page .mp-signin .pw-login label {
	margin: 10px 0 5px;
}

body.mp-page .mp-signin .pw-login input {
	height: 42px;
}

body.mp-page .mp-signin .pw-login .pw-button {
	height: 44px;
	margin-top: 16px;
}

body.mp-page .mp-signin .pw-login .pw-link {
	margin-top: 10px;
}

body.mp-page .mp-signin .pw-divider {
	max-width: none;
	margin: 12px 0;
}

/* Google and Yahoo, side by side as icons */
.mp-social {
	display: flex;
	justify-content: center;
	gap: 14px;
}

body.mp-page .mp-provider {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 46px;
	padding: 0;
	border: 1px solid #d5dbe5;
	border-radius: 12px;
	background: #ffffff;
	cursor: pointer;
	transition: background-color 150ms ease, box-shadow 150ms ease, border-color 150ms ease, transform 120ms ease;
}

body.mp-page .mp-provider:hover {
	background: #f8fafd;
	border-color: #c3cbd8;
	box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
}

body.mp-page .mp-provider:active {
	transform: translateY(1px);
	box-shadow: none;
}

body.mp-page .mp-provider svg {
	width: 24px;
	height: 24px;
}

/* Yahoo signs in through the Janrain widget; its icon appears once the widget has loaded (login.js) */
body.mp-page .mp-provider--pending {
	display: none;
}

/* The Janrain widget still has to load into this element, but its own box is not shown */
body.mp-page #janrainEngageEmbed {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Side cards (right) ---------------------------------------------------------------------------- */

body.mp-page .mp-side .message,
body.mp-page .mp-side .note {
	margin: 0;
	padding: 20px 22px;
	background: var(--mp-surface);
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	box-shadow: var(--mp-shadow);
	color: var(--mp-text);
}

body.mp-page .mp-side p {
	margin: 0 0 10px;
}

body.mp-page .mp-side p:last-child {
	margin-bottom: 0;
}

.mp-illustration {
	display: flex;
	justify-content: center;
	margin: 0 0 14px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef4fd;
}

.mp-illustration img {
	display: block;
	width: 100%;
	max-height: 300px;
	object-fit: contain;
}

/* The note about creating a web account: its first paragraph reads as the heading */
body.mp-page .mp-side .note {
	color: var(--mp-muted);
}

body.mp-page .mp-side .note p:first-child {
	position: relative;
	padding-left: 34px;
	font-size: 15px;
	color: var(--mp-text);
}

body.mp-page .mp-side .note p:first-child::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 24px;
	height: 24px;
	border-radius: 7px;
	background: #e7f0fd no-repeat center / 15px 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231565c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E");
}

/* Password page: one centred card ---------------------------------------------------------------- */

.mp-main--narrow .mp-narrow {
	position: relative;
	max-width: 440px;
	margin: 0 auto;
}

body.mp-page .mp-narrow .pw-login {
	max-width: none;
	padding: 28px 26px 24px;
}

.mp-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0 0 14px;
	border-radius: 14px;
	background: #e7f0fd;
}

.mp-badge svg {
	width: 24px;
	height: 24px;
}

/* Footer ---------------------------------------------------------------------------------------- */

.mp-footer {
	flex-shrink: 0;
	padding: 8px 24px 12px;
	text-align: center;
}

body.mp-page .mp-footer .copyright {
	color: var(--mp-muted);
	font-size: 12px;
	line-height: 1.5;
}

body.mp-page .mp-footer .copyright b {
	color: var(--mp-text);
}

/* Short windows (e.g. a 1366x768 laptop): tighter still, and a smaller illustration */
@media (min-width: 901px) and (max-height: 800px) {
	body.mp-page {
		--mp-header: 50px;
	}

	.mp-main {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.mp-col,
	.mp-side {
		gap: 12px;
	}

	.mp-welcome {
		padding: 14px 18px;
	}

	body.mp-page .mp-welcome .message {
		font-size: 13px;
	}


	.mp-signin {
		padding: 16px 20px 18px;
	}

	body.mp-page .mp-signin .pw-login label {
		margin: 8px 0 4px;
	}

	body.mp-page .mp-signin .pw-login input {
		height: 40px;
	}

	body.mp-page .mp-signin .pw-login .pw-button {
		height: 42px;
		margin-top: 12px;
	}

	body.mp-page .mp-signin .pw-login .pw-link {
		margin-top: 8px;
	}

	body.mp-page .mp-signin .pw-divider {
		margin: 8px 0;
	}

	body.mp-page .mp-provider {
		height: 42px;
	}

	body.mp-page .mp-side .message,
	body.mp-page .mp-side .note {
		padding: 16px 18px;
	}

	.mp-illustration img {
		max-height: 220px;
	}

	.mp-footer {
		padding: 4px 24px 8px;
	}
}

/* Very short windows (a 1366x768 laptop leaves ~650px inside the browser): trim the last spacing */
@media (min-width: 901px) and (max-height: 690px) {
	body.mp-page {
		--mp-header: 46px;
	}

	.mp-main {
		padding-top: 8px;
		padding-bottom: 6px;
	}

	.mp-col,
	.mp-side {
		gap: 10px;
	}

	.mp-welcome {
		padding: 12px 18px;
	}


	.mp-signin {
		padding: 14px 20px 14px;
	}

	body.mp-page .mp-signin .pw-login .pw-title {
		margin-bottom: 2px;
	}

	body.mp-page .mp-signin .pw-login label {
		margin: 6px 0 3px;
	}

	body.mp-page .mp-signin .pw-login input {
		height: 38px;
	}

	body.mp-page .mp-signin .pw-login .pw-button {
		height: 40px;
		margin-top: 10px;
	}

	body.mp-page .mp-signin .pw-login .pw-link {
		margin-top: 6px;
	}

	body.mp-page .mp-signin .pw-divider {
		margin: 4px 0 6px;
	}

	body.mp-page .mp-provider {
		height: 40px;
	}

	.mp-illustration img {
		max-height: 190px;
	}

	.mp-footer {
		padding: 2px 24px 6px;
	}
}

/* Narrow screens: one column, sign-in first ------------------------------------------------------ */

@media (max-width: 900px) {
	.mp-layout {
		grid-template-columns: minmax(0, 560px);
		justify-content: center;
	}
}

@media (max-width: 520px) {
	.mp-header {
		padding: 0 16px;
	}

	.mp-main {
		padding: 14px 14px 24px;
	}

	.mp-welcome,
	.mp-signin,
	body.mp-page .mp-side .message,
	body.mp-page .mp-side .note {
		padding: 18px;
	}

	body.mp-page .mp-narrow .pw-login {
		padding: 24px 20px 20px;
	}
}
