/* PulseCore page navigator.
   Standalone on purpose: it appears on the front page and the print view,
   neither of which loads book.css — and the print view must not, since its
   prose colours are written for dark pages, not white paper. */

.pc-scroller {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: 1px solid rgba(53, 232, 224, 0.3);
    border-radius: 999px;
    background: rgba(10, 11, 13, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 18px rgba(53, 232, 224, 0.12),
                0 8px 26px rgba(0, 0, 0, 0.5);
    transition: opacity .2s ease, visibility .2s ease;
}

/* Nothing to page through, so it says nothing. */
.pc-scroller.is-idle { opacity: 0; visibility: hidden; }

.pc-scroller button {
    width: 30px;
    height: 30px;
    padding: 0;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1;
    color: var(--phase-1);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s ease, color .15s ease,
                box-shadow .15s ease, transform .15s ease;
}
.pc-scroller button:hover:not(:disabled) {
    background: rgba(53, 232, 224, 0.14);
    box-shadow: 0 0 12px rgba(53, 232, 224, 0.45);
    transform: scale(1.08);
}
.pc-scroller button:active:not(:disabled) { transform: scale(0.94); }
.pc-scroller button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(53, 232, 224, 0.6);
}
.pc-scroller button:disabled { color: var(--text-mute); opacity: .35; cursor: default; }

/* How far down the page you are. */
.pc-scroller-gauge {
    position: relative;
    width: 2px;
    height: 46px;
    margin: 3px 0;
    border-radius: 2px;
    background: rgba(53, 232, 224, 0.16);
    overflow: hidden;
}
.pc-scroller-gauge i {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--phase-1);
    box-shadow: 0 0 8px rgba(53, 232, 224, 0.7);
    transition: height .18s ease;
}

/* Out of the way of the margin comments, which claim the right edge. */
.book-main.with-comments ~ .pc-scroller,
body:has(.book-main.with-comments) .pc-scroller { right: 8px; }

@media (max-width: 700px) {
    .pc-scroller { right: 8px; gap: 0; padding: 4px 2px; }
    .pc-scroller button { width: 26px; height: 26px; font-size: 0.76rem; }
    .pc-scroller-gauge { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .pc-scroller { backdrop-filter: none; }
    .pc-scroller button, .pc-scroller-gauge i { transition: none; }
}
