/**
 * EF SSO Login Overlay UX
 * Version: 0.1.0-dev107-rc8b-dismissible-standard-login
 *
 * Premium frontend overlay for standard login transitions.
 * Presentation only: does not alter SSO tokens, redirects, handoff payloads,
 * cookies, runtime routing, or Nextend authentication flow.
 */

html.ef-sso-login-overlay-active,
html.ef-sso-login-overlay-active body,
html.ef-sso-login-overlay-active a,
html.ef-sso-login-overlay-active button,
html.ef-sso-login-overlay-active input,
html.ef-sso-login-overlay-active .nsl-button {
	cursor: progress !important;
}

html.ef-sso-login-overlay-can-dismiss,
html.ef-sso-login-overlay-can-dismiss body,
html.ef-sso-login-overlay-can-dismiss #ef-sso-login-overlay,
html.ef-sso-login-overlay-can-dismiss #ef-sso-login-overlay button {
	cursor: default !important;
}

#ef-sso-login-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	background: rgba(13, 13, 13, 0.42);
	-webkit-backdrop-filter: blur(4px) saturate(1.15);
	backdrop-filter: blur(4px) saturate(1.15);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 120ms ease, visibility 120ms ease;
}

html.ef-sso-login-overlay-active #ef-sso-login-overlay,
#ef-sso-login-overlay.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ef-sso-login-overlay__card {
	position: relative;
	width: min(92vw, 420px);
	padding: 34px 34px 30px;
	box-sizing: border-box;
	border-radius: 22px;
	text-align: center;
	color: #fff;
	background: linear-gradient(180deg, rgba(45, 41, 38, 0.70), rgba(22, 20, 19, 0.66));
	border: 1px solid rgba(255,255,255,0.20);
	box-shadow: 0 24px 80px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.15);
	-webkit-backdrop-filter: blur(18px) saturate(1.1);
	backdrop-filter: blur(18px) saturate(1.1);
	transform: translateY(8px) scale(0.985);
	animation: ef-sso-overlay-enter 180ms ease forwards;
}

@keyframes ef-sso-overlay-enter {
	to { transform: translateY(0) scale(1); }
}

.ef-sso-login-overlay__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 999px;
	background: rgba(255,255,255,0.08);
	color: rgba(255,255,255,0.86);
	font: 400 24px/30px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	text-align: center;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer !important;
	transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.ef-sso-login-overlay__close:hover,
.ef-sso-login-overlay__close:focus {
	background: rgba(218,43,31,0.82);
	color: #fff;
	transform: scale(1.04);
	outline: none;
}

.ef-sso-login-overlay__brand {
	margin: 0 0 24px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1;
	text-transform: uppercase;
}

.ef-sso-login-overlay__brand-red {
	color: #da2b1f;
}

.ef-sso-login-overlay__brand-white {
	color: #ffffff;
}

.ef-sso-login-overlay__spinner {
	width: 42px;
	height: 42px;
	margin: 0 auto 22px;
	border-radius: 50%;
	border: 4px solid rgba(255,255,255,0.24);
	border-top-color: #da2b1f;
	animation: ef-sso-overlay-spin 0.86s linear infinite;
}

@keyframes ef-sso-overlay-spin {
	to { transform: rotate(360deg); }
}

.ef-sso-login-overlay__title {
	margin: 0 0 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.ef-sso-login-overlay__message,
.ef-sso-login-overlay__hint {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	font-weight: 500;
	color: rgba(255,255,255,0.82);
}

.ef-sso-login-overlay__message {
	margin: 0;
}

.ef-sso-login-overlay__hint {
	min-height: 0;
	margin: 0;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height 160ms ease, opacity 160ms ease, margin-top 160ms ease;
}

#ef-sso-login-overlay.is-dismissible .ef-sso-login-overlay__hint {
	max-height: 90px;
	margin-top: 14px;
	opacity: 1;
}

.ef-sso-login-overlay__bar {
	position: relative;
	overflow: hidden;
	height: 3px;
	margin: 24px 0 0;
	border-radius: 999px;
	background: rgba(255,255,255,0.20);
}

.ef-sso-login-overlay__bar::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 42%;
	border-radius: inherit;
	background: linear-gradient(90deg, #da2b1f, #ff6a5f);
	animation: ef-sso-overlay-bar 1.25s ease-in-out infinite;
}

@keyframes ef-sso-overlay-bar {
	0% { transform: translateX(-110%); }
	55% { transform: translateX(92%); }
	100% { transform: translateX(240%); }
}

/* Premium override for Nextend's own redirect overlay on login surfaces. */
#nsl-redirect-overlay {
	z-index: 2147483000 !important;
	background: rgba(13, 13, 13, 0.42) !important;
	-webkit-backdrop-filter: blur(4px) saturate(1.15) !important;
	backdrop-filter: blur(4px) saturate(1.15) !important;
	cursor: progress !important;
}

#nsl-redirect-overlay-container {
	width: min(92vw, 420px) !important;
	box-sizing: border-box !important;
	padding: 34px 34px 30px !important;
	border-radius: 22px !important;
	background: linear-gradient(180deg, rgba(45, 41, 38, 0.70), rgba(22, 20, 19, 0.66)) !important;
	border: 1px solid rgba(255,255,255,0.20) !important;
	box-shadow: 0 24px 80px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.15) !important;
	-webkit-backdrop-filter: blur(18px) saturate(1.1) !important;
	backdrop-filter: blur(18px) saturate(1.1) !important;
	color: #fff !important;
}

#nsl-redirect-overlay-spinner {
	width: 42px !important;
	height: 42px !important;
	margin: 0 auto 22px !important;
	border: 4px solid rgba(255,255,255,0.24) !important;
	border-top-color: #da2b1f !important;
	box-shadow: none !important;
	animation: ef-sso-overlay-spin 0.86s linear infinite !important;
}

#nsl-redirect-overlay-title {
	margin: 0 0 10px !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-size: 20px !important;
	line-height: 1.25 !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em !important;
	color: #fff !important;
}

#nsl-redirect-overlay-text {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.55 !important;
	font-weight: 500 !important;
	color: rgba(255,255,255,0.82) !important;
}

@media (prefers-reduced-motion: reduce) {
	.ef-sso-login-overlay__card,
	.ef-sso-login-overlay__spinner,
	.ef-sso-login-overlay__bar::before,
	#nsl-redirect-overlay-spinner {
		animation: none !important;
	}
}
