/* Activity screen — both-sides lift history list */

/* Header overlays the scroll area so cards slide beneath it; once scrolled it
   picks up the tabbar's frosted treatment + hairline instead of hard-clipping. */
.act-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.act-head.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border-bottom-color: var(--line);
}
/* clear the absolutely-positioned header: safe-top + 12 + 32 (22px h1 line) + 12 */
.act-scroll { padding-top: calc(var(--safe-top) + 56px); }

/* Screen-local ink derivations. Light's raw status colours (accent-strong
   #C78E00, good, info, bad) sit at 2.5–3.9:1 on their tinted chips — under AA
   for the small text they carry — so on light every status ink is darkened
   toward --text (65% status / 35% text lands 4.9–6.7:1 measured against each
   chip tint). Dark's raw colours already pass, so dark restores them.
   Root cause is tokens.css/base.css (shared, not mine): change request filed. */
.act-list {
  --act-ink-accent: color-mix(in srgb, var(--accent-strong) 65%, var(--text));
  --act-ink-good: color-mix(in srgb, var(--good) 65%, var(--text));
  --act-ink-info: color-mix(in srgb, var(--info) 65%, var(--text));
  --act-ink-bad: color-mix(in srgb, var(--bad) 65%, var(--text));
  --act-glyph-accent: var(--act-ink-accent);
  /* 11–13px muted cues: 55% text-mix is only 3.96:1 on light's bg, so light
     needs 65% (≈5.5:1); dark passes at 55% and keeps it. */
  --act-muted: color-mix(in srgb, var(--text) 65%, transparent);
}
@media (prefers-color-scheme: dark) {
  .act-list {
    --act-ink-accent: var(--accent-strong);
    --act-ink-good: var(--good);
    --act-ink-info: var(--info);
    --act-ink-bad: var(--bad);
    --act-glyph-accent: var(--accent);
    --act-muted: color-mix(in srgb, var(--text) 55%, transparent);
  }
}

.act-list { padding: 0 var(--s-4); }
.act-list .section-label {
  padding-left: var(--s-1); padding-right: var(--s-1);
  color: var(--act-muted);
}

/* Status pills (base.css family) fail AA on light at 11px caps: re-ink them
   with the screen-local derived inks; backgrounds stay the base tints. */
.act-list .pill-requested { color: var(--act-ink-accent); }
.act-list .pill-accepted, .act-list .pill-arriving { color: var(--act-ink-good); }
.act-list .pill-in_progress { color: var(--act-ink-info); }
.act-list .pill-declined, .act-list .pill-cancelled { color: var(--act-ink-bad); }

/* ---- lift card ---- */
.act-card {
  display: block; width: 100%; text-align: left;
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-4) var(--s-3);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.act-card + .act-card { margin-top: var(--s-3); }
.act-card:active { transform: scale(0.98); background: var(--bg-elev-2); }
.act-card.is-skel { pointer-events: none; }

/* identity row: the other party (rider I drove / driver whose lift I took /
   who a pending request is asking) */
.act-who {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.act-who-av {
  width: 24px; height: 24px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  background: var(--bg-elev-2); border: 1px solid var(--line);
}
.act-who-av.is-anyone { color: var(--text-3); }
.act-who-av.is-anyone svg { width: 14px; height: 14px; display: block; }
.act-who-name {
  font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--text);
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- route pair with dot/line/square glyph ---- */
.act-route { display: flex; align-items: stretch; gap: var(--s-3); }
.act-glyph {
  display: flex; flex-direction: column; align-items: center;
  width: 8px; flex-shrink: 0;
  padding: 7px 0 8px; /* optically centre dot/square on each label line */
}
.act-glyph .g-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-3); flex-shrink: 0;
}
.act-glyph .g-line {
  flex: 1; width: 2px; border-radius: 1px;
  background: var(--line-strong); margin: 3px 0;
}
.act-glyph .g-sq {
  width: 7px; height: 7px; border-radius: 1.5px;
  background: var(--act-glyph-accent); flex-shrink: 0;
}
.act-stops { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.act-stop {
  font-size: var(--fs-md); font-weight: var(--fw-med); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-stop + .act-stop { margin-top: var(--s-2); }
.act-chev { align-self: center; color: var(--text-3); flex-shrink: 0; }
.act-chev svg { width: 16px; height: 16px; display: block; }

/* ---- footer row: time · status · miles ---- */
.act-foot {
  display: flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.act-foot .grow { flex: 1; }
.act-time { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* miles settled on completion: driver side earns (amber +), rider side spends
   (muted −, the wallet's negative treatment) */
.act-miles {
  font-size: var(--fs-md); font-weight: var(--fw-semi); color: var(--act-ink-accent);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.act-miles.neg { color: color-mix(in srgb, var(--bad) 75%, var(--text)); }
.act-miles em { font-style: normal; font-size: var(--fs-xs); font-weight: var(--fw-med); opacity: .7; margin-left: 2px; }

/* ---- ratings, both ways: "You ★5 · Graeme ★5" ---- */
.act-rate-row { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.act-rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); }
.act-rating em { font-style: normal; color: var(--text-2); margin-right: 1px; }
.act-rating svg { width: 11px; height: 11px; display: block; color: var(--act-glyph-accent); }
.act-rating b {
  font-weight: var(--fw-semi); color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* rate affordance on completed-but-unrated lifts: pill so it reads as an action */
.act-rate-cta {
  display: inline-flex; align-items: center; gap: 1px;
  font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--act-ink-accent);
  background: var(--accent-dim); border-radius: var(--r-full);
  padding: 3px 8px 3px 11px;
}
.act-rate-cta svg { width: 13px; height: 13px; }

/* ---- skeleton state ---- */
.act-skel-label { display: inline-block; width: 64px; height: 10px; border-radius: 5px; }
.act-skel-av { display: inline-block; width: 24px; height: 24px; border-radius: var(--r-full); flex-shrink: 0; }
.act-skel-line { height: 14px; border-radius: 7px; }
.act-skel-line + .act-skel-line { margin-top: var(--s-3); }
.act-skel-chip { display: inline-block; width: 52px; height: 18px; border-radius: 9px; }

/* ---- empty + error states ---- */
.act-empty { padding-top: calc(var(--s-12) + 14vh); }
.act-empty .btn { margin-top: var(--s-6); }
.act-empty svg { color: var(--text-3); opacity: 1; }

/* terminal cue after the last card */
.act-end {
  text-align: center; font-size: var(--fs-sm);
  color: var(--act-muted);
  padding: var(--s-8) 0 var(--s-4);
}
