/*
 * sidebar-recent.css — the shared Recent view's date groups
 *
 * The list half of controls/sidebar-recent/. The Pinned section above it is its
 * own component and its own sheet (controls/pinned-items.css), for the same
 * reason the modules are separate: Pinned mounts on surfaces that have no
 * Recent at all.
 *
 * Folded up from the .signal-sidebar-recent* rules in css/apps/signals.css
 * (P5.3). Two deliberate differences from that original:
 *
 *  - NO FALLBACK LITERALS. It wrote var(--lp-sidebar-caption-weight, 600) and
 *    var(--lp-sidebar-caption-tracking, 0.04em) while both tokens are defined
 *    on :root in controls/spaces-tree.css — a second copy of the number, free
 *    to drift from the one that actually applies, and a fallback also hides a
 *    scale that failed to load (.claude/rules/ui-design-scope.md).
 *  - THIS IS NOT THE SCROLL CONTAINER. The host owns scrolling, because the
 *    Pinned section sticks to the host's scroll and a scroller here would
 *    leave it sticking to the wrong box. The original could own it because
 *    Recent WAS the whole view.
 *
 * Tokens: shell.css, typography.css, controls/spaces-tree.css — all statically
 * linked and all defining on :root. Never core.css, which index.html does not
 * link.
 */

.lp-recent {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

/* One date bucket: Today / Yesterday / Older. */
.lp-recent-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
}
.lp-recent-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* No vertical padding: the box height centres the text, so the heading carries
   the same air above and below that the tree's "ALL SPACES" does. Chat learned
   this the hard way — 12px over 4px read as a heading pushed onto its rows. */
.lp-recent-heading {
    display: flex;
    align-items: center;
    min-height: var(--lp-sidebar-caption-height);
    margin: 0 0 2px;
    padding: 0 var(--lp-sidebar-edge-pad) 0 var(--lp-sidebar-caption-indent);
    color: var(--text-muted);
    font-size: var(--lp-sidebar-caption-size);
    font-weight: var(--lp-sidebar-caption-weight);
    letter-spacing: var(--lp-sidebar-caption-tracking);
    text-transform: uppercase;
}

/* The air between one date bucket and the next. On the caption's MARGIN rather
   than its padding, and never on the first: a lead inside the box would make
   the topmost heading sit lower than the tree's "ALL SPACES" does, which is the
   difference the two were reported for.

   It arrives here late, and that is worth recording. All three apps carried
   this rule keyed to their OWN group class, so folding the group markup into
   this component (AB#13477) left each copy matching nothing — Chat's air went
   first, silently, because a stylesheet rule that stops matching is not an
   error anywhere. The class-existence pin cannot see it either: it asks whether
   a stamped class has a rule, not whether a rule still has a class. */
.lp-recent-group + .lp-recent-group .lp-recent-heading {
    margin-top: var(--lp-sidebar-caption-lead);
}

/* The loading note and the empty state are DIFFERENT answers and read
   differently: one is "not yet", the other is "nothing, and here is what to
   do". Collapsing them would tell a reader they have nothing while the first
   read is still in flight. */
.lp-recent-loading,
.lp-recent-empty {
    margin: 0;
    padding: 8px var(--lp-sidebar-edge-pad);
    color: var(--text-muted);
    font-size: var(--fs-meta);
    line-height: var(--lh-snug);
}
.lp-recent-empty { text-wrap: pretty; }
