@font-face {
	font-family: Velasans;
	src: url("../fonts/VelaSans-GX.ttf") format("truetype");
}

@font-face {
	font-family: Bion;
	src: url("../fonts/Bion-Bold.ttf") format("truetype");
}

:root {
	--keycloak-logo-url: url("../img/keycloak-logo-text.png");
	--keycloak-bg-logo-url: url("../img/login_content.png");
	--keycloak-logo-height: 63px;
	--keycloak-logo-width: 300px;
}

.pf-v5-c-login__container {
	grid-template-columns: 34rem;
	grid-template-areas:
		"header"
		"main";
}

div.kc-logo-text {
	background-image: var(--keycloak-logo-url);
	height: var(--keycloak-logo-height);
	width: var(--keycloak-logo-width);
	background-repeat: no-repeat;
	background-size: contain;
	margin: 0 auto;
}

div.kc-logo-text span {
	display: none;
}

.kc-login-tooltip {
	position: relative;
	display: inline-block;
}

.kc-login-tooltip .kc-tooltip-text {
	top: -3px;
	left: 160%;
	background-color: black;
	visibility: hidden;
	color: #fff;

	min-width: 130px;
	text-align: center;
	border-radius: 2px;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
	padding: 5px;

	position: absolute;
	opacity: 0;
	transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
	visibility: visible;
	opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
	content: " ";
	position: absolute;
	top: 15px;
	right: 100%;
	margin-top: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: transparent black transparent transparent;
}

#kc-recovery-codes-list {
	columns: 2;
}

#certificate_subjectDN {
	overflow-wrap: break-word;
}

#kc-header-wrapper {
	font-size: 29px;
	text-transform: uppercase;
	letter-spacing: 3px;
	line-height: 1.2em;
	white-space: normal;
	color: var(--pf-v5-global--Color--light-100) !important;
	text-align: center;
}

hr {
	margin-top: var(--pf-v5-global--spacer--sm);
	margin-bottom: var(--pf-v5-global--spacer--md);
}

@media (min-width: 768px) {
	div.pf-v5-c-login__main-header {
		grid-template-columns: 70% 30%;
	}
}

/* Custom reassigned */
#kc-form,
#kc-reset-password-form {
	width: 600px;
}
#back-to-login-btn {
	width: auto;
}
#back-to-login-btn::after {
	border: none;
}
.pf-v5-c-helper-text__item-text a {
	color: #1fa7f8;
}
.no-account-text {
	color: #1fa7f8;
	font-size: 14px;
}
.register-text {
	margin-left: 5px;
	color: #1fa7f8;
	font-size: 14px;
}
.reset-btns {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
}
.toggle-password-visibility {
	background-color: #f5f6fa;
	border: 1px solid #afb5d1;
	border-left: 0;
	display: flex;
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
}
.password-visibility-btn {
	background-color: #f5f6fa;
	border: none;
	color: #7d829b;
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
}
.password-visibility-btn:hover {
	border-bottom-color: #afb5d1;
}
.password-visibility-icon {
	color: #7d829b;
}
.password-wrapper {
	width: 100%;
}
.input-label {
	color: #7d829b;
}
#kc-login,
#kc-cancel,
#kc-form-buttons,
#kc-form-buttons-link {
	margin-top: 30px;
	color: #f5f6fa;
	background-color: #027fff;
	font-size: 14px;
	padding-right: 20px;
	padding-left: 20px;
	padding-top: 11px;
	padding-bottom: 11px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 11px;
	align-items: center;
	width: fit-content;
	cursor: pointer;
	border: none;
}

#kc-cancel {
	background-color: transparent;
	color: #027fff;
	border-color: #027fff;
	border-radius: 8px;
	min-width: 100px;
	justify-content: center;
}

#kc-cancel:hover {
	border-color: #027fff;
	border-width: 1px;
}

#kc-logout {
	background-color: transparent;
	padding: 0;
	cursor: pointer;
}

#kc-form-button-register,
#registerWebAuthn,
#kc-form-buttons-submit {
	color: #f5f6fa;
	background-color: #027fff;
	font-size: 14px;
	padding-right: 20px;
	padding-left: 20px;
	padding-top: 11px;
	padding-bottom: 11px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 11px;
	align-items: center;
	width: fit-content;
	cursor: pointer;
	border: none;
}

#kc-login:hover {
	background-color: #0d51a6;
}
#kc-form-buttons:hover {
	background-color: #0d51a6;
}
#kc-form-buttons-link:hover {
	background-color: #0d51a6;
}

/* register  */
#kc-register-form {
	width: 600px;
	display: grid;
	grid-template-columns: 1fr 1fr;
}
#register-btn {
	background-color: transparent;
	padding: 0px;
	font-size: 14px;
	cursor: pointer;
	margin-top: 0;
}
#kc-form-button-register:has(input:disabled) {
	opacity: 0.6;
}
#register-input-wrapper {
	background-color: transparent;
	border: none !important;
}
#register-input-wrapper:hover {
	border-bottom: 0 !important;
}
.register-btns-wrapper {
	grid-column: span 2;
	margin-top: 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.register-btns-wrapper a {
	color: #1fa7f8;
	font-size: 14px;
}
#kc-form-options a {
	color: #1fa7f8;
	font-size: 14px;
}
.register-not-allowed {
	color: #ff7468;
}
.pf-m-error,
.kc-feedback-text {
	color: #ff7468;
}
#kc-oauth {
	color: #1d1d1f;
	max-width: 600px;
}

#kc-oauth p {
	margin-top: 20px;
}

#kc-oauth #kc-login {
	min-width: 100px;
	justify-content: center;
}

#kc-oauth {
	color: #1d1d1f;
}
#kc-oauth .pf-v5-c-form__actions {
	justify-content: space-between;
}
.oauth-grant-request {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 10px;
}
#email-verify-instruction {
	text-align: center;
}

/* update/reset pssw */
#kc-info-message .instruction,
#kc-logout-confirm .instruction {
	color: #1d1d1f;
}
#kc-logout-confirm #kc-form-buttons {
	margin-top: 16px;
}
.instruction {
	color: #1d1d1f;
}
#kc-error-message .instruction {
	color: #ff7468;
}

.email-verify-message {
	color: #1d1d1f;
	padding-left: 8px;
	padding-right: 8px;
	word-wrap: break-word;
}

.pf-v5-c-check__label {
	color: #7d829b;
}
#kc-passwd-update-form,
#kc-update-profile-form {
	width: 600px;
}
#submit-btn-reset {
	color: #f5f6fa;
	background-color: #027fff;
	font-size: 14px;
	padding-right: 20px;
	padding-left: 20px;
	padding-top: 11px;
	padding-bottom: 11px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 11px;
	align-items: center;
	width: fit-content;
	cursor: pointer;
	border: none;
}
#kc-update-profile-form input[type="submit"] {
	background-color: transparent;
	padding: 0px;
	font-size: 14px;
	cursor: pointer;
	margin-top: 0;
}
.policy-checkbox,
.terms-checkbox {
	font-size: 14px;
	color: #1d1d1f;
}
/* Custom */
.button-action {
	margin-top: 40px;
}
.button-action-logout {
	margin-top: 16px;
}
.fa-eye,
.fa-eye-slash {
	margin-right: 5px;
	font-size: 14px;
}
.login {
	display: flex;
	flex-direction: column;
	height: 100vh;
	font-family: Velasans;
}
.login-wrapper {
	display: flex;
	height: calc(100% - 62px);
}

.login-img {
	/* background-image: var(--keycloak-bg-logo-url);
	background-size: cover;
	background-position: center; */
	height: 100%;
	width: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	/* background-color: #0b1427; Dark background to make logos more visible */
}

.login-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Add a dark overlay to make the logo more visible */
/* .login-img::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.2);
	z-index: 1;
} */
.login-form {
	overflow: auto;
	padding: 20px 0;
	width: 50%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
	background-color: white;
	position: relative;
}
.login-form_nav-text {
	position: absolute;
	top: 40px;
	left: 80px;
	font-size: 14px;
	color: #027fff;
	margin-top: 16px;
	margin-left: 12px;
	cursor: pointer;
	display: flex;
	gap: 8px;
}
.login-form_form-container {
	max-width: 600px;
}
.sign-in-main-text {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 20px;
	color: black;
	font-family: Bion;
}
.sign-in-pre-text {
	font-size: 18px;
	color: #1d1d1f;
}
.sign-in-inputs {
	margin-top: 40px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.sign-in-inputs-wrapper {
	position: relative;
	font-size: 14px;
}
.sign-in-label {
	margin-bottom: 4px;
	display: block;
	color: #7d829b;
	font-weight: 500;
	font-size: 14px;
}
.sign-in-input-wrapper {
	position: relative;
}
.sign-in-icon {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
}
.sign-in-input {
	width: 100%;
	background-color: #f5f6fa;
	padding-right: 16px;
	padding-left: 16px;
	padding-top: 12px;
	padding-bottom: 12px;
	border: 1px solid #afb5d1;
	border-radius: 8px;
	color: #1d1d1f;
	font-size: 14px;
}
.sign-in-input:focus {
	border-color: #afb5d1;
	outline: none;
}
.sign-in-input:focus-visible {
	border-color: #afb5d1;
	outline: none;
}
.sign-in-input-password {
	border-right: 0;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
}
.sign-in-forgot {
	font-size: 14px;
	color: #027fff;
	margin-top: 16px;
	margin-left: 12px;
	cursor: pointer;
}
.sign-in-btn {
	margin-top: 40px;
	color: #f5f6fa;
	background-color: #027fff;
	font-size: 14px;
	padding-right: 20px;
	padding-left: 20px;
	padding-top: 11px;
	padding-bottom: 11px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 11px;
	align-items: center;
	width: fit-content;
	cursor: pointer;
	border: none;
}
.sign-in-btn:hover {
	background-color: #0d51a6;
}
.sign-in-btn_input {
	background-color: transparent;
	border: none;
	color: white;
}
.sign-in-links {
	position: absolute;
	bottom: 40px;
	width: 100%;
	padding-left: 80px;
	padding-right: 80px;
}
.sign-in-links_list {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #027fff;
}
.login-footer {
	width: 100%;
	background-color: #d9e2ed;
	display: flex;
	justify-content: center;
	align-items: center;
	/* margin-top: auto; */
	color: #7d829b;
	font-size: 12px;
}
.login-footer_text {
	padding: 21px 0;
}

.client-info {
	margin-bottom: 40px;
	width: 600px;
}

.client-name {
	font-size: 32px;
	font-weight: 700;
	color: black;
	font-family: Bion;
}

.client-description {
	font-size: 18px;
	color: #1d1d1f;
	margin-top: 16px;
}

.client-links {
	position: absolute;
	bottom: 42px;
	width: 100%;
	/* padding: 0 90px; */
	display: flex;
	justify-content: center;
	gap: 30px;
	/* gap: 1.5rem;
	margin-top: 2rem;
	flex-wrap: wrap; */
}

.link-item {
	font-size: 12px;
	text-align: center;
}

.terms-link,
.policy-link {
	color: #0078d4;
	text-decoration: none;
	transition: color 0.2s ease;
}

.terms-link:hover,
.policy-link:hover {
	color: #005a9e;
	text-decoration: underline;
}

.client-logo {
	max-width: 80%;
	max-height: 80%;
	width: auto;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
	position: relative;
	z-index: 2;
}

.client-logo-overlay {
	max-width: 80%;
	max-height: 80%;
	width: auto;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
	position: relative;
	z-index: 2;
}

@media (max-width: 1300px) {
	#kc-form,
	#kc-reset-password-form,
	#kc-register-form,
	#kc-update-profile-form,
	.client-info,
	.login-form_form-container {
		width: 400px;
	}
}

@media (max-width: 920px) {
	.login-img {
		display: none;
	}
	.login-form {
		width: 100%;
	}
}

@media (max-width: 500px) {
	#kc-form,
	#kc-reset-password-form,
	#kc-register-form,
	#kc-update-profile-form,
	.client-info,
	.login-form_form-container {
		width: 300px;
	}
}

@media (max-width: 1400px) {
	.client-links {
		gap: 15px;
	}
}

@media (max-width: 1000px) {
	.login-form {
		justify-content: flex-start;
	}
	#kc-login,
	#kc-form-buttons-submit,
	#submit-btn-reset {
		margin-top: 0;
		padding-top: 8px;
		padding-bottom: 8px;
	}
	#kc-oauth #kc-login {
		margin-top: 30px;
	}
	.client-logo {
		max-height: 150px;
	}

	.client-name {
		font-size: 1.5rem;
	}

	.client-description {
		font-size: 0.9rem;
	}

	.client-links {
		flex-direction: column;
		align-items: center;
		gap: 0.75rem;
	}
}

.login .client-description {
	font-size: 0.7rem;
}

.login .client-info {
	margin-bottom: 10px;
}