/* The notification centre (docs/NOTIFICATIONS.md): the bell beside the version in the blue bar, the #/notifications
   list (unread rows get a gold dot and a gold edge), and Settings › Notifications with its In the portal / As a
   message switches. Locky Design System tokens only. */
:root { --nf-unread: var(--face-gold); --nf-off: var(--sunk); --nf-on: var(--face-gold); }
:root[data-theme="dark"] { --nf-unread: var(--face-gold); --nf-off: var(--sunk); --nf-on: var(--face-gold); }

/* The bell: a round button in the bar, like the phone's search, with the count tucked on its shoulder. */
.nf-bell {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 2px solid #000000; background: var(--top-field); color: #FFFFFF; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3); text-decoration: none;
}
.nf-bell:hover { color: var(--gold); }
.nf-bell .badge { position: absolute; top: -6px; right: -8px; }
@media (max-width: 899px) { .nf-bell { margin-right: auto; } }

/* The page */
.nf-tabs { margin-bottom: 12px; }
.nf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nf-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.nf-row.is-unread { box-shadow: inset 3px 0 0 var(--nf-unread); }
.nf-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--sunk); color: var(--ink); }
.nf-what { min-width: 0; }
.nf-title { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.nf-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 999px; background: var(--nf-unread); box-shadow: 0 0 0 1.5px var(--ink); vertical-align: 1px; }
.nf-body { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.nf-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.nf-actions { display: flex; align-items: center; gap: 6px; }
.nf-clear {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; cursor: pointer; border-radius: 999px;
  border: 2px solid var(--line); background: transparent; color: var(--muted);
}
.nf-clear:hover { color: var(--ink); border-color: var(--ink); }
.nf-more { margin-top: 12px; }
.nf-more[hidden] { display: none; }

/* Settings › Notifications */
.nf-area + .nf-area { margin-top: 14px; }
.nf-area-head { font-size: 14px; margin: 12px 0 4px; }
.nf-prefs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nf-pref {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.nf-pref-label { margin: 0; font-weight: 700; }
.nf-pref-describe, .nf-pref-why { margin: 2px 0 0; }
.nf-pref-why { font-weight: 700; }
.nf-switches { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.nf-control { display: grid; gap: 4px; justify-items: start; }
.nf-control-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.nf-always { margin: 0; font-weight: 700; color: var(--muted); }
.nf-foot { margin-top: 12px; }

/* The switch: a pill with a knob and the word, so it never relies on colour alone. */
.nf-switch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 12px 3px 3px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--nf-off); color: var(--ink); font: inherit; font-weight: 700;
  transition: background-color .15s ease;
}
.nf-switch.is-on { background: var(--nf-on); color: var(--face-ink); border-color: var(--face-ink); }
.nf-switch[disabled] { cursor: not-allowed; opacity: .55; }
.nf-switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.nf-knob { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); }
.nf-switch.is-on .nf-knob { background: var(--face-ink); border-color: var(--face-ink); }
.nf-state { min-width: 2.2em; text-align: left; }

@media (max-width: 560px) {
  .nf-row { grid-template-columns: auto minmax(0, 1fr); }
  .nf-actions { grid-column: 2; }
  .nf-pref { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .nf-switch { transition: none; }
}
