/* ============================================================
   揽星阁 · 中英文切换按钮（i18n.js 动态注入）
   三处锚点：主站 .wp-actions / 抽屉 .wp-drawer / 工具页 .tl-header
   ============================================================ */

.wp-lang-btn,
.tl-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    min-width: 52px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    color: #e7ebf5;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.wp-lang-btn i,
.tl-lang-btn i {
    font-size: 15px;
    line-height: 1;
}
.wp-lang-btn:hover,
.tl-lang-btn:hover {
    border-color: rgba(124, 92, 255, .65);
    background: rgba(124, 92, 255, .12);
    color: #fff;
    transform: translateY(-1px);
}
.wp-lang-btn:focus-visible,
.tl-lang-btn:focus-visible {
    outline: 2px solid #7c5cff;
    outline-offset: 2px;
}
/* 英文态：高亮，提示当前语言 */
html[data-lang="en"] .wp-lang-btn,
html[data-lang="en"] .tl-lang-btn {
    border-color: rgba(124, 92, 255, .55);
    background: rgba(124, 92, 255, .16);
    color: #d6ccff;
}

/* 抽屉里的语言行 */
.wp-drawer-lang {
    padding: 10px 0 4px;
}
.wp-drawer-lang .wp-lang-btn {
    width: 100%;
    height: 38px;
    font-size: 13px;
}

/* 工具页头部按钮 */
.tl-header .tl-lang-btn {
    height: 30px;
    min-width: 48px;
    font-size: 12px;
}

/* 浅色主题适配 */
html[data-theme="light"] .wp-lang-btn,
html[data-theme="light"] .tl-lang-btn {
    border-color: rgba(19, 29, 53, .18);
    background: rgba(19, 29, 53, .04);
    color: #37405c;
}
html[data-theme="light"] .wp-lang-btn:hover,
html[data-theme="light"] .tl-lang-btn:hover {
    border-color: rgba(90, 63, 208, .55);
    background: rgba(124, 92, 255, .10);
    color: #3c3489;
}
html[data-theme="light"][data-lang="en"] .wp-lang-btn,
html[data-theme="light"][data-lang="en"] .tl-lang-btn {
    border-color: rgba(90, 63, 208, .48);
    background: rgba(124, 92, 255, .12);
    color: #3c3489;
}

/* 无标准导航页（如 404）的兜底悬浮按钮 */
.wp-lang-float {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 80;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

@media (max-width: 620px) {
    .wp-lang-btn,
    .tl-lang-btn {
        min-width: 44px;
        padding: 0 8px;
    }
}
