/*
 * Two-step (Gmail-style) login (WI #18767). Each step holds little content, so let the otherwise fixed-height login
 * card shrink to fit and avoid an empty gap below the buttons/tiles. Loaded on every step (identity/methods/password),
 * not just the methods panel, so the card sizes consistently across the flow.
 */
.o-container-loginform {
	height: auto !important;
	min-height: auto !important;
	padding-bottom: 24px;
}

.o-container-loginform .c-login-form-position {
	padding-bottom: 0;
}

/* Hidden login actions must not leave their wrapper padding or floating margins behind. */
.o-container-loginform .c-change-password:not(:has(a)),
.o-container-loginform .o-accesses-container:not(:has(.o-loginbutton-special)),
.o-container-loginform .c-container-loginbutton-special:not(:has(.o-loginbutton-special)) {
	display: none;
}

.c-login-sso {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: fit-content;
	min-width: 44px;
	min-height: 44px;
	margin: 4px auto 0;
	padding: 0 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	text-decoration: none;
}

.c-login-sso__icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.c-login-sso:hover {
	text-decoration: underline;
}

.c-login-sso:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 4px;
}

/*
 * Identity chip on the password step (same look as the methods-step chip). Styles live here because this stylesheet is
 * always loaded for two-step — including the remembered-method shortcut that lands on PASSWORD without ever rendering
 * AuthMethodSelectorPanel.
 */
.c-login-identity-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	margin: 0 0 12px;
	padding: 6px 12px;
	border: 1px solid rgba(128, 128, 128, .4);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

.c-login-identity-chip:hover {
	background: rgba(128, 128, 128, .12);
}

.c-login-identity-chip .c-auth-chip__avatar {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: #5f6368;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.c-login-identity-chip .c-auth-chip__id {
	overflow: hidden;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.c-login-identity-chip .c-auth-chip__caret {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	opacity: .7;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
