/* 顶部图标基础样式 */
.cosmos-bannerOption-icon SVG {
fill: none;
stroke: #000;
stroke-width: 3px;
transform: scale(0.7);
}
#cosmos-banner {
height: 46px;
}
/* 原始搜索表单容器(用于回退或备用) */
#searchform {
width: 20% !important;
margin-left: auto !important;
margin-right: 0 !important;
}
/* 备用输入框样式(当 Codex 不生效时) */
#searchform input {
height: 26px;
background: #fff;
border-radius: 3px;
color: #1e0c1b;
}
/* 通知区域间距 */
#cosmos-notification-icons {
padding: 5px 5px 5px 0;
}
/* 铃铛图标 */
body .oo-ui-icon-bell,
.mw-ui-icon-bell::before {
background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19.6' stroke='%23000' stroke-width='2.5px' fill='none' viewBox='0 0 28 28'%3e%3cpath d='M 2 21 L 6 15 L 6 10 A 5 5 180 0 1 22 10 L 22 15 L 26 21 Z M 18 21.5 A 4 4.5 180 0 1 10 21.5'/%3e%3c/svg%3e") no-repeat;
background-size: cover;
}
/* 托盘图标 */
body .oo-ui-icon-tray,
.mw-ui-icon-tray::before {
background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19.6' stroke='%23000' stroke-width='2.5px' fill='none' viewBox='0 0 28 28'%3e%3cpath d='M 2 5 L 26 5 L 26 23 L 2 23 Z M 2 9 L 14 19 L 26 9 L 26 23 L 2 23 Z M 2 23 L 10 15 Z M 26 23 L 18 15 Z'/%3e%3c/svg%3e") no-repeat;
background-size: cover;
}
/* 通知徽章无新消息时的透明度 */
body:not(.skin-vector-2022) #pt-notifications-alert .mw-echo-notifications-badge.mw-echo-notifications-badge-all-read,
body:not(.skin-vector-2022) #pt-notifications-notice .mw-echo-notifications-badge.mw-echo-notifications-badge-all-read {
opacity: 0.9;
transform: scale(0.7);
}
#cosmos-notification-icons #pt-notifications-notice {
padding-left: 0;
}
/* 隐藏 Codex 搜索框右侧按钮 */
#p-search .cdx-button {
display: none;
}
/* 调整 Codex 搜索组件外层高度 */
.cdx-search-input--has-end-button {
height: 36px;
box-sizing: border-box;
}
/* 确保 Codex 文本输入容器基础样式 */
.cdx-text-input {
min-width: auto;
height: 36px;
}
#p-search .cdx-text-input__input {
box-sizing: border-box !important;
height: 100% !important; /* 改为 100%,自适应父容器 */
width: 100% !important;
padding: 5px 20px;
margin: 0;
border: 0;
background: #fff;
border-radius: 3px;
color: #1e0c1b;
outline: 0;
box-shadow: none;
line-height: 1.4;
transition: background 250ms ease;
left: auto;
position: relative;
-webkit-appearance: none;
}
.cdx-search-input--has-end-button .cdx-search-input__input-wrapper {
height: 36px;
padding: 0;
margin: 0;
background: #fff;
border-radius: 3px;
box-sizing: border-box;
overflow: hidden; /* 继续保留,防止任何溢出 */
}
/* 悬停、聚焦效果(基于原始 #searchform,不影响 Codex) */
#searchform input:hover {
border: 1px solid #1e0c1b;
}
#searchform input:focus {
background: #fff;
border: 1px solid #1e0c1b;
}