/* PECPool multilingual language selector. Shared by LTR and RTL cultures. */
html[lang="zh-CN"] body,
html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3,
html[lang="zh-CN"] h4,
html[lang="zh-CN"] h5,
html[lang="zh-CN"] h6,
html[lang="zh-CN"] .navbar-nav > li > a,
html[lang="zh-CN"] .btn {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
}

html[lang="ru"] body,
html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3,
html[lang="ru"] h4,
html[lang="ru"] h5,
html[lang="ru"] h6,
html[lang="ru"] .navbar-nav > li > a,
html[lang="ru"] .btn {
    font-family: "Segoe UI", Arial, sans-serif;
}

.pec-language-switcher {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    direction: ltr;
}

.pec-language-list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
    vertical-align: middle;
}

.pec-language-item {
    display: inline-flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pec-language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #30415d;
    background: transparent;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.pec-language-link:hover,
.pec-language-link:focus {
    color: #0b2c6f;
    border-color: #d9e3f2;
    background: #f5f8fe;
    text-decoration: none;
}

.pec-language-item.is-active .pec-language-link {
    color: #0b2c6f;
    border-color: #c9d8ef;
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px rgba(11, 44, 111, .03);
}

.pec-language-item.is-unavailable .pec-language-link {
    opacity: .42;
    cursor: not-allowed;
    filter: grayscale(.7);
}

.pec-language-flag {
    display: block;
    flex: 0 0 auto;
    width: 24px;
    height: 15px;
    margin: 0;
    border: 1px solid rgba(8, 31, 74, .14);
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.pec-language-name {
    display: inline-block;
    line-height: 1;
    direction: auto;
    unicode-bidi: plaintext;
}

/* Home: language bar replaces the social icons on the top-right. */
.home-topbar-logo {
    float: left !important;
}

.home-language-tools {
    float: right !important;
    text-align: right;
}

.home-language-tools .pec-language-switcher {
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: flex-end;
}

.home-language-tools .pec-language-list {
    justify-content: flex-end;
}

/* Inner pages: language bar replaces the social icons on the top-left. */
.inner-language-tools {
    float: left !important;
    text-align: left;
}

.inner-account-tools {
    float: right !important;
    text-align: right;
}

.inner-language-tools .pec-language-switcher,
.inner-account-tools .top-nav {
    min-height: 34px;
}

.inner-language-tools .pec-language-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.inner-language-tools .pec-language-link {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
}

@media (max-width: 1199px) {
    .pec-language-list {
        gap: 2px;
    }

    .pec-language-link {
        gap: 5px;
        padding-left: 6px;
        padding-right: 6px;
        font-size: 11.5px;
    }

    .pec-language-flag {
        width: 22px;
        height: 14px;
    }
}

@media (max-width: 991px) {
    .home-language-tools .pec-language-switcher {
        min-height: 70px;
    }

    .home-language-tools .pec-language-name,
    .inner-language-tools .pec-language-name {
        display: none;
    }

    .pec-language-link {
        width: 36px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .pec-language-flag {
        width: 24px;
        height: 15px;
    }
}

@media (max-width: 767px) {
    .home-topbar-logo,
    .home-language-tools,
    .inner-language-tools,
    .inner-account-tools {
        float: none !important;
        width: 100%;
        text-align: center !important;
    }

    .home-language-tools .pec-language-switcher,
    .inner-language-tools .pec-language-switcher {
        min-height: 0;
        padding: 8px 0;
        justify-content: center;
    }

    .home-language-tools .pec-language-list,
    .inner-language-tools .pec-language-list {
        justify-content: center;
    }

    .inner-account-tools .top-nav {
        min-height: 0;
        margin: 0 0 5px;
        text-align: center;
    }

    .home-language-tools .pec-language-name,
    .inner-language-tools .pec-language-name {
        display: inline-block;
    }

    .pec-language-link {
        width: auto;
        min-height: 30px;
        padding: 4px 7px;
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .pec-language-list {
        width: 100%;
        justify-content: center;
        gap: 3px;
    }

    .pec-language-link {
        gap: 4px;
        padding-left: 5px;
        padding-right: 5px;
        font-size: 10.5px;
    }

    .pec-language-flag {
        width: 21px;
        height: 13px;
    }
}

.site-header.header-s2.has-fixed .home-language-tools { display: none; }
