/* 站内信铃铛（老项目原生实现），配合 /static/js/notify-bell.js */

/* 与相邻 header li 垂直对齐：沿用其 padding 公式（60px 头高，34px 内容），再上移 2px；
   左右用 margin 拉开与搜索/头像的间距 */
.notify-bell-wrapper {
  position: relative;
  /* 之前 margin 被 CDN .menu li 规则盖掉导致左侧仍贴着，改用 !important 强制。
     宽屏搜索为输入框态，左边距给大一点(12px)，避免和输入框贴太近 */
  margin: 0 1px 0 12px !important;
  padding: calc((60px - 1px - 4px * 2 - 34px) / 2 - 2px) 0 0 0 !important;
}

/* 窄屏（≤1230px）搜索收成图标，左边距回到 6px（与 CDN header 搜索折叠断点保持一致） */
@media (max-width: 1230px) {
  .notify-bell-wrapper {
    margin-left: 6px !important;
  }
}

.notify-bell-wrapper .nb-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  color: #6a7282;
  cursor: pointer;
}

/* hover 不变背景，图标变绿（与左侧搜索一致） */
.notify-bell-wrapper .nb-trigger:hover {
  color: #00a13b;
  background: transparent;
}

.notify-bell-wrapper .nb-icon-wrap {
  position: relative;
  display: inline-flex;
}

.notify-bell-wrapper .nb-icon {
  display: block;
  width: 22px;
  height: 22px;
}

/* 角标贴着铃铛图标右上角 */
.notify-bell-wrapper .nb-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  line-height: 16px;
  text-align: center;
  font-size: 12px;
  color: #fff;
  background: #ff4d4f;
  border-radius: 9px;
  transform: translate(50%, -50%);
}

/* ---- 弹层：对齐后台 NotifyPopover ---- */
.notify-bell-wrapper .nb-pop {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 4px 24px 0 rgba(14, 25, 58, 0.12);
  overflow: hidden;
  z-index: 1050;
  /* header 为导航居中设了很大的 line-height，会被继承进弹层把标题撑高，这里重置 */
  line-height: 1.5;
}

.notify-bell-wrapper .nb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.notify-bell-wrapper .nb-htitle {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #333;
}

.notify-bell-wrapper .nb-count {
  font-weight: 400;
  color: #999;
  margin-left: 2px;
}

.notify-bell-wrapper .nb-more {
  font-size: 13px;
  color: #595959;
  text-decoration: none;
}

.notify-bell-wrapper .nb-more:hover {
  color: #00a13b;
}

.notify-bell-wrapper .nb-body {
  max-height: 320px;
  overflow-y: auto;
}

.notify-bell-wrapper .nb-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}

.notify-bell-wrapper .nb-item:last-child {
  border-bottom: none;
}

.notify-bell-wrapper .nb-item:hover {
  background: #fafafa;
}

.notify-bell-wrapper .nb-item-title {
  font-size: 13px;
  line-height: 20px;
  color: #333;
  word-break: break-all;
}

.notify-bell-wrapper .nb-item-time {
  margin-top: 2px;
  font-size: 12px;
  line-height: 18px;
  color: #bbb;
}

.notify-bell-wrapper .nb-tip {
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: #999;
}
