.roles-settings {
	.roles-settings-header {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		width: 100%;
		padding: 16px;

		.roles-settings-header-title {
			color: var(--l1-foreground);
			font-family: Inter;
			font-style: normal;
			font-size: 18px;
			font-weight: 500;
			line-height: 28px;
			letter-spacing: -0.09px;
			margin: 0;
		}

		.roles-settings-header-description {
			color: var(--foreground);
			font-family: Inter;
			font-style: normal;
			font-size: 14px;
			font-weight: 400;
			line-height: 20px;
			letter-spacing: -0.07px;
			margin: 0;
		}
	}

	.roles-settings-content {
		padding: 0 16px;
	}

	.roles-settings-toolbar {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 12px;

		.role-settings-toolbar-button {
			display: flex;
			width: 156px;
			height: 32px;
			padding: 6px 12px;
			justify-content: center;
			align-items: center;
			gap: 6px;
			border-radius: 2px;
		}
	}
}

.roles-description-tooltip {
	max-height: none;
	overflow-y: visible;
}

.roles-listing-table {
	margin-top: 12px;
	border-radius: 4px;
	overflow: hidden;
}

.roles-table-scroll-container {
	overflow-x: auto;
}

.roles-table-inner {
	min-width: 850px;
}

.roles-table-header {
	display: flex;
	align-items: center;
	padding: 8px 16px;
	gap: 24px;
}

.roles-table-header-cell {
	font-family: Inter;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.44px;
	color: var(--foreground);
	line-height: 16px;

	&--name {
		flex: 0 0 180px;
	}

	&--description {
		flex: 1;
		min-width: 0;
	}

	&--created-at {
		flex: 0 0 180px;
		text-align: right;
	}

	&--updated-at {
		flex: 0 0 180px;
		text-align: right;
	}
}

.roles-table-section-header {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 32px;
	padding: 0 16px;
	background: color-mix(in srgb, var(--bg-robin-200) 4%, transparent);
	border-top: 1px solid var(--secondary);
	border-bottom: 1px solid var(--secondary);
	font-family: Inter;
	font-size: 12px;
	font-weight: 400;
	color: var(--foreground);
	line-height: 16px;
	margin: 0;

	&__count {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 18px;
		padding: 0 6px;
		border-radius: 9px;
		background: var(--l3-background);
		font-size: 12px;
		font-weight: 500;
		color: var(--foreground);
		line-height: 1;
	}
}

.roles-table-row {
	display: flex;
	align-items: center;
	padding: 8px 16px;
	background: color-mix(in srgb, var(--bg-robin-200) 2%, transparent);
	border-bottom: 1px solid var(--secondary);
	gap: 24px;

	&--clickable {
		cursor: pointer;

		&:hover {
			background: color-mix(in srgb, var(--bg-robin-200) 5%, transparent);
		}
	}
}

.roles-table-cell {
	font-family: Inter;
	font-size: 14px;
	font-weight: 400;
	color: var(--foreground);
	line-height: 20px;

	&--name {
		flex: 0 0 180px;
		font-weight: 500;
	}

	&--description {
		flex: 1;
		min-width: 0;
		overflow: hidden;
	}

	&--created-at {
		flex: 0 0 180px;
		text-align: right;
		white-space: nowrap;
	}

	&--updated-at {
		flex: 0 0 180px;
		text-align: right;
		white-space: nowrap;
	}
}

.roles-table-empty {
	padding: 24px 16px;
	text-align: center;
	color: var(--foreground);
	font-family: Inter;
	font-size: 14px;
	font-weight: 400;
}

.roles-table-pagination {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 8px 16px;

	.ant-pagination-total-text {
		margin-right: auto;

		.numbers {
			font-family: Inter;
			font-size: 12px;
			color: var(--foreground);
		}

		.total {
			font-family: Inter;
			font-size: 12px;
			color: var(--foreground);
			opacity: 0.5;
		}
	}
}

.create-role-modal {
	.ant-modal-content {
		padding: 0;
		background: var(--l2-background);
		border: 1px solid var(--secondary);
		border-radius: 4px;
	}

	.ant-modal-header {
		background: var(--l2-background);
		border-bottom: 1px solid var(--secondary);
		padding: 16px;
		margin-bottom: 0;
	}

	.ant-modal-close {
		top: 14px;
		inset-inline-end: 16px;
		width: 14px;
		height: 14px;
		color: var(--foreground);

		.ant-modal-close-x {
			font-size: 12px;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.ant-modal-title {
		color: var(--l1-foreground);
		font-family: Inter;
		font-size: 13px;
		font-weight: 400;
		line-height: 1;
		letter-spacing: -0.065px;
	}

	.ant-modal-body {
		padding: 16px;
	}

	.create-role-form {
		display: flex;
		flex-direction: column;
		gap: 16px;

		.ant-form-item {
			margin-bottom: 0;
		}

		.ant-form-item-label {
			padding-bottom: 8px;

			label {
				color: var(--foreground);
				font-family: Inter;
				font-size: 14px;
				font-weight: 400;
				line-height: 20px;
			}
		}

		// todo: https://github.com/SigNoz/components/issues/116
		input,
		textarea {
			width: 100%;
			background: var(--l3-background);
			border: 1px solid var(--l1-border);
			border-radius: 2px;
			padding: 6px 8px;
			font-family: Inter;
			font-size: 14px;
			font-weight: 400;
			line-height: 18px;
			letter-spacing: -0.07px;
			color: var(--l1-foreground);
			outline: none;
			box-shadow: none;

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

			&:focus,
			&:hover {
				border-color: var(--input);
				box-shadow: none;
			}
		}

		input {
			height: 32px;
		}

		input:disabled {
			opacity: 0.5;
			cursor: not-allowed;

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

		textarea {
			min-height: 100px;
			resize: vertical;
		}
	}

	.ant-modal-footer {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		gap: 12px;
		margin: 0;
		padding: 0 16px;
		height: 56px;
		border-top: 1px solid var(--secondary);
	}
}
