/* One coherent pagination component for the work list and the journal. */
.pagination .page-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  isolation: isolate;
}
.pagination .page-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 76px;
  padding: 8px 12px;
  border: 1px solid #3a2f43;
  border-radius: 8px;
  background: #100c15;
  color: #d5c5e2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pagination .page-trigger:hover,
.pagination .page-trigger[aria-expanded="true"] {
  background: #211629;
  border-color: #7b5f8b;
}
.page-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}
.page-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.pagination .page-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 20;
  width: 236px;
  max-width: calc(100vw - 36px);
  padding: 16px;
  border: 1px solid #4c3a59;
  border-radius: 12px;
  background: #120d19;
  box-shadow: 0 12px 40px #000b;
  text-align: left;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: page-picker-open 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pagination .page-popover[hidden] {
  display: none !important;
}
.pagination .page-popover.is-closing {
  animation: page-picker-close 140ms ease both;
  pointer-events: none;
}
.page-popover h3 {
  margin: 0;
  color: #ede2f4;
  font-size: 14px;
  font-weight: 500;
}
.page-popover p {
  margin: 5px 0 14px;
  color: #a694b3;
  font-size: 12px;
  line-height: 1.5;
}
.page-popover .page-jump {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.pagination .page-popover input {
  appearance: textfield;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  width: 80px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #5a4568;
  border-radius: 7px;
  background: #08060b;
  color: #f1e6f8;
  font: inherit;
  font-size: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.page-popover input::-webkit-inner-spin-button,
.page-popover input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.pagination .page-popover input:focus-visible {
  outline: 2px solid #b297c7;
  outline-offset: 2px;
}
.pagination .page-popover button[type="submit"] {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #d9c5e9;
  border-radius: 7px;
  background: #d9c5e9;
  color: #25192f;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}
.pagination .page-popover button[type="submit"]:hover {
  background: #eadbf4;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes page-picker-open {
  from {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}
@keyframes page-picker-close {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 5px) scale(0.98);
  }
}
@media (max-width: 550px) {
  .pagination {
    gap: 8px;
    flex-wrap: wrap;
  }
  .pagination .page-trigger {
    min-width: 72px;
  }
  .pagination .page-popover {
    width: 224px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pagination .page-popover,
  .page-trigger svg {
    animation: none !important;
    transition: none !important;
  }
}
