/* Latest feed items */
.latest-feed {
  display: flex;
  flex-direction: column;
}

.latest-post-item {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--lm-border-color);
  text-decoration: none;
  color: var(--lm-text-color);
  transition: background-color 0.15s ease;
}

.latest-post-item:last-child {
  border-bottom: none;
}

.latest-post-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  margin: 0 -16px;
  padding: 20px 16px;
  border-radius: 12px;
  border-bottom-color: transparent;
  text-decoration: none;
  color: var(--lm-text-color);
}

.latest-post-item:has(+ .latest-post-item:hover) {
  border-bottom-color: transparent;
}

.latest-post-item-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.latest-post-item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.latest-post-item-author-name {
  font-size: 1.3rem;
  font-weight: 500;
  color: inherit;
}

.latest-post-item-date {
  font-size: 1.2rem;
  color: var(--lm-text-muted-color);
}

.latest-post-item-date::before {
  content: "·";
  margin-right: 8px;
}

.latest-post-item-title {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 6px 0;
  color: inherit;
}

.latest-post-item-excerpt {
  font-size: 1.4rem;
  color: var(--lm-text-muted-color);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-post-item-thumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.3rem;
  color: var(--lm-text-muted-color);
  margin-top: 8px;
}

.latest-post-item-thumbs i {
  font-size: 1.4rem;
  color: var(--primary-color);
}

/* Empty state */
.latest-empty {
  border: 1px dashed var(--lm-border-color);
  border-radius: 12px;
}

/* Dark mode */
body[data-theme="dark"] .latest-post-item {
  border-bottom-color: var(--dm-border-color);
  color: var(--dm-text-color);
}

body[data-theme="dark"] .latest-post-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom-color: transparent;
  color: var(--dm-text-color);
}

body[data-theme="dark"] .latest-post-item-date,
body[data-theme="dark"] .latest-post-item-excerpt,
body[data-theme="dark"] .latest-post-item-thumbs {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .latest-empty {
  border-color: var(--dm-border-color);
}

/* Pagination */
.latest-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 0;
}

.latest-page-num,
.latest-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: none;
  background: none;
  font-size: 1.4rem;
  color: var(--lm-text-muted-color);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.latest-page-num:hover,
.latest-page-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--lm-text-color);
}

.latest-page-num.active {
  background: var(--primary-color);
  color: #fff;
  font-weight: 500;
  cursor: default;
}

.latest-page-btn i {
  font-size: 1.8rem;
}

body[data-theme="dark"] .latest-page-num,
body[data-theme="dark"] .latest-page-btn {
  color: var(--dm-text-muted-color);
}

body[data-theme="dark"] .latest-page-num:hover,
body[data-theme="dark"] .latest-page-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--dm-text-color);
}

body[data-theme="dark"] .latest-page-num.active {
  background: var(--primary-color);
  color: #fff;
}
