/* =====================================================================
   PACEY — ACTIVITIES PAGE
   ---------------------------------------------------------------------
   The Activities page's pinboard treatment, scoped to #pacey-content: the
   month grouping, the activity rows, the expanded detail and the chevron.
   The shared paper card, name/date/stats and section titles come from
   pinboard-theme.css. Tokens (--pinboard-*, --font-*) are inherited here,
   never redefined.
   ===================================================================== */

/* --- Month separator: a small handwritten label on the board, sitting
   between the paper strips. Text-only (no card) so it stays subtle; a
   faint dashed rule lets the months read as sections. --- */
#pacey-content .pacey-activity-month-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.6rem 0 0.5rem;
    padding: 0 0.25rem 0.3rem;
    border-bottom: 1px dashed color-mix(in srgb, var(--pinboard-ink) 22%, transparent);
}
/* The first month needs no extra headroom above it */
#pacey-content .pacey-activity-month-header:first-child { margin-top: 0; }

#pacey-content .pacey-activity-month-name {
    font-family: var(--font-caveat);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pinboard-ink);
}

#pacey-content .pacey-activity-month-total {
    font-family: var(--font-fuzzy);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--pinboard-muted);
}

/* --- Expanded detail rows: live on the paper card, which stays light in
   both themes, so no dark override is needed for these. Labels are
   handwriting (Fuzzy Bubbles); values keep the same face for consistency
   but use full ink for readability. --- */
#pacey-content .pacey-activity-detail-label {
    font-family: var(--font-fuzzy);
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pinboard-muted);
}

#pacey-content .pacey-activity-detail-value {
    font-family: var(--font-fuzzy);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--pinboard-ink);
}

/* --- Chevron: a small icon on the paper card. Muted ink clears contrast
   on the cream paper in both light and dark (the paper stays light). --- */
#pacey-content .pacey-activity-chevron {
    color: var(--pinboard-muted);
    transition: transform 0.18s ease-out, color 0.18s ease-out;
}
#pacey-content .pacey-activity-header:hover .pacey-activity-chevron { color: var(--pinboard-ink); }

/* --- Coach's read on one run: asked for from the expanded detail, so it sits
   on the same paper card. The button is centred and a normal secondary button —
   it picks up the board's hand-cut corners and shadow through #pacey-content
   .pacey-btn — and the read itself is one paragraph of prose. --- */
#pacey-content .pacey-activity-insight {
    margin-top: 0.9rem;
    /* Centres the button, which is inline-flex. The read below re-aligns left
       so its lines stay flush with the detail above it. */
    text-align: center;
}

#pacey-content .pacey-activity-insight-btn {
    /* .pacey-btn defaults to width:100% — the action hugs its label instead. */
    width: auto;
    padding: 0.5rem 1rem;
    font-size: var(--pacey-text-label);
}

#pacey-content .pacey-activity-insight-loading { padding: 0.2rem 0; }

#pacey-content .pacey-activity-insight-text {
    margin: 0;
    text-align: left;
    font-family: var(--font-fuzzy);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--pinboard-ink);
}

#pacey-content .pacey-activity-insight-error {
    margin: 0;
    text-align: left;
    font-family: var(--font-fuzzy);
    font-size: 0.95rem;
    color: var(--pinboard-muted);
}

/* --- Night board: the month label sits directly on the dark cork, so it
   needs light ink (same approach the shared theme uses for cork text). --- */
html[data-theme="dark"]:has(#pacey-dashboard-screen:not([hidden])) #pacey-content .pacey-activity-month-name { color: #e8dfca; }
html[data-theme="dark"]:has(#pacey-dashboard-screen:not([hidden])) #pacey-content .pacey-activity-month-total { color: #b3a98f; }
html[data-theme="dark"]:has(#pacey-dashboard-screen:not([hidden])) #pacey-content .pacey-activity-month-header {
    border-bottom-color: color-mix(in srgb, #e8dfca 22%, transparent);
}
