.matslang-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.matslang-switcher__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #333;
    color: #333;
    background: #fff;
    opacity: 0.9;
    font-size: 0.9em;
    line-height: 1.4;
}

.matslang-switcher__item:hover,
.matslang-switcher__item.is-active {
    opacity: 1;
    font-weight: 600;
}

.matslang-switcher__item.is-active {
    pointer-events: none;
    background: #f5f5f5;
}

.matslang-switcher--notice {
    display: block;
    padding: 8px 12px;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    background: #fff8e5;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.4;
}

.matslang-switcher.wpml-ls,
.matslang-switcher .wpml-ls {
    padding: 0;
    border: 0;
}

.matslang-switcher.wpml-ls ul,
.matslang-switcher .wpml-ls ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.matslang-switcher.wpml-ls ul li,
.matslang-switcher .wpml-ls ul li {
    margin: 0;
    padding: 0;
}

.matslang-switcher .wpml-ls-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.matslang-switcher img.wpml-ls-flag {
    display: inline-block;
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.matslang-switcher .wpml-ls-flag-emoji {
    display: inline-flex;
    align-items: center;
    font-size: 1.15em;
    line-height: 1;
    flex-shrink: 0;
}

.mfn-language-switcher .matslang-switcher--notice {
    min-width: 220px;
}

.menu-item-matslang-switcher > .mfn-language-switcher,
.menu-item-matslang-switcher > .matslang-switcher {
    display: inline-flex;
    align-items: center;
}

.menu-item-matslang-switcher > a:not(.wpml-ls-link) {
    display: none;
}

.mfn-language-switcher-horizontal .matslang-switcher.wpml-ls ul,
.mfn-language-switcher-horizontal .matslang-switcher .wpml-ls ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.menu-item-matslang-switcher .mfn-language-switcher-horizontal .wpml-ls-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-item-matslang-switcher .mfn-language-switcher-horizontal img.wpml-ls-flag {
    width: 20px;
    height: 15px;
}
