/* jxy_autotag 帖子标签自动获取 - 前台样式（全部类名使用 .jxy-autotag- 前缀） */
/* 注意：色相变量 --jxy-tag-h 只在 .jxy-autotag-c0~c9 上定义， */
/* 基础类一律用 var(--jxy-tag-h, 210) 典型值兑底，避免覆盖调色板。 */

/* ============ 多彩调色板（10 色，按标签名 crc32 稳定取色） ============ */
.jxy-autotag-c0 { --jxy-tag-h: 212; }
.jxy-autotag-c1 { --jxy-tag-h: 340; }
.jxy-autotag-c2 { --jxy-tag-h: 152; }
.jxy-autotag-c3 { --jxy-tag-h: 32;  }
.jxy-autotag-c4 { --jxy-tag-h: 265; }
.jxy-autotag-c5 { --jxy-tag-h: 188; }
.jxy-autotag-c6 { --jxy-tag-h: 6;   }
.jxy-autotag-c7 { --jxy-tag-h: 96;  }
.jxy-autotag-c8 { --jxy-tag-h: 300; }
.jxy-autotag-c9 { --jxy-tag-h: 240; }

/* ============ 帖子详情页：正文底部标签行 ============ */
.jxy-autotag-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--bs-border-color, #dee2e6);
}

.jxy-autotag-label {
	display: inline-flex;
	align-items: center;
	font-size: 15px;
	line-height: 1;
	color: var(--bs-secondary-color, #6c757d);
	opacity: .8;
}

.jxy-autotag-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 18px;
	text-decoration: none;
	color: hsl(var(--jxy-tag-h, 212), 62%, 36%);
	background: hsl(var(--jxy-tag-h, 212), 82%, 93%);
	border: 1px solid hsl(var(--jxy-tag-h, 212), 70%, 84%);
	transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}

.jxy-autotag-tag .jxy-autotag-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex: 0 0 auto;
	background: hsl(var(--jxy-tag-h, 212), 68%, 50%);
}

.jxy-autotag-tag:hover {
	color: #fff;
	background: hsl(var(--jxy-tag-h, 212), 70%, 50%);
	border-color: hsl(var(--jxy-tag-h, 212), 70%, 44%);
	box-shadow: 0 5px 12px hsla(var(--jxy-tag-h, 212), 60%, 45%, .3);
	transform: translateY(-1px);
}

.jxy-autotag-tag:hover .jxy-autotag-dot { background: #fff; }

.jxy-autotag-tag:active { transform: translateY(0); }

/* ============ 主题列表页：标题后的迷你标签 ============ */
.jxy-autotag-inline {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-left: 6px;
	vertical-align: middle;
}

.jxy-autotag-mini {
	display: inline-block;
	padding: 0 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 500;
	line-height: 18px;
	text-decoration: none;
	color: hsl(var(--jxy-tag-h, 212), 62%, 38%);
	background: hsl(var(--jxy-tag-h, 212), 82%, 93%);
	border: 1px solid hsl(var(--jxy-tag-h, 212), 70%, 86%);
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.jxy-autotag-mini:hover {
	color: #fff;
	background: hsl(var(--jxy-tag-h, 212), 70%, 50%);
	border-color: hsl(var(--jxy-tag-h, 212), 70%, 44%);
}

/* ============ 标签云（尺寸整体收紧） ============ */
.jxy-autotag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.jxy-autotag-cloud-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 11px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	line-height: 20px;
	color: hsl(var(--jxy-tag-h, 212), 62%, 36%);
	background: hsl(var(--jxy-tag-h, 212), 82%, 93%);
	border: 1px solid hsl(var(--jxy-tag-h, 212), 70%, 84%);
	transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}

.jxy-autotag-cloud-item:hover {
	color: #fff;
	background: hsl(var(--jxy-tag-h, 212), 70%, 50%);
	border-color: hsl(var(--jxy-tag-h, 212), 70%, 44%);
	box-shadow: 0 6px 14px hsla(var(--jxy-tag-h, 212), 60%, 45%, .3);
	transform: translateY(-1px);
}

.jxy-autotag-cloud-item .jxy-autotag-count {
	font-size: 10px;
	font-weight: 600;
	padding: 0 5px;
	border-radius: 999px;
	color: hsl(var(--jxy-tag-h, 212), 62%, 32%);
	background: hsla(var(--jxy-tag-h, 212), 72%, 84%, .9);
}

.jxy-autotag-cloud-item:hover .jxy-autotag-count {
	color: #fff;
	background: rgba(255, 255, 255, .24);
}

/* 标签云热度字号（比 1.0.2 整体缩小） */
.jxy-autotag-level-1 { font-size: 11.5px; }
.jxy-autotag-level-2 { font-size: 12px; }
.jxy-autotag-level-3 { font-size: 12.5px; }
.jxy-autotag-level-4 { font-size: 13px; }
.jxy-autotag-level-5 { font-size: 13.5px; font-weight: 600; }

/* 聚合页标题里的标签不跟随 h5 放大 */
.jxy-autotag-page .card-header .jxy-autotag-tag {
	font-size: 13px;
	vertical-align: middle;
}

/* ============ 标签聚合页主题列表 ============ */
.jxy-autotag-threadlist .jxy-autotag-thread-subject {
	color: var(--bs-body-color, #212529);
	text-decoration: none;
}

.jxy-autotag-threadlist .jxy-autotag-thread-subject:hover {
	color: var(--bs-primary, #0d6efd);
}

/* ============ 暗色模式 ============ */
[data-bs-theme="dark"] .jxy-autotag-tag,
[data-bs-theme="dark"] .jxy-autotag-cloud-item {
	color: hsl(var(--jxy-tag-h, 212), 78%, 74%);
	background: hsl(var(--jxy-tag-h, 212), 42%, 18%);
	border-color: hsl(var(--jxy-tag-h, 212), 38%, 30%);
}

[data-bs-theme="dark"] .jxy-autotag-tag:hover,
[data-bs-theme="dark"] .jxy-autotag-cloud-item:hover {
	color: #fff;
	background: hsl(var(--jxy-tag-h, 212), 62%, 44%);
	border-color: hsl(var(--jxy-tag-h, 212), 62%, 38%);
	box-shadow: 0 5px 12px hsla(var(--jxy-tag-h, 212), 60%, 20%, .6);
}

[data-bs-theme="dark"] .jxy-autotag-cloud-item .jxy-autotag-count {
	color: hsl(var(--jxy-tag-h, 212), 78%, 80%);
	background: hsl(var(--jxy-tag-h, 212), 40%, 26%);
}

[data-bs-theme="dark"] .jxy-autotag-mini {
	color: hsl(var(--jxy-tag-h, 212), 78%, 74%);
	background: hsl(var(--jxy-tag-h, 212), 42%, 18%);
	border-color: hsl(var(--jxy-tag-h, 212), 38%, 30%);
}

[data-bs-theme="dark"] .jxy-autotag-mini:hover {
	color: #fff;
	background: hsl(var(--jxy-tag-h, 212), 62%, 42%);
	border-color: hsl(var(--jxy-tag-h, 212), 62%, 38%);
}

@media (prefers-reduced-motion: reduce) {
	.jxy-autotag-tag,
	.jxy-autotag-mini,
	.jxy-autotag-cloud-item { transition: none; }
	.jxy-autotag-tag:hover,
	.jxy-autotag-cloud-item:hover { transform: none; }
}

@media (max-width: 576px) {
	.jxy-autotag-inline { display: none; }
	.jxy-autotag-tags { gap: 6px; margin-top: 12px; }
}
