/* —— 访客墙（Cloudflare Worker + D1） —— */

/* order 由 visitor.js 按 _config.butterfly.yml → aside.card_visitor.sort_order 设置 */

#card-visitor .item-headline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.visitor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.visitor-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.85rem;
  line-height: 1.35;
}

.visitor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--text-highlight-color, #49b1f5);
  background: color-mix(in srgb, var(--text-highlight-color, #49b1f5) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-highlight-color, #49b1f5) 28%, transparent);
  flex-shrink: 0;
}

.visitor-body {
  min-width: 0;
}

.visitor-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: baseline;
}

.visitor-loc {
  font-weight: 600;
  color: var(--font-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  opacity: 0.65;
}

.visitor-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-meta code {
  font-size: 0.72rem;
  padding: 0 0.2rem;
  background: transparent;
}

.visitor-empty,
.visitor-loading {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
  padding: 0.5rem 0;
}

#visitor-page {
  max-width: 720px;
}

#visitor-page .visitor-notice {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--text-highlight-color, #49b1f5);
  background: rgba(73, 177, 245, 0.08);
  font-size: 0.9rem;
  line-height: 1.55;
}

#visitor-page .visitor-list {
  gap: 0;
}

#visitor-page .visitor-item {
  grid-template-columns: 42px 1fr;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px dashed rgba(128, 128, 128, 0.25);
}

#visitor-page .visitor-avatar {
  width: 42px;
  height: 42px;
  font-size: 0.95rem;
}

#visitor-page .visitor-meta {
  white-space: normal;
}
