/* 代码高亮按钮位置优化 - 确保在header中正确显示 */

/* 按钮容器 - 固定在顶部header区域 */
.code-wrapper .code-button-box {
    position: absolute !important;
    right: 8px !important;
    top: 0 !important;
    height: 30px !important;
    line-height: 30px !important;
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    user-select: none;
    z-index: 1000 !important;
    gap: 2px;
}

/* 单个按钮样式 */
.code-wrapper .code-btn {
    height: 24px !important;
    width: 24px !important;
    line-height: 24px !important;
    margin: 0 2px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
}

.code-wrapper .code-btn i {
    font-size: 16px !important;
}

/* 确保header区域有足够空间容纳按钮 */
.code-wrapper::before {
    display: block !important;
    position: relative !important;
    height: 30px !important;
    line-height: 30px !important;
    padding: 0 120px 0 80px !important;
    box-sizing: border-box !important;
}

/* Mac风格三个圆点确保在左侧正确显示 */
.code-wrapper.mac-light > pre > code::before,
.code-wrapper.mac-dark > pre > code::before,
.code-wrapper.mac-change-light > pre > code::before,
.code-wrapper.mac-change-dark > pre > code::before {
    z-index: 100 !important;
    position: absolute !important;
    left: 20px !important;
    top: 9px !important;
}

/* 提示信息不要遮挡按钮 */
.code-wrapper .code-button-notice {
    max-width: 150px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

