.pagination-count {
  text-align: center;
}

.pagy-controls {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  width: 100%;

  &:has(.control) {
    justify-content: space-between;
  }

  .control {
    display: flex;
    justify-items: flex-start;
    width: 6rem;

    &:last-child {
      justify-content: flex-end;
    }
  }
}

.pagy.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;

  a{
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--theme-color);

    &:not(:first-child) {
      border-left: none;
    }

    &.current {
      background-color: var(--theme-color);
      color: var(--theme-complementary-color);
    }

    &:first-child {
      border-top-left-radius: 0.5rem;
      border-bottom-left-radius: 0.5rem;
    }

    &:last-child {
      border-top-right-radius: 0.5rem;
      border-bottom-right-radius: 0.5rem;
    }
    &:first-child, &:last-child {
      color: var(--theme-color);

      &:not([href]) { /* disabled links */
        cursor: not-allowed;
        opacity: 0.4;
      }

      &:hover {
        background-color: rgba(var(--theme-color), 0.1);
        & > * {
          color: var(--theme-color-darker);
        }
      }
    }
  }
}
