/* 顶部信息栏高度修复 - 设置为45px总高度 */

/* 强制设置顶部信息栏固定在顶部并设置为45px高度 */
.top-bar,
div.top-bar,
body .top-bar,
html body .top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    width: 100% !important;
    padding: 10px 0 !important;
    min-height: 45px !important;
    max-height: 45px !important;
    height: 45px !important;
    line-height: 25px !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
}

/* 确保容器内容垂直居中 */
.top-bar .container,
div.top-bar .container,
body .top-bar .container,
html body .top-bar .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 100% !important;
    min-height: 25px !important;
    padding: 0 var(--spacing-sm) !important;
}

/* 联系信息样式调整 */
.top-bar .contact-info,
.top-bar .contact-info span {
    line-height: 25px !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
}

.top-bar .contact-info span {
    margin-right: 25px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.top-bar .contact-info i {
    margin-right: 8px !important;
    font-size: 0.85rem !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 移除所有可能的边框和轮廓 */
.top-bar .contact-info *,
.top-bar .contact-info span *,
.top-bar .contact-info a,
.top-bar .contact-info a:focus,
.top-bar .contact-info a:hover,
.top-bar .contact-info a:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

/* 语言选择器调整 */
.top-bar .language-select {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.top-bar .language-select select {
    line-height: 1.2 !important;
    font-size: 0.9rem !important;
    height: 36px !important;
    padding: 8px 30px 8px 12px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root { --top-bar-height: 18px; }
    .top-bar,
    div.top-bar,
    body .top-bar,
    html body .top-bar {
        display: block !important;
        padding: 1px 0 !important;
        min-height: 18px !important;
        max-height: 18px !important;
        height: 18px !important;
        line-height: 16px !important;
        font-size: 0.7rem !important;
    }

    .top-bar .container {
        min-height: 16px !important;
        padding: 0 var(--spacing-xs) !important;
    }

    .top-bar .contact-info span {
        margin-right: 10px !important;
    }
}

@media (max-width: 576px) {
    :root { --top-bar-height: 16px; }
    .top-bar,
    div.top-bar,
    body .top-bar,
    html body .top-bar {
        padding: 1px 0 !important;
        min-height: 16px !important;
        max-height: 16px !important;
        height: 16px !important;
        line-height: 14px !important;
        font-size: 0.65rem !important;
    }

    .top-bar .container {
        min-height: 14px !important;
    }

    .top-bar .contact-info span {
        margin-right: 8px !important;
    }

    .top-bar .contact-info i {
        font-size: 0.6rem !important;
    }
}

/* 终极覆盖 - 使用最高特异性 */
html body div.top-bar,
html body .top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    width: 100% !important;
    padding: 10px 0 !important;
    height: 45px !important;
    min-height: 45px !important;
    max-height: 45px !important;
    line-height: 25px !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
}

/* 默认变量与布局补偿 */
:root { --top-bar-height: 45px; }

/* 给页面内容留出被固定信息栏占用的空间 */
html body {
    padding-top: var(--top-bar-height) !important;
}

/* 让主导航栏在顶部信息栏下方进行粘性定位 */
html body header.main-header,
html body .main-header {
    top: var(--top-bar-height) !important;
    z-index: 1000 !important;
}
