/* else0610 消息中心：IM/消息中心全部样式
   原内联于 navigation.php / components/message/list.php / components/message/detail.php，统一抽出。
   由 navigation.php 全站引入（红点/toast 的 DOM 在导航里，每页都有）。 */

/* ───── 导航红点 + 移动端即时广告条（navigation.php，全站） ───── */
/* 头像未读红点（放在圆形头像外层，避免被 .user_target 的 overflow:hidden 裁切） */
.search-extra > li,
.nav-categories .search-extra > li,
.side-toolbar-list .ai-my-item { position: relative; }
.user_target { position: relative; }
.user_target + .ai-dot {
    position: absolute; top: 3px; right: 3px;
    width: 9px; height: 9px; border-radius: 50%;
    background: #ff2d2d; border: 1.5px solid #181818;
    pointer-events: none; z-index: 2;
}
/* 下拉菜单「消息中心」红点 */
.user_menu .ai-dot-inline {
    display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; background: #ff2d2d;
    margin-left: 6px; vertical-align: middle;
}
/* 红点/toast 默认隐藏，im.js 按未读 toggle 'hidden' 类 */
.ai-dot.hidden, .ai-dot-inline.hidden, .ai-msg-toast.hidden { display: none !important;  }
/* 消息推送轮播条：H5 在 .nav-fixed 内文档流（搜索框下方）；
   PC 端 .nav-fixed display:none，im.js 把本条移到 #masthead 后的 .container 顶部（内容列上方） */
.ai-msg-toast {
    position: fixed;
    left: 0;
    right: 0;
    top: 100px;
    z-index: 99;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 2.4rem;
    padding: 0 12px 0 9px;
    background: transparent;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    text-align: left;
}
.ai-msg-toast::before {
    content: ''; position: absolute; inset: 0;    
    width: 100%;
    height: 100%;
    background: url(/usr/plugins/message/images/toast-bg2.png) center / cover no-repeat;
    pointer-events: none;
}
.ai-msg-toast .mt-ico { width: 23px; height: 23px; flex: 0 0 23px; margin-right: 8px; object-fit: contain; }
.ai-msg-toast .mt-text { flex: 1; min-width: 0; color: #fff; font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-msg-toast .mt-more { display: flex; align-items: center; flex: 0 0 auto; margin-left: 8px; color: #B3AE96; font-size: 0.8rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ai-msg-toast .mt-more .mt-arrow { width: 12px; height: 12px; margin-left: 2px; }
@media (min-width: 768px) {
    .ai-msg-toast { 
        margin: 0; position: relative; top:0;
        border-radius: 20px;
        padding: 0px 15px;
    }
}
body.ai-page-message .ai-msg-toast { display: none; }

/* ───── 消息列表页（components/message/list.php）：公告入口/广告卡排序 ───── */
.ai-msg-list { display: flex; flex-direction: column; }
@media (min-width: 768px) {
    .ai-msg-list .ai-msg-ad { order: 1; }
    .ai-msg-list .ai-msg-notice-entry { order: 2; }
}

/* ───── 消息详情页（components/message/detail.php）：广告/公告未读红点 + 空态 ───── */
.ai-msg-ad .ad-dot {
    position: absolute; right: 13px; top: 6px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff2d2d;
}

/* 公告未读红点 + 空态（im.js 渲染用） */
.ai-msg-announce { position: relative; }
.ai-msg-announce .ai-msg-dot {
    position: absolute; right: 13px; top: 60px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff2d2d;
}
.ai-msg-empty { padding: 40px 0; text-align: center; color: #828282; font-size: 14px; }

@media (min-width: 768px) {
    .ai-msg-ad .ad-dot { display: none; }
    .ai-msg-announce .ai-msg-dot { top: 6px }
}
