.language-switcher {
    position: relative;
    color: var(--switcher-text);
    font-size: 13px;
}

.language-switcher summary,
.language-switcher-list a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: inherit;
}

.language-switcher summary {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background-color: var(--switcher-surface);
    cursor: pointer;
    list-style: none;
}

.language-switcher summary::-webkit-details-marker {
    display: none;
}

.language-switcher img {
    flex: none;
    object-fit: cover;
    border-radius: 2px;
}

.language-switcher-arrow {
    flex: none;
    margin-inline-start: auto;
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.language-switcher[open] .language-switcher-arrow {
    transform: translateY(2px) rotate(225deg);
}

.language-switcher-list {
    position: absolute;
    z-index: 301;
    inset-inline: 0;
    bottom: calc(100% + 6px);
    max-height: min(14rem, 40vh);
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--switcher-border);
    border-radius: 6px;
    background-color: var(--switcher-surface);
    list-style: none;
}

.language-switcher-list a {
    min-height: 38px;
    padding: 0 8px;
    border-radius: 4px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.language-switcher-list a:hover,
.language-switcher-list a[aria-current] {
    background-color: var(--switcher-selected);
}

.language-switcher :is(summary, a):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

@media (min-width: 751px) {
    .panel_YNo4x5Zi:has(.language-switcher) {
        display: flex;
        flex-direction: column;
        inset-block: 0;
        height: auto;
    }

    .panel_YNo4x5Zi .QzMSg4Ccards:has(> .language-switcher) {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
    }

    .QzMSg4Ccards:has(> .language-switcher) .DxVl4k-menu {
        margin-bottom: auto;
    }

    .panel_YNo4x5Zi .QzMSg4Ccards:has(> .language-switcher) .A6vREJr--auth {
        position: static;
        width: 100%;
        margin-block: 24px 12px;
    }
}

@media (max-width: 750px) {
    .panel_YNo4x5Zi .QzMSg4Ccards:has(> .language-switcher) {
        padding-bottom: 20px;
    }

    .language-switcher-list {
        position: static;
        max-height: none;
        margin-top: 6px;
    }
}
