/* ===== 用户极简图标竖栏（花瓣风格） ===== */

.ohc-user-rail {
    --ohc-rail-accent: #2163e8;
    --ohc-rail-accent-d: #1a52c4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ohc-rail-item {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b78;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s, color .16s;
}
.ohc-rail-item:hover {
    background: #f1f3f8;
    color: var(--ohc-rail-accent);
}
.ohc-rail-primary {
    background: var(--ohc-rail-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 99, 232, .35);
}
.ohc-rail-primary:hover {
    background: var(--ohc-rail-accent-d);
    color: #fff;
}
.ohc-rail-sep {
    width: 26px;
    height: 1px;
    background: #ececf2;
    margin: 4px 0;
    display: block;
}
.ohc-rail-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

/* 悬浮提示 */
.ohc-rail-tip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 30;
}
.ohc-rail-item:hover .ohc-rail-tip {
    opacity: 1;
}

/* 分组弹出菜单 */
.ohc-rail-group {
    position: relative;
}
.ohc-rail-flyout {
    position: absolute;
    left: calc(100% + 12px);
    top: 0;
    background: #fff;
    border: 1px solid #eeeef4;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 6px;
    min-width: 150px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 30;
}
/* 透明桥接区：填补按钮与菜单之间的空隙，鼠标移入菜单不会消失 */
.ohc-rail-flyout::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: -16px;
    width: 16px;
}
/* 分组按钮不显示文字提示（已有展开菜单） */
.ohc-rail-group .ohc-rail-tip {
    display: none;
}
.ohc-rail-group:hover .ohc-rail-flyout,
.ohc-rail-group.open .ohc-rail-flyout {
    display: flex;
}
.ohc-rail-flyout a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.ohc-rail-flyout a i {
    width: 16px;
    text-align: center;
    color: #8a8a96;
}
.ohc-rail-flyout a:hover {
    background: #f5f7fb;
    color: var(--ohc-rail-accent);
}
.ohc-rail-flyout a:hover i {
    color: var(--ohc-rail-accent);
}

/* ---- 悬浮版（首页 / 其它页面）：靠左的圆角细竖条 ---- */
.ohc-rail-fixed {
    position: fixed;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #f0f0f6;
    padding: 10px 5px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
}

/* ---- 内嵌版（用户中心左栏） ---- */
.ohc-rail-inline {
    background: #fff;
    border-radius: 14px;
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}

/* ---- 主题 rollbar：已登录时用本竖栏替代（大屏隐藏） ---- */
@media (min-width: 992px) {
    body.ohc-has-rail .rollbar {
        display: none !important;
    }
}
/* 小屏保留主题 rollbar，隐藏悬浮竖栏 */
@media (max-width: 991px) {
    .ohc-rail-fixed {
        display: none !important;
    }
}

/* ---- 用户中心：隐藏原左栏，正文让位给贴左细竖条（与首页同一组件） ---- */
@media (min-width: 992px) {
    body.ohc-rail-uc .container > .row > .col-lg-3[data-sticky] {
        display: none !important;
    }
    body.ohc-rail-uc .container > .row > [data-sticky-content] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        padding-left: 66px;
    }
}
