/* assets/compare.css -- 对比页私有样式 */

/* ---------- Compare Table ---------- */
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 0.92rem;
}

table.compare-table thead th {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  background: var(--bg2);
  border-bottom: 2px solid var(--rule);
  white-space: nowrap;
}

table.compare-table thead th.col-center {
  text-align: center;
}

table.compare-table thead th.col-total {
  text-align: center;
  background: var(--ink);
  color: #fff;
}

table.compare-table tbody td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

table.compare-table tbody td.col-center {
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

table.compare-table tbody td.col-total {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

table.compare-table tbody td.col-name {
  font-weight: 700;
  color: var(--ink);
  min-width: 120px;
}

/* Best row highlight */
table.compare-table tbody tr.best-row {
  background: #F0F8F2;
}

.best-marker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent2);
  background: var(--accent2-soft);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Tier badges */
.compare-tier-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}

.compare-tier-badge.tier-a { background: #4A7C59; }
.compare-tier-badge.tier-b { background: #6B9A7A; }
.compare-tier-badge.tier-c { background: #D4A24C; color: #2A2622; }
.compare-tier-badge.tier-d { background: #C0392B; }

/* Actions */
.compare-actions {
  text-align: center;
}

.del-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--warn);
  border-radius: 6px;
  background: transparent;
  color: var(--warn);
  cursor: pointer;
  transition: all 0.15s ease;
}

.del-btn:hover {
  background: var(--warn);
  color: #fff;
}

/* ---------- Compare Table Wrap (horizontal scroll on mobile) ---------- */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Radar Section ---------- */
.compare-radar-section {
  margin-top: 1.8rem;
}

.compare-radar-section .radar-card h4 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.compare-radar-section .radar-card .radar-sub {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

#compare-radar {
  width: 100%;
  height: 420px;
}

/* ---------- Action Bar ---------- */
.compare-action-bar {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--muted);
}

.empty-state .empty-icon {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  position: relative;
}

.empty-state .empty-icon .empty-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border: 3px dashed var(--rule);
  border-radius: 50%;
}

.empty-state .empty-icon .empty-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 28px;
}

.empty-state .empty-icon .empty-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--rule);
  margin-bottom: 5px;
  border-radius: 1px;
}

.empty-state .empty-icon .empty-lines span:last-child {
  width: 70%;
  margin-bottom: 0;
}

.empty-state .empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.empty-state .empty-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Bottom CTA ---------- */
.bottom-cta {
  text-align: center;
  padding: 2rem 0;
  margin-top: 1rem;
  border-top: 1px dashed var(--rule);
}

.bottom-cta .bottom-cta-text {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .empty-state {
    padding: 2.5rem 1rem;
  }

  .empty-state .empty-icon {
    width: 60px;
    height: 60px;
  }

  .empty-state .empty-icon .empty-circle {
    width: 60px;
    height: 60px;
  }

  .empty-state .empty-icon .empty-lines {
    width: 28px;
    height: 22px;
  }

  .compare-action-bar {
    flex-direction: column;
  }

  .compare-action-bar .btn {
    width: 100%;
    justify-content: center;
  }

  #compare-radar {
    height: 320px;
  }
}

@media print {
  .empty-state { display: none; }
  .del-btn, .compare-action-bar { display: none !important; }
  table.compare-table tbody tr.best-row { background: #F0F8F2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #compare-radar { display: none; }
}
