﻿

.MainContainer .LoginContainer {
	width: unset;
	height: unset;
}


.LoginContainer {
	width: 100vw;
	height: 100vh;
	background-color: var(--background);
	display: grid;
	grid-auto-rows: 1fr 618px 1fr;
	overflow: auto;
	gap: 1em;
	justify-items: center;
	padding: 5px;
}

	.LoginContainer .Logo {
		height: min-content;
		margin-top: auto;
	}


	.LoginContainer .Login_ML {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: .3em;
	}

		.LoginContainer .Login_ML > div {
			display: flex;
			gap: 0.5em;
			height: min-content;
		}

			.LoginContainer .Login_ML > div:last-of-type {
				margin-bottom: auto;
			}

.LoginContent {
	height: 100%;
	max-width: 28em;
	border: 1px solid var(--border-color);
	border-radius: 1.5em;
	background-color: var(--content-color);
	padding: 1.5em 3em;
	justify-content: center;
	position: relative;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: 38px min-content auto min-content min-content;
	gap: 1em;
	grid-auto-flow: row;
	grid-template-areas:
		"Header"
		"Title"
		"Body"
		"Commands"
		"Footer";
}


	.LoginContent:not(.Active) {
		display: none;
	}

	.LoginContent [ml_pagecontainer_type=EntityFields_ContainerGroup] {
		width: calc(100% + 10px);
	}

.Login_Header {
	grid-area: Header;
	display: flex;
	font-size: 1.8em;
	color: var(--primary);
	font-weight: bold;
	align-items: center;
	justify-content: space-between;
}

.Login_Title {
	grid-area: Title;
	padding-bottom: .3em;
}

.Login_Body {
	grid-area: Body;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
}

	.Login_Body > * {
		width: 100%;
	}

	.Login_Body .Separator {
		margin: 1em 0;
		position: relative;
		display: flex;
		justify-content: center;
	}

		.Login_Body .Separator::before {
			content: ' ';
			position: absolute;
			background-color: var(--border-color);
			width: 100%;
			height: 1px;
			top: 50%;
		}

		.Login_Body .Separator span {
			background-color: var(--content-color);
			z-index: 1;
			padding-inline: 15px;
		}


.Login_Commands {
	grid-area: Commands;
	display: flex;
	gap: .3em;
	flex-direction: column;
}

	.Login_Commands .Button {
		width: 100%;
		border-radius: 5px;
		display: flex;
		justify-content: center;
		height: 43px;
	}



.Login_Footer {
	grid-area: Footer;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	max-height: 48px;
}

	.Login_Footer .Button {
		font-size: 12px;
		text-decoration: underline var(--button-text-color);
		padding: 2px 6px;
	}



.Login_Socials {
	grid-area: Socials;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: .3em;
}

	.Login_Socials .SocialButton {
		padding-inline: 10px;
		border: 1px solid var(--border-color);
		height: 45px;
		gap: 20px;
		--button-text-color: var(--text) !important;
		background-color: transparent !important;
		width: 100%;
		border-radius: 5px;
		align-items: center;
	}

		.Login_Socials .SocialButton > img {
			height: 22px;
		}

		.Login_Socials .SocialButton > [ML_PageControl_Key=GoogleRenderPanel] {
			opacity: 0;
			position: absolute
		}

		.Login_Socials .SocialButton.Linked {
			min-width: fit-content;
			outline: 2px solid var(--primary);
			--button-primary-color: var(--accent-100);
			margin-right: auto;
		}

			.Login_Socials .SocialButton.Linked span {
				display: none;
			}

			.Login_Socials .SocialButton.Linked::after {
				content: '\f0c1';
				font-family: 'Font Awesome 6 Pro';
				font-size: 19px;
				color: var(--primary);
			}


/*****************	Language Selector	*******************/
.LanguageSelector {
	display: flex;
	cursor: pointer;
	margin-inline: .25em;
	border-radius: .5em;
	overflow: hidden;
	transition: all var(--cookieman-animation-duration) ease;
}

	.LanguageSelector img {
		height: 17px;
		border-radius: 5px;
		border: 1px solid var(--border-color);
	}

	.LanguageSelector:is(:hover, :active) {
		transform: scale(1.1);
	}

/* Lang selector box */
.LanguageSelectorBox {
	display: flex;
	background-color: var(--content-color);
	padding: 1em;
	flex-direction: column;
	width: 150px;
}

	.LanguageSelectorBox .Language img {
		height: 17px;
		transition: all 1s ease;
		border-radius: 5px;
	}

	.LanguageSelectorBox .Language {
		display: flex;
		gap: .5em;
		cursor: pointer;
		padding: .375em .75em;
		align-items: center;
	}

		.LanguageSelectorBox .Language:is(:hover, :active) {
			background-color: #e1e1e1;
			border-radius: .375em;
		}

			.LanguageSelectorBox .Language:is(:hover, :active) img {
				transform: scale(1.1);
			}


/***************	Field linked with social		************/
.LoginContent .Login_Body [ml_pagecontrol_key=EntityField_Container].Google:before {
	content: '';
	position: absolute;
	top: 15px;
	right: 17px;
	width: 25px;
	height: 25px;
	background-image: url('/Resources/Images/Socials/Google.svg');
	background-size: cover;
	background-repeat: no-repeat;
}

.LoginContent .Login_Body [ml_pagecontrol_key=EntityField_Container].Facebook:before {
	content: '';
	position: absolute;
	top: 15px;
	right: 17px;
	width: 25px;
	height: 25px;
	background-image: url('/Resources/Images/Socials/facebook.svg');
	background-size: cover;
	background-repeat: no-repeat;
}

/***************	Password Robustness		************/
.StrongPasswordLevel {
	display: flex;
	width: 100%;
	height: 16px;
	align-items: center;
	border-radius: 5px;
	padding: 5px 0;
	--progress: 4%;
	--progress-color: var(--error);
	transition: all .5s ease;
	transition-delay: 0.5s;
}

	.StrongPasswordLevel.Typing {
		--progress: 8%;
	}

	.StrongPasswordLevel.Weak {
		--progress: 33%;
		--progress-color: var(--warning);
	}

		.StrongPasswordLevel.Weak.Typing {
			--progress: 38%;
		}

	.StrongPasswordLevel.OK {
		--progress: 66%;
		--progress-color: var(--success);
	}

		.StrongPasswordLevel.OK.Typing {
			--progress: 70%;
		}

	.StrongPasswordLevel.Strong {
		--progress: 100%;
		--progress-color: var(--primary);
	}

	.StrongPasswordLevel .Progress {
		background-color: var(--progress-color);
		height: 100%;
		width: var(--progress);
		border-radius: inherit;
		transition: all 1s ease;
		transition-delay: 0.5s;
	}

/*****************	Remember me		*******************/

.checkboxContainer {
	display: flex;
	align-items: center;
	padding: 10px 0;
	gap: 10px;
}


	.checkboxContainer [for] {
		cursor: pointer;
	}

	.checkboxContainer .check {
		cursor: pointer;
		position: relative;
		margin: auto;
		width: 18px;
		height: 18px;
		-webkit-tap-highlight-color: transparent;
		transform: translate3d(0, 0, 0);
		margin: 0;
	}

		.checkboxContainer .check svg {
			position: relative;
			z-index: 1;
			fill: none;
			stroke-linecap: round;
			stroke-linejoin: round;
			stroke: #c8ccd4;
			stroke-width: 1.5;
			transform: translate3d(0, 0, 0);
			transition: all 0.2s ease;
		}

			.checkboxContainer .check svg path {
				stroke-dasharray: 60;
				stroke-dashoffset: 0;
			}

			.checkboxContainer .check svg polyline {
				stroke-dasharray: 22;
				stroke-dashoffset: 66;
			}

		.checkboxContainer .check:hover:before {
			opacity: 1;
		}

		.checkboxContainer .check:hover svg {
			stroke: var(--primary);
		}

	.checkboxContainer input:checked + .check svg {
		stroke: var(--primary);
	}

		.checkboxContainer input:checked + .check svg path {
			stroke-dashoffset: 60;
			transition: all 0.3s linear;
		}

		.checkboxContainer input:checked + .check svg polyline {
			stroke-dashoffset: 42;
			transition: all 0.2s linear;
			transition-delay: 0.15s;
		}

/*****************	Responsive login container senza height as magic number	*******************/
/*ex. Session lost, Pagina Recupero credenziali*/

/*Brutto, per sistemare meglio si dovrebbe cambiare il layout della login*/

.LoginContainer.ResponsiveLoginContainer,
.LoginContainer:has( .SigningIn.Active ),
.LoginContainer:has( .LinkExpired.Active ) {
	grid-auto-rows: 1fr min-content 1fr;
}
