/*
 * Daylight sign-in layout: the hero photo fills the screen like an open sky, the brand copy sits low on the left,
 * and the form floats on the right in a white card under a small sun. On phones the photo becomes a banner and
 * the card overlaps its lower edge. Colours come from the variables in inc/login.php.
 */

body.login {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	padding: 48px 7vw;
	box-sizing: border-box;
}

/* the sky: photo + a gradient that darkens towards the copy */
.mrp-login-hero {
	position: fixed;
	inset: 0;
	z-index: 0;
	color: #fff;
	background:
		linear-gradient(200deg, rgba(10, 61, 98, 0) 30%, rgba(10, 61, 98, 0.55) 70%, rgba(6, 36, 58, 0.92) 100%),
		var(--mrp-l-hero) center / cover no-repeat,
		var(--mrp-l-panel);
}
.mrp-login-hero__inner {
	position: absolute;
	inset: 44px 7vw 52px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	max-width: calc(100% - 7vw - 520px);
}
.mrp-login-hero__wordmark {
	align-self: flex-start;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	font-family: var(--mrp-l-heading-font);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.mrp-login-hero__eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mrp-l-accent);
}
.mrp-login-hero__title {
	margin: 0 0 14px;
	max-width: 14ch;
	font-family: var(--mrp-l-heading-font);
	font-weight: 800;
	font-size: clamp(30px, 3.6vw, 52px);
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 24px rgba(6, 36, 58, 0.4);
}
.mrp-login-hero__rule { display: none; }
.mrp-login-hero__tagline {
	margin: 0;
	max-width: 42ch;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

/* the card */
#login {
	position: relative;
	z-index: 1;
	max-width: 440px;
	margin: 0;
	padding: 40px 36px 32px;
	background: var(--mrp-l-surface);
	border-radius: 24px;
	box-shadow: 0 30px 70px -30px rgba(6, 36, 58, 0.55);
}
/* the sun, rising over the card's top edge */
#login::before {
	content: "";
	position: absolute;
	top: -26px;
	right: 32px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ffe2a8, var(--mrp-l-accent) 55%, #ff9f1c);
	box-shadow: 0 0 0 10px rgba(255, 181, 46, 0.2), 0 0 44px rgba(255, 159, 28, 0.55);
}
#loginform, #lostpasswordform, #registerform, #resetpassform {
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}
.login .message, .login .success, .login .notice, .login #login_error { background: var(--mrp-l-bg); }

/* the bits core prints after the card sit on the photo */
.login .language-switcher, .login .privacy-policy-page-link {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	margin: 16px 0 0;
}
.login .language-switcher { display: flex; justify-content: flex-end; }
.login #language-switcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 6px 6px 14px;
	border-radius: 999px;
	background: var(--mrp-l-surface);
	box-shadow: 0 10px 30px -18px rgba(6, 36, 58, 0.6);
}
.login #language-switcher label { margin: 0; color: var(--mrp-l-muted); }
.login .language-switcher select, .login .language-switcher .button {
	min-height: 32px;
	border-color: var(--mrp-l-input-border);
	border-radius: 999px;
	color: var(--mrp-l-ink);
	background: var(--mrp-l-input-bg);
}
.login .language-switcher .button { color: var(--mrp-l-primary); border-color: var(--mrp-l-primary); }
.login .privacy-policy-page-link { text-align: right; }
.login .privacy-policy-page-link a { color: #fff; }

@media (max-width: 960px) {
	.mrp-login-hero__copy { display: none; }
}

/* phones: photo banner on top, card overlapping its edge */
@media (max-width: 782px) {
	body.login { align-items: stretch; justify-content: flex-start; padding: 0 0 32px; }
	.mrp-login-hero {
		position: relative;
		inset: auto;
		order: -1; /* the panel is the page's last element */
		flex: none;
		height: 220px;
		background:
			linear-gradient(180deg, rgba(10, 61, 98, 0.1) 0%, rgba(6, 36, 58, 0.75) 100%),
			var(--mrp-l-hero-sm) center / cover no-repeat,
			var(--mrp-l-panel);
	}
	.mrp-login-hero__inner { inset: 20px 16px 64px; max-width: none; }
	.mrp-login-hero__copy { display: block; }
	.mrp-login-hero__tagline { display: none; }
	.mrp-login-hero__title { font-size: 24px; margin: 0; }
	.mrp-login-hero__eyebrow { font-size: 11px; margin-bottom: 6px; }
	#login { margin: -48px 16px 0; width: auto; max-width: none; padding: 34px 22px 26px; border-radius: 20px; }
	#login::before { width: 40px; height: 40px; top: -20px; right: 24px; }
	.login .language-switcher, .login .privacy-policy-page-link { margin: 16px 16px 0; width: auto; max-width: none; }
	.login .language-switcher, .login .privacy-policy-page-link { justify-content: center; text-align: center; }
	.login .privacy-policy-page-link a { color: var(--mrp-l-muted); }
}
body.interim-login { display: block; padding: 0; }
body.interim-login #login { margin: 0 auto; box-shadow: none; padding: 24px; }
body.interim-login #login::before { display: none; }
