/* Notifications bell + popover (loaded on every page via notifications.js) */

.notif-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}
.notif-bell {
  appearance: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  color: var(--text-secondary, rgba(238,242,255,0.72));
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, border-color 0.15s;
}
.notif-bell:hover {
  color: var(--text-primary, #eef2ff);
  border-color: var(--accent, rgba(79,125,249,0.6));
}
.notif-dot {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(10,14,26,0.95);
}

.notif-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(12,18,32,0.98);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  box-shadow: 0 24px 52px rgba(0,0,0,0.5);
  z-index: 400;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.notif-pop.hidden { display: none; }

.notif-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.notif-pop-head strong { color: var(--text-primary, #eef2ff); font-size: 14px; }
.notif-mark-all {
  appearance: none;
  background: transparent;
  color: var(--text-muted, rgba(238,242,255,0.5));
  border: none;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
}
.notif-mark-all:hover { color: var(--text-primary, #eef2ff); }

.notif-pop-body {
  overflow-y: auto;
  padding: 6px 0;
}
.notif-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted, rgba(238,242,255,0.5));
  font-size: 13px;
}

.notif-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text-primary, #eef2ff);
  position: relative;
  transition: background 0.1s;
}
.notif-row:hover { background: rgba(255,255,255,0.04); }
.notif-row.unread {
  background: rgba(79,125,249,0.08);
}
.notif-row.unread::before {
  content: "";
  position: absolute;
  top: 50%; left: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent, #4f7df9);
  transform: translateY(-50%);
}
.notif-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  display: grid; place-items: center;
  color: var(--text-accent, #a7c6ff);
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-avatar-fb {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--accent-soft, rgba(79,125,249,0.15));
}
.notif-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
  flex: 1;
}
.notif-line { color: var(--text-primary, #eef2ff); line-height: 1.3; }
.notif-line em {
  color: var(--text-accent, #a7c6ff);
  font-style: normal;
}
.notif-snip {
  color: var(--text-muted, rgba(238,242,255,0.5));
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-time {
  color: var(--text-muted, rgba(238,242,255,0.4));
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10.5px;
}

@media (max-width: 480px) {
  .notif-pop { width: 320px; }
}


/* ===== Shared nav bits used across pages ===== */
.nav-links a.has-soon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-soon-pill {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent, #7cb3ff);
  background: var(--accent-soft, rgba(79,125,249,0.15));
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}


/* Ensure the primary nav right-side cluster always lays out horizontally
   so the bell sits beside the avatar instead of stacking above it on
   pages where no page-specific CSS defines .nav-right. */
.nav-right {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
