/* components/post-feed.css — Load More and month markers for
   partials/post-feed.hbs (cards and list are in post-card.css).
   post-feed.js sets [data-enhanced] to show Load More and hide pagination,
   and removes it if a fetch fails. Without JS, pagination shows. */

/* The switch */
.post-feed:not([data-enhanced]) .post-feed__more {
  display: none;
}

/* The whole nav goes; Back is handled by post-feed.js. */
.post-feed[data-enhanced] .pagination {
  display: none;
}

/* Load More */
.post-feed__more {
  display: flex;
  justify-content: center;
  padding-block: var(--space-8);
}

/* Hidden, not removed, so the status line (which may have focus) stays. */
.post-feed[data-exhausted] .post-feed__more-button {
  display: none;
}

.post-feed__more-button[aria-busy="true"] {
  cursor: progress;
}

/* Inverts to the page colours, leaving .button's border as the outline.
   Hover is gated so a tap on touch screens doesn't leave it inverted. */
.post-feed__more-button:focus-visible {
  background-color: var(--color-bg);
  color: var(--color-fg);
}

@media (hover: hover) {
  .post-feed__more-button:hover {
    background-color: var(--color-bg);
    color: var(--color-fg);
  }
}

/* Month markers — dormant: the grouping in post-feed.js is commented out.
   Each month's label sticks only while its own group passes, so the next
   label pushes it out. --month-label-top (design layer) can hold labels
   clear of the sticky mobile header. */
.post-list__month {
  position: sticky;
  top: var(--month-label-top, 0px);
  /* Below --z-header. */
  z-index: var(--z-sticky);

  padding-block: var(--space-3);
  /* Opaque: cards scroll under it. */
  background-color: var(--color-bg);
  border-block-end: var(--border-width) solid var(--color-border);

  font-family: var(--font-ui);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-slight);
}

.post-list__group {
  display: flex;
  flex-direction: column;
}
