/* Session rows and status marks, shared by the account home and the workspace drawer. */

/* Sessions are cards: status mark, title with its place, and the age in words. */
.code-sessions { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.code-session { align-items: center; background: var(--mineral-950); border: 1px solid var(--border-soft); border-radius: var(--radius-md); color: var(--limestone-100); display: grid; gap: var(--space-2) var(--space-3); grid-template-columns: auto minmax(0, 1fr); min-block-size: var(--touch-target); padding: var(--space-3); text-decoration: none; }
.code-session:hover { border-color: var(--border-mid); }
.code-session-text { display: flex; flex-direction: column; gap: 0.2rem; min-inline-size: 0; }
.code-session-text strong { display: -webkit-box; font-size: var(--text-sm); font-weight: 600; line-height: var(--native-body-line-height); overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.code-session-place { color: var(--limestone-300); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-session-place bdi[dir="ltr"] { font-family: var(--font-mono); }
.code-session-age { color: var(--limestone-300); font-size: var(--text-xs); grid-column: 2; min-inline-size: 0; overflow-wrap: anywhere; }
.code-session[data-activity="working"] .code-session-age { color: var(--emerald-300); }
.code-session[data-activity="waiting"] .code-session-age { color: var(--emerald-300); }
.code-session[data-activity="approval"] .code-session-age { color: var(--amber-400); }
.code-session[data-activity="error"] .code-session-age { color: var(--red-400); }

.code-status { background: var(--mineral-600); block-size: 0.6rem; border-radius: var(--radius-pill); display: inline-block; inline-size: 0.6rem; position: relative; }
/* Open and waiting for you: a steady emerald dot. Waiting on an approval: amber. */
.code-status[data-activity="waiting"] { background: var(--emerald-400); }
.code-status[data-activity="approval"] { background: var(--amber-400); }
.code-status[data-activity="idle"] { background: transparent; border: 1.5px solid var(--mineral-600); }
.code-status[data-activity="error"] { background: var(--red-400); }
.code-status[data-activity="online"] { background: var(--emerald-400); }
.code-status[data-activity="working"] { background: var(--emerald-400); }
.code-status[data-activity="working"]::after { animation: code-meridian 1.6s ease-out infinite; border: 1.5px solid var(--emerald-400); border-radius: inherit; content: ""; inset: -0.3rem; position: absolute; }
@keyframes code-meridian { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(1.5); } }

.code-session:focus-visible { outline: 2px solid var(--emerald-400); outline-offset: 2px; }

/* The drawer shows recents compactly: one line of place, no card chrome. */
.nav-recents { display: flex; flex-direction: column; gap: var(--space-2); margin-block-start: var(--space-4); min-block-size: 0; }
.nav-recents .code-sessions { gap: var(--space-1); overflow-y: auto; }
.nav-recents .code-session { background: transparent; border-color: transparent; min-block-size: var(--touch-target); padding: var(--space-2) var(--space-3); }
.nav-recents .code-session:hover, .nav-recents .code-session[aria-current="page"] { background: var(--mineral-900); border-color: var(--border-soft); }
.nav-home-link { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .code-status[data-activity="working"]::after { animation: none; }
}
