@import '@signozhq/design-tokens/dist/style.css';

.login-form-container {
	display: flex;
	justify-content: center;
	width: 100%;
	align-items: flex-start;
}

.login-form-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 32px;
	text-align: center;
	width: 100%;
}

.login-form-emoji {
	width: 32px;
	height: 32px;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.login-form-title {
	font-family: Inter, sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	color: var(--l1-foreground);
	margin: 0 !important;
}

.login-form-description {
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: -0.065px;
	color: var(--l2-foreground);
	max-width: 317px;
	margin: 0 !important;
	text-align: center;
}

.login-form-card {
	width: 100%;
	background: var(--l2-background);
	border: 1px solid var(--l2-border);
	border-radius: 4px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.login-error-container {
	margin-top: 24px;
	width: 100%;

	.error-content {
		background: color-mix(in srgb, var(--danger-background) 10%, transparent);
		border: 1px solid
			color-mix(in srgb, var(--danger-background) 20%, transparent);
		border-radius: 4px;

		&__summary-section {
			border-bottom: 1px solid
				color-mix(in srgb, var(--danger-background) 20%, transparent);
		}

		&__summary {
			padding: 16px;
		}

		&__summary-left {
			gap: 10px;
		}

		&__icon-wrapper {
			width: 12px;
			height: 12px;
			flex-shrink: 0;
		}

		.login-error-icon {
			color: var(--bg-cherry-200);
			padding-top: 1px;
		}

		&__summary-text {
			gap: 6px;
		}

		&__error-code {
			color: #fadadb;
			font-size: 13px;
			font-weight: 500;
			line-height: 1;
			letter-spacing: -0.065px;
		}

		&__error-message {
			color: #f5b6b8;
			font-size: 13px;
			font-weight: 400;
			line-height: 20px;
			letter-spacing: -0.065px;
		}

		&__message-badge {
			padding: 0px 16px 16px;
		}

		&__message-badge-label-text {
			color: #fadadb;
		}

		&__message-badge-line {
			background-image: radial-gradient(
				circle,
				color-mix(in srgb, var(--danger-background) 30%, transparent) 1px,
				transparent 2px
			);
		}

		&__messages-section {
			padding: 0;
		}

		&__message-list {
			max-height: 200px;
		}

		&__message-item {
			color: #f5b6b8;
			font-size: 13px;
			font-weight: 400;
			line-height: 20px;
			letter-spacing: -0.065px;

			&::before {
				background: #f5b6b8;
			}
		}

		&__scroll-hint {
			background: color-mix(in srgb, var(--danger-background) 20%, transparent);
		}

		&__scroll-hint-text {
			color: #fadadb;
		}
	}
}

.password-label-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-bottom: 12px;

	> label {
		margin-bottom: 0;
	}
}

.forgot-password-link {
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.065px;
	color: var(--text-neutral-dark-200) !important;

	&:hover {
		color: var(--text-neutral-dark-300) !important;
	}
}

.login-form-input {
	height: 32px;
	background: var(--l2-background) !important;
	border: 1px solid var(--l2-border) !important;
	border-radius: 2px;
	padding: 6px 8px;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.065px;
	color: var(--l1-foreground);

	&::placeholder {
		color: var(--l3-foreground);
	}

	&:hover:not(:disabled) {
		border-color: var(--l1-border);
	}

	&:focus {
		border-color: var(--primary);
		box-shadow: none;
	}

	// Select component styling to match Input
	&.ant-select {
		width: 100%;
		height: 32px;
		margin: 0;
		padding: 0;

		.ant-select-selector {
			height: 32px !important;
			min-height: 32px !important;
			padding: 0 8px !important;
			border-radius: 2px !important;
			font-family: Inter, sans-serif !important;
			font-size: 13px !important;
			font-weight: 400 !important;
			line-height: 1 !important;
			letter-spacing: -0.065px !important;
			background: var(--l2-background) !important;
			border: 1px solid var(--l2-border) !important;
			display: flex !important;
			align-items: center !important;
		}

		.ant-select-selection-search {
			height: 20px;
			line-height: 20px;
		}

		.ant-select-selection-item,
		.ant-select-selection-placeholder {
			line-height: 20px !important;
			height: 20px !important;
			font-family: Inter, sans-serif !important;
			font-size: 13px !important;
			font-weight: 400 !important;
			letter-spacing: -0.065px !important;
			display: flex !important;
			align-items: center !important;
			margin: 0 !important;
		}

		.ant-select-selection-placeholder {
			color: var(--l2-foreground) !important;
		}

		.ant-select-selection-item {
			color: var(--l1-foreground) !important;
		}

		&:hover .ant-select-selector {
			border-color: var(--l1-border) !important;
		}

		&.ant-select-focused .ant-select-selector {
			border-color: var(--primary) !important;
			box-shadow: none !important;
		}
	}

	// Remove border for orgId Select only
	&.login-form-select-no-border {
		&.ant-select .ant-select-selector {
			border: none !important;
		}

		&.ant-select:hover .ant-select-selector {
			border: none !important;
		}

		&.ant-select.ant-select-focused .ant-select-selector {
			border: none !important;
			box-shadow: none !important;
		}
	}
}

.login-form-actions {
	width: 100%;
	margin-top: 24px;
}

.login-submit-btn {
	width: 100%;
}
