.wp-block-polylang-language-switcher {
    list-style: none;
    max-height: 2.8rem;
    padding: 0;
    position: relative;
    z-index: 102;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--wp--preset--color--white);
    border-radius: 22px;
    border: 1px solid var(--wp--preset--color--vanilla);
}

footer .wp-block-polylang-language-switcher {
    background-color: var(--wp--preset--color--charcoal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column-reverse;
}

.wp-block-polylang-language-switcher:has(li:nth-child(1))::after {
    display: block;
    content: "";
    position: absolute;
    top: 15px;
    right: 12px;
    width: 12px;
    height: 12px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3.36865L6 8.63181L1 3.36865' stroke='%23BEE034' stroke-width='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3.36865L6 8.63181L1 3.36865' stroke='%23BEE034' stroke-width='2'/%3E%3C/svg%3E");
    background-color: var(--wp--preset--color--primary);
    transition: transform ease 200ms;
}

footer .wp-block-polylang-language-switcher::after {
    background-color: var(--wp--preset--color--chalk) !important;
}

.wp-block-polylang-language-switcher.is-active {
    overflow: visible;
    border-color: transparent;
}

.wp-block-polylang-language-switcher.is-active::after {
    transform: rotate(180deg);
}

.wp-block-polylang-language-switcher li a {
    padding: 8px 14px 8px 12px;
    transition: background-color ease 200ms;
    margin-inline: -1px;
}

.wp-block-polylang-language-switcher li a:hover {
    background-color: var(--wp--preset--color--vanilla) !important;
}

.wp-block-polylang-language-switcher:has(li:nth-child(1)) li a {
    padding: 8px 30px 8px 12px;
}

.wp-block-polylang-language-switcher li:not(.current-lang) a {
    /* padding-top: 0 !important; */
}

footer .wp-block-polylang-language-switcher li:not(.current-lang) a {
    padding-top: 8px !important;
    /* padding-bottom: 0 !important; */
}

.wp-block-polylang-language-switcher li.current-lang {
    order: -1;
    cursor: pointer;
}

.wp-block-polylang-language-switcher li.current-lang a {
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
    pointer-events: none;
    border: 0;
    margin-top: -1px;
    padding-block: 12px !important;
}

footer .wp-block-polylang-language-switcher li.current-lang a {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    margin-bottom: -1px;
    margin-top: 0;
}

.wp-block-polylang-language-switcher.is-active li.current-lang a {
    border-top: 1px solid var(--wp--preset--color--vanilla);
}

footer .wp-block-polylang-language-switcher.is-active li.current-lang a {
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-block-polylang-language-switcher.is-active li a {
    background: var(--wp--preset--color--white);
    transition: background-color ease 200ms;
    border-block: 0;
}

footer .wp-block-polylang-language-switcher.is-active li a {
    background: var(--wp--preset--color--charcoal);
}

.wp-block-polylang-language-switcher li:nth-last-of-type(1):not(.current-lang) a,
.wp-block-polylang-language-switcher li:has(+ .current-lang:nth-last-of-type(1)) a {
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border-bottom: 1px solid var(--wp--preset--color--vanilla);
}

footer .wp-block-polylang-language-switcher li:nth-last-of-type(1):not(.current-lang) a,
footer
    .wp-block-polylang-language-switcher
    li:has(+ .current-lang:nth-last-of-type(1)) {
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
}

footer .wp-block-polylang-language-switcher li:nth-last-of-type(1):not(.current-lang) a,
footer
    .wp-block-polylang-language-switcher
    li:has(+ .current-lang:nth-last-of-type(1)) {
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-block-polylang-language-switcher li a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wp-block-polylang-language-switcher li a img {
    width: 20px;
    height: 20px;
}

.wp-block-polylang-language-switcher li a span {
    margin: 0 !important;
    line-height: 1;
}

.lang-item-en-gb {
    display: none !important;
}

footer .lang-item-en img {
    filter: invert(1);
}
