/* shared tag chip styles for inline content tags */
/* used by both user-facing content pages and the content editor */

.tag-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	margin: 0 2px;
	background: rgba(23, 162, 184, 0.15);
	border: 1px solid rgba(23, 162, 184, 0.3);
	border-radius: 12px;
	font-size: 0.9em;
	vertical-align: middle;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.tag-chip:hover {
	background: rgba(23, 162, 184, 0.25);
	border-color: rgba(23, 162, 184, 0.5);
}

/* tag type variants */
.tag-chip-list {
	background: rgba(40, 167, 69, 0.15);
	border-color: rgba(40, 167, 69, 0.3);
}

.tag-chip-list:hover {
	background: rgba(40, 167, 69, 0.25);
	border-color: rgba(40, 167, 69, 0.5);
}

.tag-chip-expansion {
	background: rgba(255, 193, 7, 0.15);
	border-color: rgba(255, 193, 7, 0.3);
}

.tag-chip-expansion:hover {
	background: rgba(255, 193, 7, 0.25);
	border-color: rgba(255, 193, 7, 0.5);
}

/* custom color support via inline style --tag-color */
.tag-chip[style*="--tag-color"] {
	border-color: var(--tag-color);
	background: color-mix(in srgb, var(--tag-color) 15%, transparent);
}

.tag-chip[style*="--tag-color"]:hover {
	border-color: var(--tag-color);
	background: color-mix(in srgb, var(--tag-color) 25%, transparent);
}

/* error state */
.tag-chip-error {
	background: rgba(220, 53, 69, 0.2);
	border-color: rgba(220, 53, 69, 0.4);
}

/* icon styling */
.tag-chip-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
	border-radius: 2px;
}

/* icon group for multiple icons (e.g., race icons) */
.tag-chip-icons {
	display: inline-flex;
	gap: 2px;
}

/* tag text/link styling */
.tag-chip-text {
	color: var(--text-color-normal, #c0aa87);
	text-decoration: none;
}

.tag-chip:hover .tag-chip-text {
	color: var(--text-color-link, #fff);
}

/* editor-specific: non-editable chip behavior */
.tag-chip[contenteditable="false"] {
	cursor: default;
	user-select: none;
}
