/*
 Read now: two questions and a story. It sits on top of reader.css for the
 colours, the bar and the buttons, so it looks like the reader it opens.
*/

.now-page {
    max-width: 28rem;
    margin: 0 auto;
    padding: calc(var(--reader-bar-height) + 2.5rem) 1.25rem 3rem;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.now-question {
    font-family: 'Literata', serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--reader-heading);
    margin: 0 0 0.75rem;
}

.now-lead {
    color: var(--reader-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 2rem;
}

.now-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Big enough to hit with a thumb on the first try, which is the whole point
   of a page that is only ever two taps. */
html[data-reader-theme] body a.now-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--reader-line);
    background-color: var(--reader-control);
    color: var(--reader-control-ink);
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
}

html[data-reader-theme] body a.now-choice:hover,
html[data-reader-theme] body a.now-choice:focus-visible {
    border-color: var(--reader-accent);
}

.now-back {
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
}

html[data-reader-theme] body .now-back a {
    color: var(--reader-muted);
}

.now-footer {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--reader-line);
}

/* Loading: Dewey over the whole page while the story is picked. The reader
   loads this stylesheet too, for its "Find me another story" button. */

.now-loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
    background-color: var(--reader-page);
}

.now-loading[hidden] {
    display: none;
}

/* Blown up from a small grid without smoothing, so his pixels stay square. */
.now-loading-dewey {
    width: 88px;
    height: 88px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.now-loading-line {
    font-family: 'Literata', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--reader-heading);
    margin: 0;
}

.now-loading-dots {
    display: flex;
    gap: 6px;
}

.now-loading-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--reader-muted);
    opacity: 0.25;
    animation: now-loading-dot 1.2s steps(1) infinite;
}

.now-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.now-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes now-loading-dot {
    0%, 60%, 100% { opacity: 0.25; }
    20%, 40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .now-loading-dots span {
        animation: none;
        opacity: 0.6;
    }
}

.now-footer p {
    color: var(--reader-muted);
    font-size: 0.9rem;
    margin: 0;
}
