.metrics-aggregate-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 4px 0;

	.metrics-time-aggregation-section {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.non-histogram-container {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	&:not(.is-histogram) {
		.metrics-time-aggregation-section,
		.metrics-space-aggregation-section {
			display: flex;
			flex-direction: row;
			align-items: center;

			.metrics-aggregation-section-content {
				flex-wrap: nowrap;
			}
		}
	}

	.metrics-space-aggregation-section {
		display: flex;
		flex-direction: column;
		gap: 4px;

		.metrics-space-aggregation-section-title {
			display: flex;
			align-items: center;
			gap: 6px;

			color: var(--l3-foreground);
			font-family: 'Geist Mono';
			font-size: 12px;
			font-style: normal;
			font-weight: 500;
			line-height: 18px; /* 150% */
			letter-spacing: 0.48px;
		}
	}

	.metrics-aggregation-section-content {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;

		.group-by-filter-container {
			min-width: 340px !important;
		}

		.metrics-aggregation-section-content-item {
			display: flex;
			align-items: center;
			gap: 10px;

			.metrics-aggregation-section-content-item-label {
				color: var(--l2-foreground);
				font-family: 'Geist Mono';
				font-size: 13px;
				font-style: normal;
				font-weight: 400;
				line-height: 20px; /* 142.857% */
				letter-spacing: -0.07px;

				&.main-label {
					color: var(--l3-foreground);
					font-family: 'Geist Mono';
					font-size: 12px;
					font-style: normal;
					font-weight: 500;
					line-height: 18px; /* 150% */
					letter-spacing: 0.48px;
					display: flex;
					align-items: center;
					gap: 6px;
				}
			}

			.metrics-aggregation-section-content-item-value {
				min-width: 140px;

				.ant-select {
					width: 100%;
					.ant-select-selection-search-input {
						min-width: max-content !important;
						max-width: 100% !important;
					}
				}

				.ant-select-selector {
					border-radius: 2px;
					border: 1.005px solid var(--l1-border);
					background: var(--l1-background);
					color: var(--l1-foreground);
					font-family: 'Geist Mono';
					font-size: 13px;
					font-style: normal;
					font-weight: 400;
					line-height: 20px;
					letter-spacing: -0.07px;

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

				.input-with-label {
					.label {
						min-width: 80px;
					}

					.input {
						flex: initial;
						width: 100px !important;
					}
				}
			}
		}
	}

	&.is-histogram {
		.group-by-filter-container {
			width: 420px;
		}

		.histogram-every-input {
			.input {
				flex: initial;
				width: 100px !important;
			}

			.label {
				min-width: 80px;
			}
		}
	}
}

.metrics-operators-select {
	border-radius: 2px;
	border: 1.005px solid var(--l1-border);
	background: var(--l1-background);

	color: var(--l1-foreground);
	font-family: 'Geist Mono';
	font-size: 13px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px; /* 142.857% */
	letter-spacing: -0.07px;
}
