.koi-lang {
    position: relative;
    z-index: 1000000;
}

.koi-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 33px;
    border: 1px solid #d8e0ec;
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    color: #24324b;
    padding: 0 10px;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.koi-lang-toggle:hover,
.koi-lang.open .koi-lang-toggle {
    border-color: #7aa7e9;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
}

.koi-lang-flag {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.koi-lang-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}

.koi-lang-name {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.koi-lang-caret {
    color: #7b8aa4;
    font-size: 11px;
}

.koi-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 286px;
    max-height: 360px;
    overflow: hidden;
    display: none;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.koi-lang.open .koi-lang-menu {
    display: block;
}

.koi-lang-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px;
    padding: 0 10px;
    height: 34px;
    border: 1px solid #d8e0ec;
    border-radius: 6px;
    color: #8aa0bd;
}

.koi-lang-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #24324b;
    font-size: 13px;
}

.koi-lang-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 0 6px;
}

.koi-lang-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f2937;
    padding: 8px 12px;
    text-align: left;
    font-size: 14px;
}

.koi-lang-item .flag {
    display: inline-flex;
    align-items: center;
}

.koi-lang-item:hover,
.koi-lang-item.active {
    background: #2f83d2;
    color: #fff;
}

.koi-lang-item .native {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.koi-lang-item .english {
    color: #6f809b;
    font-size: 12px;
}

.koi-lang-item:hover .english,
.koi-lang-item.active .english {
    color: rgba(255, 255, 255, .9);
}

html[dir="rtl"] .koi-lang-menu {
    left: 0;
    right: auto;
}

#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-gadget,
iframe.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

font {
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 767.98px) {
    .koi-lang {
        position: absolute;
        right: 12px;
        top: 52px;
    }

    .koi-lang-name {
        display: none;
    }

    .koi-lang-menu {
        right: 0;
        width: min(286px, calc(100vw - 24px));
    }
}
