/* ---------- Notifications (#/notifications and the desktop bell panel; js/notifications-page.js). Prefix nt-. ----------
   One row design for both: an icon in a coloured circle per kind, title, body (two lines on the page, one in the panel),
   time, unread dot and a chevron when the row opens something. The page is a centred column; rows sit in white blocks
   separated by lines, one block per group (Today, This week, Earlier). */

.nt-page { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.nt-title-row { display: flex; align-items: baseline; gap: 8px; }
.nt-h1 { margin: 0; }
.nt-count { font-size: 14px; color: var(--text-muted); }

.nt-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.nt-chips::-webkit-scrollbar { display: none; }
.nt-chips .chip { flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 600; background: var(--surface); }
.nt-chips .chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.nt-group { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.nt-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.nt-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 64px; box-sizing: border-box;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border);
}
.nt-list .nt-row:last-child { border-bottom: 0; }
a.nt-row:hover { background: var(--surface-2); }
.nt-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.nt-unread { background: color-mix(in srgb, var(--brand-tint) 45%, var(--surface)); }
.nt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-title { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.nt-unread .nt-title { font-weight: 700; }
.nt-body { font-size: 14px; line-height: 1.4; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.nt-time { flex: none; font-size: 12px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; }
.nt-unread .nt-time { color: var(--brand-text); font-weight: 700; }
.nt-end { flex: none; width: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.nt-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--brand-text); }
.nt-chev { color: var(--disabled-text); }

.nt-icon { flex: none; width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.nt-icon-message { background: var(--brand-tint); color: var(--brand-text); }
.nt-icon-approved { background: var(--success-bg); color: var(--success-text); }
.nt-icon-rejected { background: var(--danger-bg); color: var(--danger-text); }
.nt-icon-changed { background: var(--cat-baby-tint); color: var(--cat-baby-fg); }
.nt-icon-reward { background: var(--warning-bg); color: var(--warning-text); }
.nt-icon-level { background: var(--cat-beauty-tint); color: var(--cat-beauty-fg); }
.nt-icon-claim { background: var(--cat-electronics-tint); color: var(--cat-electronics-fg); }
.nt-icon-privacy { background: var(--surface-2); color: var(--text-muted); }
.nt-icon-wanted { background: var(--cat-home-tint); color: var(--cat-home-fg); }

.nt-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.nt-empty p { margin: 0; font-size: 15px; line-height: 1.45; }
.nt-empty .nt-empty-hint { font-size: 14px; color: var(--text-muted); }
.nt-more { align-self: center; margin-top: 8px; min-height: 44px; }

/* Phone: the groups run edge to edge, like the Messages list. */
@media (max-width: 859px) {
  .nt-list { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .nt-row { padding: 12px 16px; }
}

/* ---------- The desktop bell panel ---------- */
#notifPanelList { padding: 0; gap: 0; }
.nt-panel-item { display: flex; align-items: flex-start; border-bottom: 1px solid var(--border); }
.nt-panel-item:last-child { border-bottom: 0; }
.nt-panel-item .nt-row { flex: 1; min-width: 0; border-bottom: 0; padding: 12px 4px 12px 14px; min-height: 0; gap: 10px; }
.nt-row-panel .nt-icon { width: 36px; height: 36px; }
.nt-row-panel .nt-icon svg { width: 18px; height: 18px; }
.nt-row-panel .nt-title { font-size: 14px; }
.nt-row-panel .nt-body { font-size: 13px; -webkit-line-clamp: 1; }
.nt-row-panel .nt-time { margin-top: 2px; }
.nt-row-panel .nt-end { width: 10px; }
.nt-row-panel .nt-chev { display: none; }
.nt-clear {
  flex: none; width: 40px; height: 44px; margin: 8px 4px 0 0; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.nt-clear:hover { background: var(--surface-2); color: var(--text); }
.nt-clear:focus-visible { outline: 2px solid var(--focus-ring); }
.nt-panel-empty { margin: 0; padding: 20px 16px; font-size: 14px; color: var(--text-muted); }
/* An unread panel row is tinted across its Clear button too, so the row reads as one piece. */
.nt-panel-item:has(.nt-unread) { background: color-mix(in srgb, var(--brand-tint) 45%, var(--surface)); }
.nt-panel-item .nt-unread { background: transparent; }
