/*
 * Custom Pagination Styles
 */

/* Main pager container */
.pager-nav .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 0;
  list-style: none;
  gap: 8px;
  /* Adjust spacing between items */
}

/* General style for all pager items (links) */
.pager__item a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #333 !important;
  font-weight: 500;
  min-width: 40px;
  height: 40px;
  padding: 0 5px;
  border-radius: 50%;
  /* Make it a circle */
  transition: all 0.2s ease-in-out;
  border: none !important;
}

/* Style for the "Previous" and "Next" text links */
.pager__item--previous a,
.pager__item--next a {
  /* Override the circle shape for text links */
  border-radius: 0;
  min-width: auto;
  padding: 0 10px;
  color: #333 !important;
  font-weight: 500;
}

.pager__item--previous a:hover,
.pager__item--next a:hover {
  color: #000;
  background-color: transparent;
  /* Ensure no background on hover */
}

/* Style for the active page number */
.pager__item.is-active a {
  background-color: #000;
  color: #fff !important;
  font-weight: bold;
  pointer-events: none;
  /* Prevent clicking the current page */
}

/* Style for the page number immediately after the active one */
.pager__item.is-active+.pager__item a {
  /* border: 1px solid #ddd; */
}

/* Hover state for non-active page numbers */
.pager__item:not(.is-active) a:hover {
  background-color: #f0f0f0;
}

/* Style for the ellipsis (...) if it appears */
.pager__item--ellipsis {
  padding: 0 10px;
  color: #777;
}

.pagination:has(.pager__item--previous):has(.pager__item--next) .pager__item--previous {
  margin-right: auto;
}

.pagination:has(.pager__item--previous):has(.pager__item--next) .pager__item--next {
  margin-left: auto;
}

/*
 * Hide pager text on mobile devices
 */
@media (max-width: 1024px) {
  .pager-text-label {
    display: none;
  }
}
