/* ==============================================
   语言切换器通用样式 - 可全局使用
   适配 TranslatePress 短代码结构
============================================== */
.trp_language_switcher_shortcode {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    z-index: 999; /* 保证不被其他元素遮挡 */
    margin: 0;
    padding: 0;
}

/* 主容器 */
.trp-language-switcher-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* 当前语言 */
.trp-ls-shortcode-current-language {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 5px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    transition: all 0.2s ease;
     /* min-width: 70px !important;覆盖原内联宽度，保证正常显示 */
    width: auto !important;
    color:#666;
}

/* 下拉语言列表 */
.trp-ls-shortcode-language {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    z-index: 9999;
    width: auto !important; /* 覆盖内联样式 */
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-sizing:border-box;
}

/* 鼠标悬浮时显示下拉 */
.trp-language-switcher-container:hover .trp-ls-shortcode-language {
    opacity: 1;
    visibility: visible;
    display: block !important;
}

/* 每个语言项 */
.trp-ls-shortcode-language a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 5px;
    white-space: nowrap;
    color: #333;
    text-decoration: none !important;
    transition: background 0.2s ease;
    color:#666 !important;
}

/* 语言项 hover 效果 */
.trp-ls-shortcode-language a:hover {
    background-color: #f3f4f6;
    color: #000;
}

/* 国旗图标统一大小与对齐 */
.trp-flag-image {
    display: inline-block;
    width: 18px !important;
    height: 12px !important;
    object-fit: cover;
    vertical-align: middle;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 当前语言内部样式 */
.trp-ls-shortcode-current-language a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 10px;
}

/* 禁用语言样式（当前语言） */
.trp-ls-disabled-language {
    cursor: default !important;
    opacity: 1 !important;
}

/* 小屏适配 */
@media (max-width: 768px) {
    .trp-ls-shortcode-current-language,
    .trp-ls-shortcode-language a {
        padding: 2px;
        font-size: 10px;
    }
}