/* ==========================================================================
   JXKit Rules & Knowledge Base Components (components.css)
   Modular cards, grids, badges, checklists, and callout UI elements
   ========================================================================== */

/* 1. 核心规则卡片栅格 (rules-grid, rule-card, rule-badge) */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.rule-card {
  background: var(--bg-card, #111827);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.rule-card:hover {
  transform: translateY(-2px);
  border-color: rgba(243, 128, 32, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.rule-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: fit-content;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff !important;
  background: var(--accent-cf, #f38020);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.rule-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #f9fafb);
  margin-top: 0;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.rule-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 0.85rem;
  flex: 1;
}

/* 2. 亮色模式卡片适配 (Light Mode) */
[data-theme="light"] .rule-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .rule-card:hover {
  border-color: #f38020;
  box-shadow: 0 8px 20px rgba(243, 128, 32, 0.1);
}

[data-theme="light"] .rule-card h3 {
  color: #0f172a;
}

[data-theme="light"] .rule-card p {
  color: #475569;
}

/* 3. 自检清单组件 (Checklist) */
.checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-card, #111827);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}

.checklist-item:hover {
  border-color: var(--accent-cf, #f38020);
}

.check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  color: #10b981;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.88rem;
  margin-top: 1px;
}

.check-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary, #9ca3af);
}

.check-text strong {
  color: var(--text-primary, #f9fafb);
  font-weight: 700;
}

[data-theme="light"] .checklist-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .check-text {
  color: #475569;
}

[data-theme="light"] .check-text strong {
  color: #0f172a;
}

/* 4. 信息与案例卡片 (Info Card) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0 2rem;
}

.info-card {
  background: var(--bg-card, #111827);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.info-icon {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.info-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #f9fafb);
  margin-bottom: 0.45rem;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--text-secondary, #9ca3af);
  line-height: 1.6;
}

[data-theme="light"] .info-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .info-card h4 {
  color: #0f172a;
}

[data-theme="light"] .info-card p {
  color: #475569;
}
