/* Shared public pagination: artwork catalog, profile directories and profiles. */
.the-art-pagination,
.the-art-directory-pagination,
body.the-art-artwork-catalog .ct-pagination,
.dokan-single-store .dokan-pagination-container {
  --the-art-pagination-ink: #101414;
  --the-art-pagination-line: #dedbd4;
  --the-art-pagination-soft: #f2f0eb;
  --the-art-pagination-white: #fff;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(38px, 5vw, 64px);
}

body.the-art-artwork-catalog .ct-pagination {
  --the-art-pagination-ink: var(--the-art-catalog-ink);
  --the-art-pagination-line: var(--the-art-catalog-line);
  --the-art-pagination-soft: var(--the-art-catalog-soft);
  margin-top: clamp(42px, 6vw, 68px);
}

.the-art-directory-pagination {
  --the-art-pagination-ink: var(--the-art-public-ink);
  --the-art-pagination-line: var(--the-art-public-line);
  --the-art-pagination-soft: var(--the-art-public-soft);
  --the-art-pagination-white: var(--the-art-public-white);
}

body.the-art-artwork-catalog .ct-pagination .ct-hidden-sm,
:is(.the-art-pagination, .the-art-directory-pagination) > ul.page-numbers,
.dokan-single-store .dokan-pagination {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

:is(.the-art-pagination, .the-art-directory-pagination) > ul.page-numbers > li,
.dokan-single-store .dokan-pagination > li {
  margin: 0;
}

body.the-art-artwork-catalog .ct-pagination .page-numbers,
:is(.the-art-pagination, .the-art-directory-pagination) :is(a, span).page-numbers,
.dokan-single-store .dokan-pagination > li > a {
  display: inline-flex;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--the-art-pagination-line);
  border-radius: 999px;
  background: var(--the-art-pagination-white);
  box-shadow: none;
  color: var(--the-art-pagination-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.the-art-artwork-catalog .ct-pagination :is(.prev, .next),
:is(.the-art-pagination, .the-art-directory-pagination) :is(.prev, .next) {
  min-width: auto;
  padding-inline: 18px;
}

body.the-art-artwork-catalog .ct-pagination .current,
:is(.the-art-pagination, .the-art-directory-pagination) .current,
.dokan-single-store .dokan-pagination > li.active > a {
  border-color: var(--the-art-pagination-ink);
  background: var(--the-art-pagination-ink);
  color: var(--the-art-pagination-white);
}

/* Preserve the shared component's precedence over directory and Woo defaults. */
:is(.the-art-directory-pagination, .the-art-profile-pagination) .current {
  border-color: var(--the-art-pagination-ink) !important;
  background: var(--the-art-pagination-ink) !important;
  color: var(--the-art-pagination-white) !important;
}

body.the-art-artwork-catalog .ct-pagination a.page-numbers:hover,
:is(.the-art-pagination, .the-art-directory-pagination) a.page-numbers:hover,
.dokan-single-store .dokan-pagination > li > a:hover {
  border-color: var(--the-art-pagination-ink);
  background: var(--the-art-pagination-soft);
  color: var(--the-art-pagination-ink);
  transform: translateY(-1px);
}

body.the-art-artwork-catalog .ct-pagination a.page-numbers:focus-visible,
:is(.the-art-pagination, .the-art-directory-pagination) a.page-numbers:focus-visible,
.dokan-single-store .dokan-pagination > li > a:focus-visible {
  outline: 3px solid #1f6f50;
  outline-offset: 3px;
}

body.the-art-artwork-catalog .ct-pagination a.page-numbers:active,
:is(.the-art-pagination, .the-art-directory-pagination) a.page-numbers:active,
.dokan-single-store .dokan-pagination > li > a:active {
  background: #dedbd4;
  transform: none;
}

body.the-art-artwork-catalog .ct-pagination :is(.prev, .next) svg {
  flex: 0 0 auto;
}

/* Dokan's first/last shortcuts and unavailable links are not part of the shared component. */
.dokan-single-store .dokan-pagination > :is(.prev, .next, .disabled) {
  display: none;
}

@media (max-width: 480px) {
  .the-art-pagination,
  .the-art-directory-pagination,
  body.the-art-artwork-catalog .ct-pagination,
  .dokan-single-store .dokan-pagination-container,
  body.the-art-artwork-catalog .ct-pagination .ct-hidden-sm,
  :is(.the-art-pagination, .the-art-directory-pagination) > ul.page-numbers,
  .dokan-single-store .dokan-pagination {
    gap: 6px;
  }

  body.the-art-artwork-catalog .ct-pagination .page-numbers,
  :is(.the-art-pagination, .the-art-directory-pagination) :is(a, span).page-numbers,
  .dokan-single-store .dokan-pagination > li > a {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
  }

  body.the-art-artwork-catalog .ct-pagination :is(.prev, .next),
  :is(.the-art-pagination, .the-art-directory-pagination) :is(.prev, .next) {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.the-art-artwork-catalog .ct-pagination .page-numbers,
  :is(.the-art-pagination, .the-art-directory-pagination) :is(a, span).page-numbers,
  .dokan-single-store .dokan-pagination > li > a {
    transition-duration: 0.01ms !important;
  }
}
