/* ============================================================
   language.css · 手机外直播模式与语言分段切换控件
   ============================================================ */

.live-mode-switcher-section,
.language-switcher-section {
    margin-bottom: 18px;
}

.live-mode-switcher-title,
.language-switcher-title {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0;
}

.live-mode-switcher,
.language-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    height: 34px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.live-mode-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-mode-switcher button,
.language-switcher button {
    min-width: 0;
    height: 26px;
    padding: 0 8px;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.52);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 26px;
    letter-spacing: 0;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.live-mode-switcher button:hover,
.language-switcher button:hover {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.055);
}

.live-mode-switcher button.is-active,
.language-switcher button.is-active {
    color: #fff;
    background: rgba(var(--brand-1-rgb), 0.34);
    box-shadow: inset 0 0 0 1px rgba(var(--brand-3-rgb), 0.24);
}

.live-mode-switcher button:focus-visible,
.language-switcher button:focus-visible {
    outline: 1px solid rgba(var(--brand-3-rgb), 0.72);
    outline-offset: -1px;
}

@media (max-width: 1180px) {
    .info-panel {
        z-index: 70;
        display: block;
        top: 14px;
        right: 14px;
        left: auto;
        width: 178px;
        padding: 9px;
        transform: none;
        border-radius: 10px;
        background: rgba(12, 13, 19, 0.78);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .info-panel > :not(.live-mode-switcher-section):not(.language-switcher-section) {
        display: none;
    }

    .live-mode-switcher-section {
        margin-bottom: 7px;
    }

    .language-switcher-section {
        margin: 0;
    }

    .live-mode-switcher-title,
    .language-switcher-title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 520px) {
    .info-panel {
        top: 8px;
        right: 8px;
        left: auto;
        width: 166px;
        padding: 6px;
        border-radius: 8px;
    }

    .live-mode-switcher,
    .language-switcher {
        height: 30px;
        padding: 2px;
    }

    .live-mode-switcher button,
    .language-switcher button {
        height: 24px;
        padding: 0 4px;
        font-size: 10px;
        line-height: 24px;
    }
}

/* 泰文组合音标需要更合适的系统字体与紧凑字距，固定宽度标签继续保持单行。 */
html:lang(th) body {
    font-family: 'Thonburi', 'Noto Sans Thai', Tahoma, -apple-system, BlinkMacSystemFont, sans-serif;
}

html:lang(th) button,
html:lang(th) input,
html:lang(th) select,
html:lang(th) textarea,
html:lang(th) .drawer-title,
html:lang(th) .start-btn,
html:lang(th) .host-gift-ranking-button {
    letter-spacing: 0;
}

html:lang(th) .pa-label,
html:lang(th) .cap-label,
html:lang(th) .live-action-label {
    font-size: 10px;
    letter-spacing: 0;
}

html:lang(th) .primary-action-button {
    letter-spacing: 0;
    line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher button {
        transition: none;
    }
}
