/* ============================================================
   v24：题目标签表现 / 出题表单标签输入 / 内置校验器说明
   作用域前缀 v24-，不影响全站其它页面
   ============================================================ */

/* ---------- 出题表单：标签输入 + 实时预览 ---------- */
.v24-tag-field {
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--fx-mint-50);
}
.v24-tag-hint {
  margin-top: 7px !important;
  line-height: 1.8;
  font-size: 12.5px;
  color: var(--text-2) !important;
}
.v24-tag-hint code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(63, 157, 139, .13);
  color: var(--primary-dark);
  font-size: 12px;
}
.v24-tag-preview {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; min-height: 24px;
}
.v24-tag-chip {
  display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 700;
  line-height: 1.5;
}
.v24-tag-none { font-size: 12px; color: var(--text-2); opacity: .75; }

/* ---------- 题库主页：标签总览（表现显示） ---------- */
.v24-cloud {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 15px;
  background: linear-gradient(100deg, var(--fx-mint-50), var(--card-bg));
}
.v24-cloud__label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; letter-spacing: .03em;
  color: var(--primary-dark); margin-right: 4px; white-space: nowrap;
}
.v24-cloud__chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text); font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: all .18s ease;
}
.v24-cloud__chip:hover {
  border-color: var(--primary); color: var(--primary-dark);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(63, 157, 139, .16);
}
.v24-cloud__chip.is-active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.v24-cloud__chip b { font-size: 11px; opacity: .7; }
.v24-cloud__empty { font-size: 12.5px; color: var(--text-2); }

/* ---------- 题库表格：标签列 + 行内编辑 ---------- */
.bank-table .col-tags { width: 210px; }
.v24-tag-cell {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  min-height: 28px;
}
.v24-tag-cell .tag-pill {
  display: inline-block; padding: 2px 9px; font-size: 11.5px;
  font-weight: 700; line-height: 1.6; text-decoration: none;
  white-space: nowrap;
}
.v24-tag-cell .v24-tag-untagged {
  font-size: 12px; color: var(--text-2); opacity: .7;
}
.v24-tag-edit {
  border: 1px dashed var(--border); border-radius: 8px;
  background: transparent; color: var(--primary-dark);
  font-size: 11px; padding: 2px 7px; cursor: pointer; line-height: 1.6;
}
.v24-tag-edit:hover { background: var(--fx-mint-50); border-style: solid; }
.v24-row-edit {
  margin-left: 8px; font-size: 11px; font-weight: 700;
  color: var(--primary-dark); text-decoration: none; white-space: nowrap;
}
.v24-row-edit:hover { text-decoration: underline; }
.v24-tag-tip { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.v24-tag-tip code { color: var(--primary-dark); font-weight: 700; }

/* ---------- 题目详情页标签 ---------- */
.v24-detail-tags {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px;
}
.v24-detail-tags__label {
  font-size: 12px; font-weight: 800; color: var(--primary-dark);
}
.v24-detail-tags a.tag-pill {
  padding: 3px 11px; font-size: 12px; font-weight: 700;
  text-decoration: none; border-radius: 999px;
}
.v24-detail-tags a.tag-pill:hover { border-color: var(--primary); }
.v24-checker-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--fx-mint-50); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2);
}

/* ---------- 暗色主题 ---------- */
html.dark .v24-tag-field { background: rgba(108, 199, 174, .06); }
html.dark .v24-tag-hint code { background: rgba(108, 199, 174, .16); color: var(--primary-2); }
html.dark .v24-cloud { background: linear-gradient(100deg, rgba(108, 199, 174, .08), var(--card-bg)); }
html.dark .v24-cloud__chip { background: rgba(255, 255, 255, .04); }
html.dark .v24-cloud__chip.is-active { background: var(--primary); color: #10201a; }
html.dark .v24-tag-tip code { color: var(--primary-2); }
html.dark .v24-checker-badge { background: rgba(108, 199, 174, .08); }

@media (max-width: 768px) {
  .bank-table .col-tags { width: auto; }
  .v24-cloud { padding: 10px 12px; }
}
