.lang-switch {
    position: relative;
    display: inline-block;
}

.lang-switch .lang-switch__btn {
    height: 39px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.lang-switch .lang-switch__btn img {
    width: 30px;
    height: 20px;
    max-width: none;
    object-fit: cover;
    border-radius: 3px;
}
.lang-switch .lang-switch__btn .fa-angle-down {
    transition: transform .25s ease;
}

/* ---------- BOX MENÙ ---------- */
.lang-switch .lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    z-index: 1050;
    width: max-content !important;
    min-width: 160px;
    margin: 0 !important;
    padding: 6px !important;
    list-style: none !important;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    text-align: left !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    display: block;
}

/* ponte invisibile per non perdere l'hover */
.lang-switch .lang-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

/* freccetta, centrata sotto la chevron */
.lang-switch .lang-menu::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}

/* ---------- VOCI ---------- */
.lang-switch .lang-menu li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    list-style: none !important;
}

.lang-switch .lang-menu li a {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: nowrap;
    color: #222 !important;
    text-decoration: none !important;
    background: transparent;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

/* elimina eventuali effetti del tema sui link (underline, frecce, ecc.) */
.lang-switch .lang-menu li a::before,
.lang-switch .lang-menu li a::after {
    content: none !important;
    display: none !important;
}

.lang-switch .lang-menu li a:hover,
.lang-switch .lang-menu li a:focus-visible {
    background: #fff3e0;
    color: #e8941a !important;
}
.lang-switch .lang-menu li a[aria-current="true"] {
    background: #f5f5f5;
    font-weight: 700;
}

.lang-switch .lang-menu li a img {
    flex: 0 0 24px;
    width: 24px !important;
    height: 16px !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
}

/* ---------- APERTURA ---------- */
.lang-switch.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-switch.is-open .fa-angle-down {
    transform: rotate(180deg);
}

@media (hover: hover) {
    .lang-switch:hover .lang-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .lang-switch:hover .fa-angle-down {
        transform: rotate(180deg);
    }
}