.rankup-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
    background: #eef0f2;
    font-family: inherit;
    isolation: isolate;
}

.rankup-lang-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: #8a8f98;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: color 0.3s ease, opacity 0.3s ease;
    z-index: 1;
}

.rankup-lang-item:not(.is-active) {
    opacity: 0.55;
}

.rankup-lang-item:hover:not(.is-active) {
    opacity: 1;
}

.rankup-lang-item.is-active {
    color: #fff;
}

/* dark "pill" behind the active item */
.rankup-lang-item.is-active::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #111319;
    z-index: -1;
    animation: rankup-lang-pop 0.25s ease;
}

@keyframes rankup-lang-pop {
    from { transform: scale(0.85); opacity: 0.4; }
    to   { transform: scale(1); opacity: 1; }
}

.rankup-lang-item:hover:not(.is-active) {
    color: #111319;
    opacity: 1;
}

.rankup-lang-flag {
    display: flex;
    line-height: 0;
}

.rankup-lang-flag img {
    width: 20px;
    height: auto;
    max-height: 14px;
    border-radius: 3px;
    object-fit: contain;
    display: block;
}

/* When a flag and a code are shown together, add a small gap */
.rankup-lang-flag + .rankup-lang-name {
    margin-left: 6px;
}
