/*
 * Microsoft-branded sign-in button for wp-login.php.
 * Dimensions, colors and type follow Microsoft's brand guidelines for
 * "Sign in with Microsoft": 41px height, white background, #8c8c8c border,
 * square corners, 21px logo, Segoe UI 15px #5e5e5e label.
 */

.starshot-sso-login {
	display: flex;
	justify-content: center;
	margin: 24px 0;
}

.starshot-sso-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	height: 41px;
	min-width: 215px;
	padding: 0 12px;
	background-color: #ffffff;
	border: 1px solid #8c8c8c;
	border-radius: 0;
	box-shadow: none;
	color: #5e5e5e;
	font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
}

.starshot-sso-btn:hover {
	background-color: #f3f3f3;
	color: #5e5e5e;
}

.starshot-sso-btn:focus-visible {
	outline: 2px solid #0067b8;
	outline-offset: 2px;
}

.starshot-sso-btn__logo {
	flex: 0 0 auto;
	width: 21px;
	height: 21px;
}

.starshot-sso-btn__label {
	white-space: nowrap;
}

/*
 * Sign-in screen with Microsoft as the only route in.
 *
 * Hidden, not removed: the form is still in the DOM and still POSTs, so a
 * broken IDP does not lock the site out - wp-login.php?password=1 drops this
 * class, and a browser with styles off never gets it. What actually refuses a
 * password for an enforced role is Starshot_SSO_Admin_Enforcement, server side.
 *
 * #nav goes too: "Lost your password?" leads nowhere useful when the password
 * is not what signs you in, and password reset is blocked for enforced roles.
 */

body.starshot-sso-password-hidden #loginform,
body.starshot-sso-password-hidden #nav {
	display: none;
}

/* Nothing above or below it any more, so it gets the room the form had. */
body.starshot-sso-password-hidden .starshot-sso-login {
	margin: 32px 0;
}

/*
 * Starshot wordmark in place of the WordPress logo.
 *
 * Core cuts .login h1 a as an 84px square for its own round mark, so a wordmark
 * needs the box re-cut to its 500x116.5 ratio. The image URL is added inline by
 * Starshot_SSO_Login_Button::logo_css() rather than set here: it is filterable,
 * and the plugin URL is only known at runtime. background-size: contain so a
 * filtered logo of another shape fits the box instead of stretching.
 *
 * The nudge is optical, not a correction. The wordmark ends at 89.65% of the
 * SVG's width and the trailing asterisk owns the rest, so a geometrically
 * centred logo reads as sitting left of the button beneath it. Half that
 * trailing block - 10.35% of 260px, so about 13px - puts the word "Starshot"
 * over the centre line instead of the whole lockup. Re-measure it if the logo
 * is ever swapped; a filtered logo of another shape should probably drop it.
 */

.login h1 a {
	width: 260px;
	height: 61px;
	background-size: contain;
	background-position: center;
	margin: 0 auto 24px;
	transform: translateX(13px);
}
