.alert-condition-container {
	margin: 0 16px;
	margin-top: 24px;

	.alert-condition {
		display: flex;
		align-items: center;
		margin-left: 12px;
		margin-top: 24px;

		.alert-condition-tabs {
			display: flex;
			border-radius: 2px;
			border: 1px solid var(--l1-border);
			background: var(--l2-background);
			flex-direction: row;
			border-bottom: none;
			margin-bottom: -1px;

			.explorer-view-option {
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: row;
				border: none;
				padding: 9px;
				box-shadow: none;
				border-radius: 0px;
				border-left: 0.5px solid var(--l1-border);
				border-bottom: 0.5px solid var(--l1-border);
				width: 120px;
				height: 36px;

				gap: 8px;

				&.active-tab {
					background-color: var(--l1-background);
					border-bottom: none;

					&:hover {
						background-color: var(--l1-background) !important;
					}
				}

				&:disabled {
					background-color: var(--l2-background);
					opacity: 0.6;
				}

				&:first-child {
					border-left: 1px solid transparent;
				}

				&:hover {
					background-color: transparent !important;
					border-left: 1px solid transparent !important;
					color: var(--l1-foreground);
				}
			}
		}
	}
}

.alert-threshold-container,
.anomaly-threshold-container {
	padding: 24px;
	padding-right: 72px;
	background-color: var(--l1-background);
	border: 1px solid var(--l1-border);
	width: 100%;

	.alert-condition-sentences {
		display: flex;
		flex-direction: column;
		gap: 12px;

		.alert-condition-sentence {
			display: flex;
			align-items: center;
			gap: 16px;
			flex-wrap: wrap;

			.sentence-text {
				color: var(--l2-foreground);
				font-size: 13px;
				line-height: 1.5;
				display: flex;
				align-items: center;
				gap: 8px;
			}

			.ant-select {
				width: 240px;

				.ant-select-selector {
					background-color: var(--l2-background);
					border: 1px solid var(--l1-border);
					color: var(--muted-foreground);
					font-family: 'Space Mono';

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

					&:focus {
						border-color: var(--l1-border);
						box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
					}
				}

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

				.ant-select-arrow {
					color: var(--muted-foreground);
				}
			}
		}
	}

	.thresholds-section {
		margin-top: 16px;
		margin-left: 24px;

		.threshold-item {
			display: flex;
			flex-direction: column;
			gap: 0;
			margin-bottom: 16px;

			.threshold-row {
				display: flex;
				align-items: center;
				gap: 16px;
				margin-bottom: 2px;

				.threshold-indicator {
					.threshold-dot {
						width: 12px;
						height: 12px;
						border-radius: 50%;
						flex-shrink: 0;
					}
				}

				.threshold-controls {
					display: flex;
					align-items: center;
					gap: 8px;
					flex-wrap: wrap;

					.ant-input {
						background-color: var(--card);
						border: 1px solid var(--l1-border);
						color: var(--l1-foreground);
						height: 32px;

						&::placeholder {
							font-family: 'Space Mono';
						}

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

						&:focus {
							border-color: var(--l1-border);
							box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
						}
					}

					.ant-select {
						.ant-select-selector {
							background-color: var(--card);
							border: 1px solid var(--l1-border);
							color: var(--l1-foreground);
							height: 32px;

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

							&:focus {
								border-color: var(--l1-border);
								box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
							}

							.ant-select-selection-placeholder {
								font-family: 'Space Mono';
							}
						}

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

						.ant-select-arrow {
							color: var(--muted-foreground);
						}
					}

					.icon-btn {
						color: var(--muted-foreground);
						border: 1px solid var(--l1-border);
						border-radius: 4px;
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}

			.recovery-threshold-input-group {
				display: flex;
				align-items: center;
				gap: 0;
				margin-left: 28px;

				.recovery-threshold-label {
					pointer-events: none;
					cursor: default;
				}

				.recovery-threshold-btn {
					pointer-events: none;
					cursor: default;
					color: var(--muted-foreground);
					background-color: var(--card) !important;
					border: 1px solid var(--l1-border);
					border-radius: 4px;
					display: flex;
					align-items: center;
					justify-content: center;
				}

				.ant-input {
					background-color: var(--card);
					border: 1px solid var(--l1-border);
					color: var(--l1-foreground);
					height: 32px;

					&::placeholder {
						font-family: 'Space Mono';
					}

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

					&:focus {
						border-color: var(--l1-border);
						box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
					}
				}
			}
		}

		.add-threshold-btn {
			margin-top: 8px;
			border: 1px dashed var(--l1-border);
			color: var(--l2-foreground);
			background-color: transparent;
			border-radius: 4px;
			height: 32px;
			padding: 0 16px;
			display: flex;
			align-items: center;
			justify-content: center;

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

			.anticon {
				margin-right: 8px;
			}
		}
	}

	.routing-policies-info-banner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		margin-top: 16px;
		background-color: color-mix(
			in srgb,
			var(--primary-background) 10%,
			transparent
		);
		border: 1px solid var(--primary-background);
		padding: 8px 16px;

		.routing-policies-info-banner-right {
			display: flex;
			align-items: center;
			gap: 8px;

			.view-routing-policies-button {
				color: var(--accent-primary);
				font-size: 12px;
				font-weight: 500;
				display: flex;
				align-items: center;
				gap: 4px;
			}
		}

		.ant-typography {
			color: var(--accent-primary);
		}
	}
}

.anomaly-threshold-container {
	.ant-select {
		.ant-select-selector {
			min-width: 150px;
		}
	}
}

.condensed-alert-threshold-container,
.condensed-anomaly-threshold-container {
	width: 100%;
}

.condensed-advanced-options-container {
	margin-top: 16px;
	width: fit-parent;
}

.condensed-evaluation-settings-container {
	.ant-btn {
		display: flex;
		align-items: center;
		min-width: 240px;
		width: auto;
		justify-content: space-between;
		background-color: var(--l2-background);
		border: 1px solid var(--l1-border);

		.evaluate-alert-conditions-button-left {
			color: var(--l2-foreground);
			font-size: 12px;
			flex-shrink: 0;
		}

		.evaluate-alert-conditions-button-right {
			display: flex;
			align-items: center;
			color: var(--l2-foreground);
			gap: 8px;
			flex-shrink: 0;

			.evaluate-alert-conditions-button-right-text {
				font-size: 12px;
				font-weight: 500;
				background-color: var(--l1-border);
				padding: 1px 4px;
			}
		}
	}
}

.highlighted-text {
	font-weight: bold;
	color: var(--bg-robin-400);
	margin: 0 4px;
}

// Tooltip styles
.tooltip-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;

	.tooltip-description {
		margin-bottom: 8px;

		span {
			font-weight: bold;
			color: var(--bg-robin-400);
		}
	}

	.tooltip-example {
		margin-bottom: 8px;
		color: var(--l2-foreground);
	}

	.tooltip-link {
		.tooltip-link-text {
			color: var(--accent-primary);
			font-size: 11px;
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}
		}
	}
}
