.lh-lang-switcher {
    position: relative;
    z-index: 100060;
    font-size: 0.8125rem;
}

.lh-lang-switcher > summary {
    list-style: none;
    cursor: pointer;
}

.lh-lang-switcher > summary::-webkit-details-marker {
    display: none;
}

.lh-lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.55);
    color: inherit;
    cursor: pointer;
    line-height: 1.2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lh-lang-switcher-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(30, 41, 59, 0.75);
}

.lh-lang-flag {
    font-size: 1.05rem;
    line-height: 1;
}

.lh-lang-code {
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    opacity: 0.9;
}

.lh-lang-chevron {
    font-size: 0.65rem;
    opacity: 0.65;
}

.lh-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 11.5rem;
    padding: 0.35rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lh-lang-switcher:not([open]) .lh-lang-menu {
    display: none;
}

.lh-lang-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
}

.lh-lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lh-lang-option.is-active {
    background: rgba(99, 102, 241, 0.22);
}

.lh-lang-label {
    flex: 1;
}

/* Barra fissa (profilo / pagine senza nav) */
.lh-lang-switcher--fixed {
    position: fixed;
    top: calc(0.65rem + env(safe-area-inset-top, 0px));
    left: calc(0.65rem + env(safe-area-inset-left, 0px));
    z-index: 100020;
}

.lh-theme-light .lh-lang-switcher-btn,
body.lh-landing .lh-lang-switcher-btn {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
}

.lh-theme-light .lh-lang-menu,
body.lh-landing .lh-lang-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

.lh-theme-light .lh-lang-option,
body.lh-landing .lh-lang-option {
    color: #0f172a;
}

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

html[dir='rtl'] .lh-lang-switcher--fixed {
    left: auto;
    right: calc(0.65rem + env(safe-area-inset-right, 0px));
}

.lh-acc-mobile-bar {
    gap: 0.35rem;
}

.lh-acc-mobile-lang {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.lh-acc-mobile-lang .lh-lang-switcher-btn {
    padding: 0.3rem 0.45rem;
}

.lh-acc-sidebar-lang {
    margin-top: 0.65rem;
}

.lh-landing-nav-links,
.lh-pub-nav-links,
.lh-promo-header-right,
.lh-blog-topbar-actions {
    align-items: center;
}

.lh-landing-nav-links .lh-lang-switcher,
.lh-pub-nav-links .lh-lang-switcher,
.lh-promo-header-right .lh-lang-switcher {
    pointer-events: auto;
    position: relative;
}
