.context-links-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.context-links-text {
	color: var(--l2-foreground);
	font-family: 'Space Mono';
	font-size: 13px;
	font-style: normal;
	font-weight: 400;
	line-height: 18px;
	letter-spacing: 0.52px;
	text-transform: uppercase;
}

.context-links-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 300px;
}

.context-link-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px;
	border-radius: 4px;
	user-select: none;
	transition: background-color 0.2s ease-in-out;
	width: 100%;
	min-width: 0;

	.drag-handle {
		display: flex;
		align-items: center;
		gap: 8px;
		flex-grow: 1;
		cursor: grab;
		min-width: 0;

		&:active {
			cursor: grabbing;
		}
	}

	.drag-handle-icon {
		flex-shrink: 0;
		color: var(--l2-foreground);
	}

	.context-link-content {
		display: flex;
		flex-direction: column;
		gap: 2px;
		flex-grow: 1;
		min-width: 0;
		overflow: hidden;
	}

	.context-link-label {
		color: var(--l1-foreground);
		font-size: 12px;
		font-weight: 500;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.context-link-url {
		color: var(--l2-foreground);
		font-size: 12px;
		font-weight: 400;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.context-link-actions {
		display: flex;
		gap: 4px;
		opacity: 0;
		transition: opacity 0.2s ease-in-out;
		flex-shrink: 0;
	}

	.edit-context-link-btn,
	.delete-context-link-btn {
		padding: 6px 12px;
		flex-shrink: 0;
	}

	.delete-context-link-btn {
		&:hover {
			color: var(--bg-cherry-400) !important;
			border-color: var(--bg-cherry-400) !important;
		}
	}

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

		.context-link-actions {
			opacity: 1;
		}
	}
}

.add-context-link-button {
	width: 100%;
}
