.dropdown {
	position: relative;
	user-select: none;
	background: var(--c-surface0);
	padding: 2px 5px;
	font-size: 14px;
	white-space: nowrap;
	max-width: 160px;
	min-width: 60px;
}

.dropdown .selected {
	display: flex;
	gap: 5px;
	align-items: center;
	cursor: pointer;
}

.dropdown .selected::after,
.dropdown .opt.active::before,
.dropdown .tags .tag {
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

.dropdown .selected::after {
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	background-image: url(icons/chevron.svg);
	transform: rotate(180deg);
	flex-shrink: 0;
}

.dropdown .cont {
	display: flex;
	position: absolute;
	bottom: calc(100% + 4px);
	left: 0;
	flex-direction: column;
	background: var(--c-surface0);
	max-height: 250px;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.05),
		0 1px 3px rgba(0, 0, 0, 0.1);
	border: 1px solid var(--c-surface1);
}

.dropdown:not(.open) .cont {
	display: none;
}

.dropdown .opts {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.dropdown .selected,
.dropdown .opt {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 5px;
}

.dropdown .opt {
	padding: 4px 6px;
	cursor: pointer;
	background: var(--c-surface0);
}

.dropdown .opt:nth-child(2n + 1) {
	background: var(--c-surface0-dark);
}

.dropdown .opt:hover {
	background: var(--c-base);
}

.dropdown .opt.active {
	background: var(--c-base-dark);
	padding-left: 20px;
	position: relative;
}

.dropdown .opt.active::before {
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	position: absolute;
	top: 50%;
	left: 3px;
	background-image: url(icons/chevron.svg);
	transform: translateY(-50%) rotate(90deg);
}

.dropdown .opt.filtered {
	display: none;
	font-weight: 500;
}

.dropdown .opt .new {
	font-size: 11px;
	padding-left: 4px;
	position: relative;
	top: -2px;
	color: var(--c-red);
	font-weight: 500;
}

.dropdown .label {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	max-width: 300px;
}

.dropdown .tags {
	display: flex;
	gap: 2px;
}

.dropdown .tags .tag {
	width: 18px;
	height: 18px;
}

.dropdown .selected .new {
	display: none;
}

.dropdown .selected:not(.all-tags) .tags:has(.tag:nth-child(3)) {
	display: flex;
	height: 2px;
	gap: 1px;
	width: 100%;
	position: absolute;
	bottom: 0;
	left: 0;
}

.dropdown .selected:not(.all-tags) .tags:has(.tag:nth-child(3)) .tag {
	background: var(--color);
	width: 100%;
	height: 2px;
}

.tags .tag.reasoning {
	--color: var(--c-mauve);
	background-image: url(icons/tags/reasoning.svg);
}

.tags .tag.tools {
	--color: var(--c-yellow);
	background-image: url(icons/tags/tools.svg);
}

.tags .tag.vision {
	--color: var(--c-red);
	background-image: url(icons/tags/vision.svg);
}

.tags .tag.json {
	--color: var(--c-sapphire);
	background-image: url(icons/tags/json.svg);
}

.tags .tag.image {
	--color: var(--c-rosewater);
	background-image: url(icons/tags/image.svg);
}

.tags .tag.free {
	--color: var(--c-green);
	background-image: url(icons/tags/free.svg);
}

.tags .tag.all {
	background-image: url(icons/tags/all.svg);
}

.dropdown .search {
	background: var(--c-base-dark);
	border-top: 2px solid var(--c-surface1);
	font-size: 15px;
	padding: 4px 6px;
}