.language-picker {
    position: relative;
    color: #342129;
    flex: 0 0 auto;
}

.language-picker > summary,
.language-picker-close {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid #e5dcde;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 650;
    color: inherit;
    cursor: pointer;
    list-style: none;
}

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

.language-picker-panel {
    position: absolute;
    z-index: 1;
    inset: calc(100% + 8px) 0 auto auto;
    width: min(230px, 85vw);
    padding: 5px;
    border: 1px solid #e5dcde;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 25px #22151c23;
}

.language-picker-heading,
.language-picker-panel a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
}

.language-picker-heading {
    font-size: .85rem;
    color: #62595e;
}

.language-picker-close {
    display: none;
}

.language-picker-panel a {
    min-height: 44px;
    color: #342129;
    border-radius: 7px;
}

.language-picker > summary:hover,
.language-picker-panel a:hover,
.language-picker-panel [aria-current] {
    background: #faedf0;
    color: #7b1628;
}

.auth-panel .language-picker {
    width: fit-content;
    margin: 0 0 20px auto;
}

@media (max-width: 980px) {
    .language-picker[open] > summary::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 23;
        background: #22151c85;
    }

    .language-picker-panel {
        position: fixed;
        inset: auto 0 0;
        width: auto;
        padding: 7px 15px calc(12px + env(safe-area-inset-bottom, 0px));
        border-radius: 17px 17px 0 0;
        z-index: 24;
    }

    .language-picker-close {
        display: inline-flex;
        min-width: 44px;
        font-size: 1.35rem;
    }

    .content-topbar:has(.language-picker[open]) {
        z-index: 32;
    }

    .auth-panel .language-picker[open] {
        z-index: 32;
    }

    .admin-workspace .content-topbar:has(.language-picker) .admin-jump-trigger kbd {
        display: none;
    }
}
