/* Forge | notifications.css — bell, badges, list, popup */

/* Header bell with a real count */
.app-header .icon-btn .bell-count {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--accent-pink);
  color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
  animation: bell-count-in 260ms var(--ease-in);
}
@keyframes bell-count-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.app-header .icon-btn.shake {
  animation: bell-shake 500ms var(--ease-in);
}
@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  15%      { transform: rotate(-10deg); }
  30%      { transform: rotate(8deg); }
  45%      { transform: rotate(-6deg); }
  60%      { transform: rotate(4deg); }
  75%      { transform: rotate(-2deg); }
}

/* Bigger count badge on a bottom-nav tab */
.app-nav a .nav-badge {
  position: absolute;
  top: 4px; right: calc(50% - 22px);
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--accent-pink);
  color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: bell-count-in 240ms var(--ease-in);
}

/* Notification list */
.notif-list { display: flex; flex-direction: column; gap: 6px; }

.notif-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  position: relative;
  animation: row-in 320ms var(--ease-in) both;
  animation-delay: calc(var(--i, 0) * 25ms);
  transition: background var(--t-fast) var(--ease-in);
}
.notif-row:active { background: var(--surface-2); }
.notif-row.unread {
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  border-color: var(--primary-soft);
}
.notif-row.unread::before {
  content: '';
  position: absolute; left: 6px; top: 50%;
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateY(-50%);
}

.notif-row .nr-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-forge);
  color: #fff; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.notif-row .nr-avatar img { width: 100%; height: 100%; object-fit: cover; }

.notif-row .nr-icon-badge {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.notif-row .nr-icon-badge svg { width: 12px; height: 12px; }
.notif-row .nr-icon-badge.blue { background: var(--primary); }
.notif-row .nr-icon-badge.pink { background: var(--accent-pink); }
.notif-row .nr-icon-badge.green { background: var(--success); }
.notif-row .nr-icon-badge.warn { background: var(--warning); }

.notif-row .nr-body { flex: 1; min-width: 0; }
.notif-row .nr-title {
  font-size: 14px; font-weight: 500;
  color: var(--text); line-height: 1.4;
  word-wrap: break-word;
}
.notif-row .nr-title b {
  font-weight: 700; color: var(--text-strong);
}
.notif-row .nr-time {
  font-size: 11px; color: var(--muted);
  margin-top: 4px;
}

/* Unread divider on the notifications list */
.notif-sep {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 4px 4px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-2);
}
.notif-sep::before, .notif-sep::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* Top popup for realtime notifications */
.notif-pop {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%) translateY(-130%);
  z-index: 200;
  width: calc(100vw - 28px);
  max-width: 420px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--sh-lg);
  padding: 12px 14px;
  display: flex; gap: 12px; align-items: center;
  transition: transform 340ms var(--ease-drawer), opacity 240ms var(--ease-in);
  opacity: 0;
  cursor: pointer;
}
.notif-pop.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.notif-pop .np-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-forge);
  color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.notif-pop .np-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-pop .np-body { flex: 1; min-width: 0; }
.notif-pop .np-head {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 2px;
}
.notif-pop .np-text {
  font-size: 13px; color: var(--text);
  line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Read-tick polish */
.msg .meta .tick {
  display: inline-flex; align-items: center;
  transition: color var(--t-fast) var(--ease-in), transform var(--t-normal) var(--ease-in);
}
.msg .meta .tick.just-read svg {
  animation: tick-pop 420ms var(--ease-in);
}
@keyframes tick-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
