/*!
 * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

.systemtags-select2-dropdown {
	.select2-result-label {
		height: 25px;

		.checkmark {
			visibility: hidden;
			margin-inline: -5px 5px;
			padding: 4px;
		}
		.new-item .systemtags-actions {
			display: none;
		}
	}
	.select2-selected .select2-result-label .checkmark {
		visibility: visible;
	}
	.select2-result-label .icon {
		display: inline-block;
		opacity: .5;
		&.rename {
			padding: 4px;
		}
	}
	.systemtags-actions {
		position: absolute;
		inset-inline-end: 5px;
	}
	.systemtags-rename-form {
		display: inline-block;
		width: calc(100% - 20px);
		top: -6px;
		position: relative;
		input {
			display: inline-block;
			height: 30px;
			width: calc(100% - 40px);
		}
	}
	.label {
		width: 85%;
		display: inline-block;
		overflow: hidden;
		text-overflow: ellipsis;
		&.hidden {
			display: none;
		}
	}
	span {
		line-height: 25px;
	}
	.systemtags-item {
		display: inline-block;
		height: 25px;
		width: 100%;
	}
}

.systemtags-select2-container {
	width: 100%;

	.select2-choices {
		flex-wrap: nowrap !important;
		max-height: 44px;
	}

	.select2-choices .select2-search-choice.select2-locked .label {
		opacity: 0.5;
	}
}

#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {
	padding: 5px;
}
