/* ============================================================
   Inbox — notifications feed (light + dark)
   Scoped under .inbox-root. Reuses style.css variables and the
   My Tasks view aesthetic. `.inbox-badge` lives on sidebar
   buttons outside the view, so it stays unscoped.
   ============================================================ */

.inbox-root {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 56px 80px;
  color: var(--text);
}

/* ---- header ---- */
.inbox-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 10px;
}
.inbox-title {
  font-size: 34px; font-weight: 700; letter-spacing: -0.4px; color: var(--text);
}
.inbox-sub { font-size: 13px; color: var(--text-faint); }
.inbox-markall {
  margin-left: auto; align-self: center; white-space: nowrap;
  font-size: 13px; font-family: var(--font);
  color: var(--text-light); padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border);
}
.inbox-markall:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }
.inbox-markall:disabled { opacity: 0.6; cursor: default; }

/* ---- day groups ---- */
.inbox-day { margin-top: 18px; }
.inbox-day-head {
  padding: 8px 8px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- rows ---- */
.inbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.inbox-row + .inbox-row { border-top: 1px solid var(--border); }
.inbox-row:hover, .inbox-row:focus-visible { background: var(--bg-hover); outline: none; }
.inbox-row.unread { background: rgba(91, 91, 214, 0.055); }
.inbox-row.unread:hover, .inbox-row.unread:focus-visible { background: rgba(91, 91, 214, 0.1); }
html[data-theme="dark"] .inbox-row.unread { background: rgba(91, 91, 214, 0.13); }
html[data-theme="dark"] .inbox-row.unread:hover,
html[data-theme="dark"] .inbox-row.unread:focus-visible { background: rgba(91, 91, 214, 0.19); }

/* type icon */
.inbox-ic {
  flex-shrink: 0; width: 30px; height: 30px; margin-top: 1px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); background: var(--bg-hover);
}
.inbox-ic.type-mention { color: var(--accent); background: rgba(91, 91, 214, 0.12); }
.inbox-ic.type-share { color: #448361; background: rgba(68, 131, 97, 0.14); }
html[data-theme="dark"] .inbox-ic.type-share { color: #6a9d7d; background: rgba(106, 157, 125, 0.16); }
.inbox-ic.type-system { color: var(--star); background: rgba(245, 180, 0, 0.14); }

/* text */
.inbox-ev-body { flex: 1; min-width: 0; }
.inbox-line {
  font-size: 14px; line-height: 1.45; color: var(--text-light);
  word-break: break-word;
}
.inbox-actor { font-weight: 600; color: var(--text); }
.inbox-page { font-weight: 600; color: var(--text); }
.inbox-excerpt {
  margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--text-faint);
  word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* meta (time / unread dot / delete) */
.inbox-time {
  flex-shrink: 0; margin-top: 3px; white-space: nowrap;
  font-size: 12px; color: var(--text-faint);
}
.inbox-dot {
  flex-shrink: 0; width: 8px; height: 8px; margin-top: 7px;
  border-radius: 50%; background: var(--accent);
}
.inbox-del {
  flex-shrink: 0; width: 26px; height: 26px; margin: -2px -2px 0 0;
  border-radius: 6px; color: var(--text-faint); opacity: 0;
  display: flex; align-items: center; justify-content: center;
}
.inbox-row:hover .inbox-del, .inbox-del:focus-visible { opacity: 1; }
.inbox-del:hover { background: var(--bg-active); color: var(--danger); }

/* ---- empty state ---- */
.inbox-empty { padding: 80px 20px; text-align: center; color: var(--text-faint); }
.inbox-empty-ic { margin-bottom: 12px; opacity: 0.7; }
.inbox-empty-title { font-size: 16px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; }
.inbox-empty-sub { font-size: 13.5px; }

/* ============================================================
   Sidebar unread badge (renderInboxBadge) — used outside the
   view, on any element the host passes in.
   ============================================================ */
.inbox-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: auto;
  border-radius: 9px;
  font-size: 10.5px; font-weight: 700; line-height: 1; font-family: var(--font);
  color: #fff; background: var(--accent);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .inbox-root { padding: 24px 18px 60px; }
  .inbox-time { display: none; }
}
