/* Count, centred page links and directional controls on a shared baseline. */
body:is(.category-recipes,.category-blog,.blog) .site-main > .navigation.zgri-pages {
  --zgri-pagination-accent: #bc3116;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
}
body.category-recipes .site-main > .navigation.zgri-pages { --zgri-pagination-accent: #111827; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-summary {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #707070;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-page-summary strong { color: #444; font-weight: 500; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .nav-links { min-width: 0; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li { display: block; margin: 0; padding: 0; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #707070;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color .15s;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .current {
  color: var(--zgri-pagination-accent);
  font-weight: 700;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .current::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  background: currentColor;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > a:hover {
  color: var(--zgri-pagination-accent);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 8px;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages a:focus-visible {
  outline: 2px solid var(--zgri-pagination-accent);
  outline-offset: 1px;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .dots { width: 20px; color: #999; }
body:is(.category-recipes,.category-blog,.blog) .zgri-page-directions { display: flex; gap: 8px; justify-self: end; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  position: relative;
  isolation: isolate;
  background: transparent;
  color: #444;
  text-decoration: none;
}
/* A smaller visible tile keeps the existing click and tap area intact. */
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  background: #f5f5f5;
  pointer-events: none;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pages a.zgri-page-arrow:hover { color: var(--zgri-pagination-accent); background: transparent; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages a.zgri-page-arrow:hover::before { background: #eaeaea; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow.is-disabled { color: #c9c9c9; background: transparent; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow.is-disabled::before { background: #fafafa; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .screen-reader-text {
  visibility: visible;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  body:is(.category-recipes,.category-blog,.blog) .site-main > .navigation.zgri-pages { grid-template-columns: minmax(0,1fr) auto; row-gap: 2px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-summary { grid-column: 1; grid-row: 1; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-directions { grid-column: 2; grid-row: 1; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .nav-links { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 479px) {
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages ul.page-numbers { gap: 1px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .page-numbers { width: 28px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .dots { width: 14px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-page-directions { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .page-numbers { transition: none; }
}

/* Keep the current cards in place while the requested page loads. */
body:is(.category-recipes,.category-blog,.blog) .site-main.zgri-pagination-loading > .post { opacity: .5; }
body:is(.category-recipes,.category-blog,.blog) .site-main.zgri-pagination-loading .zgri-pages { cursor: progress; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pagination-status:not(.is-error) {
 position: absolute;
 width: 1px;
 height: 1px;
 margin: -1px;
 padding: 0;
 overflow: hidden;
 clip: rect(0,0,0,0);
 clip-path: inset(50%);
 white-space: nowrap;
}
body:is(.category-recipes,.category-blog,.blog) .zgri-pagination-status.is-error {
 margin: 0 0 16px;
 padding: 12px 16px;
 font-size: 14px;
 color: #444;
 background: #f5f5f5;
}


body:is(.category-recipes,.category-blog,.blog) .site-main .zgri-pages .zgri-page-list > li { display: block !important; }
body:is(.category-recipes,.category-blog,.blog) .site-main .zgri-pages .zgri-page-list > li.zgri-mobile-only { display: none !important; }
body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-showing-label {
 display: inline;
 width: auto;
 height: auto;
 margin: 0;
 padding: 0;
 border: 0;
 background: transparent;
 color: inherit;
 font: inherit;
}
/* Endpoint-aware mobile links: first, current and last, with real gap markers. */
@media (max-width: 639px) {
  body:is(.category-recipes,.category-blog,.blog) .site-main > .navigation.zgri-pages {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
  }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-summary {
    order: 0;
    margin-right: auto;
    white-space: nowrap;
    font-size: 11px;
  }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .nav-links { order: 2; flex: 0 0 auto; width: auto; margin: 0; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages ul.zgri-page-list { display: flex; flex-wrap: nowrap; gap: 0; }
  body:is(.category-recipes,.category-blog,.blog) .site-main .zgri-pages .zgri-page-list > li.zgri-desktop-only { display: none !important; }
  body:is(.category-recipes,.category-blog,.blog) .site-main .zgri-pages .zgri-page-list > li.zgri-mobile-only { display: block !important; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .page-numbers { width: 22px; height: 40px; font-size: 13px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .dots { width: 10px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages li > .current::after { width: 16px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-directions { display: contents; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow { flex: 0 0 28px; width: 28px; height: 40px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-arrow::before { width: 24px; height: 28px; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-directions > :first-child { order: 1; }
  body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-page-directions > :last-child { order: 3; }
}
/* Keep the full range and item type on tiny screens; shorten only the lead-in. */
@media (max-width: 359px) {
 body:is(.category-recipes,.category-blog,.blog) .zgri-pages .zgri-showing-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
 }
}
