/*
  Pagination 06 — Data Table Footer — standalone HTML/CSS/JS
  implementation. No build step, no framework, no external dependency:
  copy index.html, this file, and script.js into any project as-is.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --pagination-accent: #39ff14;
  --pagination-fg: oklch(0.145 0 0);
  --pagination-muted: oklch(0.5 0 0);
  --pagination-disabled: oklch(0.8 0 0);
  --pagination-border: oklch(0.91 0 0);
  --pagination-border-hover: oklch(0.8 0 0);
  --pagination-hover: oklch(0.96 0 0);
}

/* Recomposes by the space the footer actually has, not the viewport. */
.pagination06 {
  container-type: inline-size;
  position: relative;
  width: 100%;
  border-top: 1px solid var(--pagination-border);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.pagination06__rail {
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  display: block;
  height: 0.125rem;
}

/* The range marker slides along the footer's top edge as pages change. */
.pagination06__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
  border-radius: 9999px;
  background-color: var(--pagination-accent);
  transition:
    left 360ms cubic-bezier(0.3, 0.8, 0.25, 1),
    width 360ms cubic-bezier(0.3, 0.8, 0.25, 1);
}

.pagination06__nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.pagination06__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pagination06__range {
  margin: 0;
  font-size: 13px;
  line-height: 1.25rem;
  white-space: nowrap;
  color: var(--pagination-muted);
}

.pagination06__range strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pagination-fg);
}

.pagination06__size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination06__label {
  font-size: 13px;
  line-height: 1.25rem;
  white-space: nowrap;
  color: var(--pagination-muted);
}

.pagination06__select-wrap {
  position: relative;
}

.pagination06__select {
  height: 2.25rem;
  appearance: none;
  border: 1px solid var(--pagination-border);
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 0 1.75rem 0 0.625rem;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--pagination-fg);
  outline: none;
  transition: border-color 150ms;
}

.pagination06__caret {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 0.875rem;
  height: 0.875rem;
  transform: translateY(-50%);
  color: var(--pagination-muted);
  pointer-events: none;
}

.pagination06__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.pagination06__steps {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.pagination06__step {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  padding: 0;
  font-family: inherit;
  color: var(--pagination-fg);
  cursor: pointer;
  outline: none;
  transition: background-color 150ms;
}

.pagination06__step svg {
  width: 1rem;
  height: 1rem;
}

.pagination06__step:hover {
  background-color: var(--pagination-hover);
}

.pagination06__step:focus-visible {
  outline: 2px solid var(--pagination-fg);
  outline-offset: 1px;
}

.pagination06__step:disabled {
  cursor: not-allowed;
  background: none;
  color: var(--pagination-disabled);
}

.pagination06__jump {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 0.25rem;
  font-size: 13px;
  line-height: 1.25rem;
  color: var(--pagination-muted);
}

.pagination06__input {
  width: 2.75rem;
  height: 2.25rem;
  border: 1px solid var(--pagination-border);
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 0;
  text-align: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--pagination-fg);
  outline: none;
  transition: border-color 150ms;
}

.pagination06__select:hover,
.pagination06__input:hover {
  border-color: var(--pagination-border-hover);
}

.pagination06__select:focus-visible,
.pagination06__input:focus {
  border-color: var(--pagination-fg);
  box-shadow: 0 0 0 2px var(--pagination-accent);
}

.pagination06__total {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Narrow footers keep the "Page" label for assistive tech only. */
@container (max-width: 27.99rem) {
  .pagination06__jump-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@container (min-width: 28rem) {
  .pagination06__jump {
    padding: 0 0.5rem;
  }
}

@container (min-width: 42rem) {
  .pagination06__nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .pagination06__group {
    justify-content: flex-start;
    gap: 1.5rem;
  }
  .pagination06__controls {
    justify-content: flex-end;
  }
  .pagination06__step {
    width: 2rem;
    height: 2rem;
  }
  .pagination06__select,
  .pagination06__input {
    height: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pagination06__marker {
    transition: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
p {
  margin: 0;
}
.pagination06-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}
.pagination06-layout__card {
  width: 100%;
  max-width: 47.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.pagination06-layout__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
}
.pagination06-layout__heading {
  font-size: 15px;
  font-weight: 600;
  color: oklch(0.205 0 0);
}
.pagination06-layout__sub {
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
.pagination06-layout__table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.pagination06-layout__table thead tr {
  border-top: 1px solid oklch(0.97 0 0);
  border-bottom: 1px solid oklch(0.97 0 0);
  background: rgba(250, 250, 250, 0.7);
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
.pagination06-layout__table th {
  padding: 0.5rem 1rem;
  font-weight: 500;
}
.pagination06-layout__table td {
  padding: 0.625rem 1rem;
}
.pagination06-layout__table tbody tr + tr {
  border-top: 1px solid oklch(0.97 0 0);
}
.pagination06-layout__right {
  text-align: right;
}
.pagination06-layout__id {
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: oklch(0.556 0 0);
}
.pagination06-layout__client {
  width: 100%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: oklch(0.205 0 0);
}
.pagination06-layout__amount {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: oklch(0.371 0 0);
}
.pagination06-layout__status-cell {
  display: none;
}
.pagination06-layout__status {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.pagination06-layout__status--paid {
  background: #ecfdf5;
  color: #007a55;
}
.pagination06-layout__status--due {
  background: #fffbeb;
  color: #bb4d00;
}
.pagination06-layout__status--overdue {
  background: #fff1f2;
  color: #c70036;
}
@media (min-width: 640px) {
  .pagination06-layout {
    padding: 3rem 2.5rem;
  }
  .pagination06-layout__status-cell {
    display: table-cell;
  }
}
