/* Split-flap pagination — matches g38 board theme */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0 8px;
  padding: 0;
}

.pagination,
.pagination-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-item {
  margin: 0;
}

/* Style only the clickable surface — never nested spans (avoids double-box) */
.pagination-link,
.pagination a,
.pagination > span,
.page-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--g38-mono, ui-monospace, Consolas, monospace);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--g38-fg, #e8e4d9);
  background: var(--g38-panel, #121314);
  border: 1px solid var(--g38-line, rgba(61, 90, 91, 0.75));
  border-radius: 2px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Nested spans must not get their own box */
.pagination-link span,
.pagination a span,
.page-link span {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  line-height: 1;
}

.pagination-link:hover,
.pagination a:hover,
.page-link:hover {
  color: var(--g38-led, #f0a202);
  border-color: var(--g38-led, #f0a202);
  background: rgba(240, 162, 2, 0.1);
  text-decoration: none;
}

.pagination-link:focus-visible,
.pagination a:focus-visible {
  outline: 2px solid var(--g38-led, #f0a202);
  outline-offset: 2px;
}

.pagination-list .active .pagination-link,
.pagination-link.current,
.pagination-link.active,
.pagination .active > span,
.pagination .active > a {
  color: var(--g38-ink, #121212);
  background: var(--g38-flap, #e8e4d9);
  border-color: var(--g38-flap, #e8e4d9);
  cursor: default;
}

.pagination-list .disabled .pagination-link,
.pagination-link.disabled,
.pagination .disabled > span,
.pagination .disabled > a {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.pagination-ellipsis .pagination-link,
.pagination-ellipsis .pagination-link:hover {
  min-width: auto;
  padding: 0 8px;
  background: transparent;
  border-color: transparent;
  color: var(--g38-muted, #9aa0a6);
  cursor: default;
}

.pagination-link.prev,
.pagination-link.next,
.pagination .prev a,
.pagination .next a {
  min-width: 40px;
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .pagination-link,
  .pagination a,
  .pagination > span,
  .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.7rem;
  }
}
