/* SiteFlow — alerts in the bell (pairs with sf-alerts.js). Uses sf-v3 tokens. */

/* Count badge on the bells */
.sfal-badge {
  position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  box-sizing: border-box; border-radius: 100px; background: var(--or); color: var(--n9);
  border: 2px solid var(--n9); font-size: 11px; font-weight: 800; line-height: 14px; text-align: center;
 font-family: 'Schibsted Grotesk', -apple-system, sans-serif; pointer-events: none;
}
.sfal-badge.red { background: var(--dg); color: #fff; }
.sfal-badge.on-light { top: 3px; right: 2px; border-color: #fff; }

/* Desktop dropdown */
.sfal-pop {
  position: fixed; z-index: 800; width: 400px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(10,31,68,.16); color: var(--n9);
  display: none; overflow: hidden; flex-direction: column;
}
.sfal-pop.on { display: flex; }
.sfal-pop .sfal { display: flex; flex-direction: column; min-height: 0; flex: 1; outline: none; }
.sfal-pop .sfal-body { overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }

.sfal-h { display: flex; align-items: center; gap: 8px; padding: 12px 6px 8px 16px; border-bottom: 1px solid var(--line2); }
.sfal-h .grow { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.sfal-h b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sfal-h .sfal-sum { font-size: 13px; color: var(--n5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfal-h .sfal-x { width: 36px; height: 36px; border-radius: 6px; color: var(--n5); }
.sfal-h .sfal-x .ms { font-size: 20px; }
.sfal-h .sfal-x:hover { background: var(--ground); color: var(--n9); }

/* Phone sheet */
.sfal.sheet { outline: none; }
.sfal.sheet .sh-for { padding: 0 16px; margin-bottom: 8px; }

/* Filter chips + mark-all */
.sfal-tools { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.sfal-chips { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sfal-chips::-webkit-scrollbar { display: none; }
.sfal-chips button, .sfal-seen, .sfal-row { font-family: 'Schibsted Grotesk', -apple-system, sans-serif; letter-spacing: normal; }
.sfal-chips button {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none; height: 30px; padding: 0 11px;
  border-radius: 100px; border: 1px solid var(--line); background: #fff; color: var(--n9);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Schibsted Grotesk', -apple-system, sans-serif;
}
.sfal-chips button span { font-weight: 600; opacity: .7; }
.sfal-chips button:hover { border-color: var(--n4); }
.sfal-chips button.on { background: var(--n9); border-color: var(--n9); color: #fff; }
.sfal-chips button:focus-visible, .sfal-seen:focus-visible, .sfal-row:focus-visible, .sfal-x:focus-visible { outline: 2px solid var(--or); outline-offset: 1px; }
.sfal-seen { all: unset; cursor: pointer; flex: none; font-size: 13px; font-weight: 700; color: var(--or-ink); white-space: nowrap; padding: 4px 0; font-family: 'Schibsted Grotesk', -apple-system, sans-serif; }
.sfal-seen:hover { text-decoration: underline; }

/* Group headings — sentence case, no micro caps */
.sfal-grp { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 6px; font-size: 13px; font-weight: 700; color: var(--n4); border-top: 1px solid var(--line2); }
.sfal-list > .sfal-grp:first-child { border-top: none; padding-top: 4px; }
.sfal-grp.red { color: var(--dg-ink); }
.sfal-grp .c { font-weight: 600; }

/* Rows */
.sfal-row {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 8px 16px; -webkit-tap-highlight-color: transparent;
  font-family: 'Schibsted Grotesk', -apple-system, sans-serif;
}
.sfal-row:hover, .sfal-row:active { background: var(--ground); }
.sfal-row .grow { flex: 1; min-width: 0; }
.sfal-row .k { font-size: 12px; font-weight: 700; line-height: 1.3; }
.sfal-row .t { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--n9); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sfal-row .m { font-size: 13px; color: var(--n5); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfal-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.sfal-row .amt { font-size: 14px; font-weight: 800; color: var(--n9); white-space: nowrap; }
.sfal-new { width: 8px; height: 8px; border-radius: 50%; background: var(--or); }
.sfal-row .sf-tile.sm { width: 44px; height: 44px; }
.sfal-row .sf-tile.sm b { font-size: 16px; }

.sfal-empty { padding: 20px 16px 24px; font-size: 14px; color: var(--n5); line-height: 1.45; }
.sfal.sheet .sfal-empty { padding-bottom: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .sfal-pop.on { animation: sfalIn .14s var(--sf-ease, ease-out); }
  @keyframes sfalIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
