/* Round 169: clear, scalable pagination for the full news directory. */
body.page-news .news-pagination {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "prev numbers next"
    ". status .";
  align-items: center;
  gap: 16px;
  margin-top: clamp(34px, 5vw, 58px);
  padding-top: 24px;
  border-top: 1px solid rgba(23, 61, 48, .12);
  position: relative;
}

body.page-news .news-page-arrow,
body.page-news .news-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 61, 48, .18);
  border-radius: 12px;
  background: #fffdf8;
  color: #173d30;
  font: inherit;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

body.page-news .news-page-arrow { padding: 0 16px; }
body.page-news [data-news-page-prev] { grid-area: prev; }
body.page-news [data-news-page-next] { grid-area: next; }

body.page-news .news-page-arrow:hover:not(:disabled),
body.page-news .news-page-number:hover,
body.page-news .news-page-number.is-current {
  border-color: #173d30;
  background: #173d30;
  color: #fff;
}

body.page-news .news-page-arrow:disabled {
  opacity: .38;
  cursor: not-allowed;
}

body.page-news .news-page-arrow.is-disabled {
  opacity: .38;
  cursor: not-allowed;
  pointer-events: none;
}

body.page-news .news-page-numbers {
  grid-area: numbers;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-news .news-page-status {
  grid-area: status;
  justify-self: center;
  color: #66796f;
  font-size: 14px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

body.page-news .news-page-ellipsis {
  min-width: 24px;
  text-align: center;
  color: #6e7d76;
}

@media (max-width: 640px) {
  body.page-news .news-pagination {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "numbers numbers"
      "prev next"
      "status status";
  }

  body.page-news .news-page-arrow { width: 100%; }
}
