/* ===== Inactive Finder 頁面專屬樣式 ===== */

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.filter-group .label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  white-space: nowrap;
}
.filter-group .unit {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.filter-group input,
.filter-group select {
  background: var(--bg-input);
  border: var(--border-w) solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 4px 6px;
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  transition: border-color .12s, box-shadow .12s;
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-group .coord-input {
  width: 64px;
  text-align: right;
  font-family: var(--font-mono);
}
.filter-group .dist-input {
  width: 72px;
  text-align: right;
  font-family: var(--font-mono);
}
.filter-group .pop-input {
  width: 88px;
  text-align: right;
  font-family: var(--font-mono);
}
.filter-group .kingdom-select {
  min-width: 160px;
  max-width: 220px;
}

/* ===== Table ===== */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
thead th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px var(--space-3);
  text-align: left;
  white-space: nowrap;
  border-bottom: var(--border-w) solid var(--border);
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
  transition: color .12s, background-color .12s;
}
thead th.th-actions {
  cursor: default;
}
thead th:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}
thead th .sort-arrow {
  display: inline-block;
  width: 10px;
  text-align: center;
  font-size: 10px;
  margin-left: 4px;
  color: var(--text-dim);
}
thead th.sorted {
  color: var(--accent);
  background: var(--accent-soft);
}
thead th.sorted .sort-arrow {
  color: var(--accent);
}
tbody tr {
  border-bottom: var(--border-w) solid var(--border);
  transition: background-color .12s;
}
tbody tr:nth-child(even) {
  background: var(--bg-zebra);
}
tbody tr:last-child {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--bg-hover);
}
tbody td {
  padding: 8px var(--space-3);
  vertical-align: middle;
  color: var(--text-primary);
}
tbody td.numeric,
thead th.numeric {
  text-align: left;
  font-family: var(--font-mono);
}
tbody td.dist {
  font-size: var(--fs-xs);
}
tbody td.status-inactive {
  color: var(--danger, #c25757);
  font-weight: 600;
}
tbody td.player-name a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}
tbody td.player-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}
tbody td.actions {
  text-align: center;
}

tbody td.village a {
  font-family: var(--font-mono);
  color: var(--info);
  text-decoration: none;
}
tbody td.village a:hover {
  text-decoration: underline;
}

/* ===== Small button for copy ===== */
.btn-sm {
  padding: 2px 8px;
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .filter-bar { padding: var(--space-2); gap: var(--space-2); }
  .filter-group { gap: 6px; }
  table { font-size: var(--fs-xs); }
  thead th, tbody td { padding: 6px var(--space-2); }
  .filter-group .coord-input { width: 56px; }
  .filter-group .dist-input { width: 64px; }
  .filter-group .pop-input { width: 72px; }
  .filter-group .kingdom-select { min-width: 120px; }
}
