/* ============================================================
   通知中心：铃铛角标 / 右侧滑出面板
   z-index：mask 87 / panel 88（聊天覆盖层 80、历史抽屉 85/86、toast 90 之间）
   ============================================================ */

/* ---------- 铃铛角标（顶栏 + 移动端热区共用） ---------- */
.notif-badge {
  position: absolute; top: 4px; right: 5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--c-rose);
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-card);
  pointer-events: none;
}
.notif-badge[hidden] { display: none; }

/* ---------- 移动端热区铃铛 ---------- */
.hz-bell {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  color: var(--ink-2); background: var(--bg-soft);
  position: relative;
}
.hz-bell svg { width: 19px; height: 19px; }
.hz-bell .notif-badge { top: 0; right: 0; }

/* 首页滚动条可点击打开通知面板 */
.topbar-ticker { cursor: pointer; }

/* ---------- 遮罩 ---------- */
.notif-mask {
  position: fixed; inset: 0; z-index: 87;
  background: rgba(12, 16, 38, 0.38);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.32s ease;
}
.notif-mask.open { opacity: 1; pointer-events: auto; }

/* ---------- 面板 ---------- */
.notif-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 88;
  width: min(400px, 100vw);
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--line-soft);
  box-shadow: var(--shadow-float);
  transform: translateX(108%);
  transition: transform 0.38s cubic-bezier(0.32, 0.9, 0.3, 1);
}
.notif-panel.open { transform: translateX(0); }
body.notif-open { overflow: hidden; }

.notif-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line-soft);
}
.notif-title { font-size: 17px; font-weight: 800; color: var(--ink-1); flex: 1; }
.notif-all-read {
  font-size: 12.5px; font-weight: 600; color: var(--c-gold);
  padding: 6px 11px; border-radius: 999px;
  background: var(--bg-soft);
}
.notif-all-read[hidden] { display: none; }
.notif-close {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-2); background: var(--bg-soft);
}

/* ---------- 列表 ---------- */
.notif-list { flex: 1; overflow-y: auto; padding: 8px; }
.notif-item {
  display: flex; gap: 11px; width: 100%;
  text-align: left; padding: 13px 11px;
  border-radius: 14px;
  transition: background 0.2s;
  position: relative;
}
.notif-item:hover { background: var(--bg-soft); }
.notif-ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: var(--nc, var(--c-gold));
  background: var(--bg-soft);
}
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-item-title { font-size: 14.5px; font-weight: 700; color: var(--ink-1); }
.notif-item-content {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item.expanded .notif-item-content { -webkit-line-clamp: unset; }
.notif-item-time { font-size: 11px; color: var(--ink-3); }
.notif-dot {
  position: absolute; top: 17px; right: 12px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-rose);
}
.notif-item:not(.unread) .notif-dot { display: none; }

.notif-empty {
  padding: 64px 20px; text-align: center;
  font-size: 13px; color: var(--ink-3); line-height: 1.8;
}

/* ---------- 底部 ---------- */
.notif-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
}
.notif-login-hint { font-size: 12.5px; color: var(--ink-2); text-align: center; line-height: 1.7; }
.notif-login-hint a { color: var(--c-gold); font-weight: 700; }
