/* Login Template Layout Styles */
.baah-login-page-wrapper {
	position: relative;
	width: 100%;
	min-height: 100vh;
	padding: 24px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	background-color: var(--baah-color-card);
}

.baah-login-page-container {
	display: flex;
	flex: 1;
	gap: 24px;
	max-width: 100%;
}

/* Left Column - Branding */
.baah-login-left-column {
	flex: 0 0 auto;
	width: 45%;
	position: relative;
}

/* Desktop - Sticky Left Column */
@media (min-width: 1024px) {
	.baah-login-left-column {
		position: sticky;
		top: 24px;
		height: calc(100vh - 48px);
		align-self: flex-start;
	}
}

.baah-login-left-inner {
	height: calc(100% - 96px);
	border-radius: 16px;
	background-image: url('../assets/images/bg-pattern.webp');
	background-size: 500px;
	background-repeat: repeat;
	background-position: center;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 48px;
}

.baah-login-left-inner::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/* Gradient overlay: accent to accent-hover with 95% opacity */
	/* Using rgba values that match --baah-color-accent (#3B82F6) and --baah-color-accent-hover (#2563EB) */
	background: linear-gradient(
		to bottom,
		rgba(59, 130, 246, 0.95),
		rgba(37, 99, 235, 0.95)
	);
	z-index: 1;
}

.baah-login-left-upper,
.baah-login-left-lower {
	display: flex;
	align-items: flex-start;
	position: relative;
	z-index: 2;
}

.baah-login-left-upper {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
}

.baah-login-left-upper img {
	width: 360px;
	object-fit: contain;
	object-position: center left;
	max-width: 100%;
	height: auto;
}

.baah-login-left-lower {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	text-align: left;
	color: #FFFFFF;
}

.baah-login-left-heading {
	margin: 0 0 16px 0;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.3;
	color: #FFFFFF;
}

.baah-login-left-subtitle {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.6;
	color: #FFFFFF;
	opacity: 0.95;
}

/* Right Column - Form */
.baah-login-right-column {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 55%;
	min-width: 0;
}

.baah-login-right-inner {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 24px 0;
}

/* Login Form Styles */
.baah-login-form-wrapper {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
}

.baah-login-form {
	position: relative;
}

.baah-login-form-overlay {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 8px;
	z-index: 10;
	cursor: not-allowed;
}

.baah-login-form.loading .baah-login-form-overlay {
	display: block;
}

.baah-login-form-field {
	margin-bottom: 24px;
}

.baah-login-form-field label {
	display: block;
	margin-bottom: 8px;
	color: var(--baah-color-primary);
	font-size: var(--baah-text-normal-font-size);
	font-weight: 600;
	line-height: var(--baah-text-normal-line-height);
	cursor: pointer;
}

.baah-login-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.baah-login-input-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
}

.baah-login-input-icon svg {
	width: 100%;
	height: 100%;
	fill: var(--baah-color-text-muted);
}

.baah-login-input-icon svg path {
	fill: inherit;
}

.baah-login-form-field:focus-within .baah-login-input-icon svg {
	fill: var(--baah-color-accent);
}

.baah-login-form-field input {
	width: 100%;
	padding: 12px 48px 12px 48px;
	border: 1px solid var(--baah-color-border);
	border-radius: 6px;
	background-color: var(--baah-color-card);
	color: var(--baah-color-text);
	font-size: var(--baah-text-normal-font-size);
	font-weight: var(--baah-text-normal-weight);
	line-height: var(--baah-text-normal-line-height);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.baah-login-form-field input::placeholder {
	color: var(--baah-color-text-muted);
}

.baah-login-form-field input:focus {
	outline: none;
	border-color: var(--baah-color-accent);
}

.baah-login-form-field input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background-color: var(--baah-color-card);
}

.baah-login-form-field input.error {
	border-color: var(--baah-color-alert);
}

.baah-login-form-field input.error:focus {
	border-color: var(--baah-color-alert);
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.baah-login-password-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	z-index: 2;
}

.baah-login-password-toggle:focus {
	outline: none !important;
	background: transparent;
}

.baah-login-password-toggle:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.baah-login-password-toggle-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.baah-login-password-toggle-icon svg {
	width: 100%;
	height: 100%;
	fill: var(--baah-color-text-muted);
	transition: fill 0.2s ease;
}

.baah-login-password-toggle:hover .baah-login-password-toggle-icon svg {
	fill: var(--baah-color-text);
}

.baah-login-password-toggle-icon.show {
	display: flex;
}

.baah-login-password-toggle-icon.hide {
	display: none;
}

.baah-login-form-field.password-visible .baah-login-password-toggle-icon.show {
	display: none !important;
}

.baah-login-form-field.password-visible .baah-login-password-toggle-icon.hide {
	display: flex !important;
}

.baah-login-field-error {
	display: none;
	margin-top: 6px;
	color: var(--baah-color-alert);
	font-size: var(--baah-text-small-font-size);
	font-weight: var(--baah-text-small-weight);
	line-height: var(--baah-text-small-line-height);
	min-height: 1.5em;
}

.baah-login-form-message {
	margin-bottom: 20px;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: var(--baah-text-small-font-size);
	font-weight: var(--baah-text-small-weight);
	line-height: var(--baah-text-small-line-height);
	display: none;
}

.baah-login-form-message.error {
	display: block;
	background-color: rgba(239, 68, 68, 0.1);
	border: 1px solid var(--baah-color-alert);
	color: var(--baah-color-alert);
}

.baah-login-form-message.success {
	display: block;
	background-color: rgba(34, 197, 94, 0.1);
	border: 1px solid var(--baah-color-success);
	color: var(--baah-color-success);
}

button.baah-login-submit-button {
	width: 100%;
	padding: 14px 24px;
	background-color: var(--baah-color-accent);
	color: #FFFFFF;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: var(--baah-text-button-font-size);
	font-weight: var(--baah-text-button-weight);
	line-height: var(--baah-text-button-line-height);
	transition: background-color 0.2s ease, transform 0.1s ease;
	position: relative;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
}
button.baah-login-submit-button:focus {
	background-color: var(--baah-color-accent) !important;
}

.baah-login-submit-button:hover,
.baah-login-submit-button:hover:not(:disabled) {
	background-color: var(--baah-color-accent-hover) !important;
}

.baah-login-submit-button:active:not(:disabled) {
	transform: translateY(1px);
}

.baah-login-submit-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.baah-login-submit-text {
	display: inline-block;
}

.baah-login-submit-loader {
	display: none;
	position: absolute;
}

.baah-login-submit-button.loading .baah-login-submit-text {
	opacity: 0;
}

.baah-login-submit-button.loading .baah-login-submit-loader {
	display: block;
	color: #FFFFFF;
}

.baah-login-submit-loader svg {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.baah-login-forgot-password-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
}

.baah-login-divider {
	display: none;
	flex: 1;
	height: 1px;
	background-color: var(--baah-color-border);
}

button.baah-login-forgot-password {
	background: none;
	border: none;
	color: var(--baah-color-accent);
	font-size: var(--baah-text-normal-font-size);
	font-weight: var(--baah-text-normal-weight);
	line-height: var(--baah-text-normal-line-height);
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
	white-space: nowrap;
	background: transparent !important;
}

button.baah-login-forgot-password:hover {
	text-decoration: underline;
	color: var(--baah-color-accent-hover);
	background-color: transparent;
}

/* Forgot Password Form Styles */
.baah-forgot-password-form {
	display: none;
}

.baah-forgot-password-form.active {
	display: block;
}

.form-heading {
	margin: 0 0 12px 0;
	color: var(--baah-color-primary);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}

.form-description {
	margin: 0 0 24px 0;
	color: var(--baah-color-text);
	font-size: var(--baah-text-normal-font-size);
	line-height: var(--baah-text-normal-line-height);
}

.otp-target-highlight {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	background-color: var(--baah-color-accent-light);
	color: var(--baah-color-accent);
	font-weight: 500;
}

/* OTP Input Styles */
.otp-input-wrapper {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: stretch;
}

.otp-input-wrapper input.otp-input {
	flex-grow: 1 !important;
	width: 48px !important;
	height: 56px !important;
	padding: 4px !important;
	text-align: center !important;
	font-size: 24px !important;
	font-weight: 600 !important;
	border: 1px solid var(--baah-color-border) !important;
	border-radius: 8px !important;
	color: var(--baah-color-text) !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
	box-sizing: border-box !important;
	background-color: var(--baah-color-card) !important;
}

.otp-input-wrapper input.otp-input:focus {
	outline: none;
	border-color: var(--baah-color-accent) !important;
}

.otp-input-wrapper input.otp-input.error {
	border-color: var(--baah-color-alert) !important;
}

.otp-resend-wrapper {
	text-align: center;
	margin: 16px 0;
}

button.baah-login-resend-otp {
	background: none;
	border: none;
	color: var(--baah-color-accent);
	font-size: var(--baah-text-normal-font-size);
	font-weight: var(--baah-text-normal-weight);
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

button.baah-login-resend-otp:hover,
button.baah-login-resend-otp:focus {
	background-color: transparent;
}

button.baah-login-resend-otp:hover:not(:disabled) {
	color: var(--baah-color-accent-hover);
	text-decoration: underline;
}

button.baah-login-resend-otp:disabled {
	color: var(--baah-color-text-muted);
	cursor: not-allowed;
	opacity: 0.7;
}

.resend-countdown {
	display: inline-block;
	margin-left: 4px;
}

.baah-login-return-login-wrapper {
	margin-top: 24px;
	text-align: center;
}

button.baah-login-return-login {
	background: none;
	border: none;
	background-color: transparent;
	color: var(--baah-color-accent);
	font-size: var(--baah-text-normal-font-size);
	font-weight: var(--baah-text-normal-weight);
	line-height: var(--baah-text-normal-line-height);
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

button.baah-login-return-login:focus {
	background-color: transparent;
}

button.baah-login-return-login:hover {
	background-color: transparent;
	color: var(--baah-color-accent-hover);
}

/* Signup Link */
.baah-login-signup-link {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--baah-color-accent);
	text-align: center;
	font-size: var(--baah-text-normal-font-size);
	color: var(--baah-color-text);
	line-height: var(--baah-text-normal-line-height);
}

.baah-login-signup-link-text {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--baah-color-accent);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease;
	margin-left: 4px;
}

.baah-login-signup-link-text:hover {
	color: var(--baah-color-accent-hover);
	text-decoration: underline;
}

.baah-login-signup-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.baah-login-signup-link-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.baah-login-signup-link-text:hover .baah-login-signup-link-icon {
	transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.baah-login-form {
		padding: 24px;
	}
	
	.otp-input {
		width: 42px;
		height: 50px;
		font-size: 20px;
	}
	
	.otp-input-wrapper {
		gap: 6px;
	}
}


/* Tablet Styles */
@media (max-width: 1023px) {
	.baah-login-page-container {
		flex-direction: column;
		gap: 40px
	}

	.baah-login-left-column {
		width: 100%;
	}

	.baah-login-left-inner {
		min-height: 180px;
		padding: 48px 32px;
	}

	.baah-login-left-upper {
		justify-content: center;
	}

	.baah-login-left-upper img {
		width: 300px;
	}

	.baah-login-left-lower {
		text-align: center;
		align-items: center;
	}

	.baah-login-left-heading {
		font-size: 28px;
	}

	.baah-login-left-subtitle {
		font-size: 16px;
	}

	.baah-login-right-column {
		flex: 0 0 auto;
		width: 100%;
	}

	.baah-login-right-inner {
		width: 100%;
		padding: 0;
	}
}

/* Mobile Styles */
@media (max-width: 767px) {
	.baah-login-page-wrapper {
		padding: 0;
	}

	.baah-login-page-container {
		flex-direction: column;
		gap: 0;
	}

	.baah-login-left-column {
		width: 100%;
	}

	.baah-login-left-inner {
		min-height: 0;
		border-radius: 0;
		padding: 40px 20px;
		gap: 36px
	}

	.baah-login-left-upper img {
		max-width: 240px;
	}

	.baah-login-left-heading {
		font-size: 24px;
		margin-bottom: 6px;
	}

	.baah-login-left-subtitle {
		font-size: 14px;
	}

	.baah-login-form-wrapper {
		max-width: 100%;
		padding-bottom: 30px;
	}

	.baah-login-form {
		padding: 30px 20px 0 20px;
	}

}

