.mybuildings-sso-container {
	/* display: inline-block; */
	text-align: center;
	margin: 10px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mybuildings-sso-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	cursor: pointer;
}

.mybuildings-btn-modern {
	background: #0073aa;
	color: #ffffff !important;
	border: 1px solid #005177;
}

.mybuildings-btn-modern:hover {
	background: #005177;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
}

.mybuildings-btn-gradient {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	color: #ffffff !important;
	border: none;
}

.mybuildings-btn-gradient:hover {
	background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(30, 60, 114, 0.4);
}

.mybuildings-btn-accent {
	background: #27ae60;
	color: #ffffff !important;
	border: none;
}

.mybuildings-btn-accent:hover {
	background: #219150;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.mybuildings-sso-btn .mybuildings-icon {
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.mybuildings-sso-btn .mybuildings-arrow {
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.mybuildings-sso-btn:hover .mybuildings-arrow {
	transform: translateX(4px);
}

.mybuildings-sso-subtext {
	font-size: 12px;
	color: #666666;
	margin-top: 6px;
	margin-bottom: 0;
}

/* ==========================================================================
   MyBuildings Login Button – Trigger Button Variant
   ========================================================================== */

.mybuildings-login-trigger {
	border: none;
	cursor: pointer;
	font-family: inherit;
}

/* ==========================================================================
   Login Modal – Overlay & Box
   ========================================================================== */

/* Lock body scroll when a modal is open */
body.mb-modal-open {
	overflow: hidden;
}

.mb-login-modal {
	position: fixed;
	inset: 0;
	/* top/right/bottom/left: 0 */
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	/* shown/hidden via JS, not CSS display */
	text-align: center;
}

/* Semi-transparent backdrop */
.mb-login-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 40, 0.65);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	cursor: pointer;
}

/* The white card */
.mb-login-modal__box {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
	width: 100%;
	max-width: 440px;
	overflow: hidden;
	animation: mb-modal-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes mb-modal-pop {
	from {
		opacity: 0;
		transform: scale(0.92) translateY(12px);
	}

	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* ==========================================================================
   Modal Header
   ========================================================================== */

.mb-login-modal__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 24px 16px;
	background: linear-gradient(135deg, #1a1a1a 0%, #1a1a1a 100%);
	color: #ffffff;
}

.mb-login-modal__header svg {
	flex-shrink: 0;
	opacity: 0.9;
}

.mb-login-modal__header h2 {
	flex: 1;
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
}

.mb-login-modal__close-btn {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	padding: 0;
	flex-shrink: 0;
}

.mb-login-modal__close-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Modal Body
   ========================================================================== */

.mb-login-modal__body {
	padding: 24px;
	text-align: left !important;
}

.mb-login-modal__subtitle {
	margin: 0 0 20px;
	font-size: 14px;
	color: #555e6e !important;
	line-height: 1.5;
}

/* ==========================================================================
   Login Form Fields
   ========================================================================== */

.mb-login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mb-login-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mb-login-form__field label {
	font-size: 13px;
	font-weight: 600;
	color: #2d3748;
	margin: 0;
}

.mb-login-form__input {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid #d1d9e0;
	border-radius: 8px;
	font-size: 14px;
	color: #1a202c;
	background: #f8fafc;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	box-sizing: border-box;
	outline: none;
	font-family: inherit;
}

.mb-login-form__input:focus {
	border-color: #2a5298;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.15);
}

/* Password wrapper – input + toggle button side-by-side */
.mb-login-form__pw-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.mb-login-form__pw-wrap .mb-login-form__input {
	padding-right: 44px;
	/* room for the toggle */
}

.mb-login-form__pw-toggle {
	position: absolute;
	right: 10px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #718096;
	display: flex;
	align-items: center;
	transition: color 0.2s ease;
}

.mb-login-form__pw-toggle:hover {
	color: #2a5298;
}

/* ==========================================================================
   Inline Alert (error / success / info)
   ========================================================================== */

.mb-login-alert {
	padding: 11px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.5;
	border: 1px solid transparent;
}

.mb-login-alert.mb-alert--error {
	background: #fff5f5;
	border-color: #fed7d7;
	color: #c53030;
}

.mb-login-alert.mb-alert--success {
	background: #f0fff4;
	border-color: #c6f6d5;
	color: #276749;
}

.mb-login-alert.mb-alert--info {
	background: #ebf8ff;
	border-color: #bee3f8;
	color: #2b6cb0;
}

/* ==========================================================================
   Submit Button inside the form
   ========================================================================== */

.mb-login-form__submit {
	width: 100%;
	justify-content: center;
	border: none;
	cursor: pointer;
	font-family: inherit;
	margin-top: 4px;
}

.mb-login-form__submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

/* Spinner animation for the submit button */
.mb-submit-spinner {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mb-spin {
	animation: mb-rotate 0.8s linear infinite;
}

@keyframes mb-rotate {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Responsive – narrow screens
   ========================================================================== */

@media (max-width: 480px) {
	.mb-login-modal__box {
		border-radius: 12px;
	}

	.mb-login-modal__header {
		padding: 16px 18px 14px;
	}

	.mb-login-modal__header h2 {
		font-size: 16px;
		margin-top: 18px;
	}

	.mb-login-modal__body {
		padding: 18px;
	}
}