.cr-mobile-language-slot {
    display: none;
}

.cr-desktop-language-slot {
    display: inline-flex;
    align-items: center;
    position: relative;
    flex: 0 0 auto;
    overflow: visible !important;
    z-index: 250;
}

.cr-topbar,
.cr-nav {
    overflow: visible !important;
}

.cr-public-language {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    z-index: 260;
}

.cr-public-language-btn {
    height: 42px;
    min-width: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid rgba(34, 26, 22, .14);
    border-radius: 999px;
    background: #fff;
    color: #1f1a17;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(31, 26, 23, .08);
    cursor: pointer;
    white-space: nowrap;
}

.cr-public-language.is-compact .cr-public-language-btn {
    min-width: 64px;
    height: 38px;
    padding: 0 12px;
}

.cr-public-language-menu {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    width: 230px !important;
    min-width: 230px !important;
    max-width: calc(100vw - 24px) !important;
    padding: 10px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(31, 26, 23, .18);
    border: 1px solid rgba(34, 26, 22, .08);
    z-index: 99999 !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
}

.cr-public-language-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid rgba(34, 26, 22, .08);
    border-top: 1px solid rgba(34, 26, 22, .08);
    transform: rotate(45deg);
}

.cr-public-language-menu button {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    border: 0 !important;
    background: transparent;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 18px !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
    border-radius: 16px;
    font-weight: 950;
    color: #1f1a17;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
    flex: 0 0 auto !important;
}

.cr-public-language-menu button span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr-public-language-menu button.active,
.cr-public-language-menu button:hover {
    background: #fff0e6;
    color: #c45116;
}

.cr-public-language-code {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff0e6;
    color: #d85b1a;
    font-weight: 950;
    flex: 0 0 auto;
}

@media (max-width: 820px) {
    .cr-topbar {
        gap: 8px;
    }

    .cr-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cr-mobile-language-slot {
        display: inline-flex;
        align-items: center;
        position: relative;
        margin-left: auto;
        z-index: 300;
        overflow: visible !important;
    }

    .cr-desktop-language-slot {
        display: none !important;
    }

    .cr-mobile-language-slot .cr-public-language-menu {
        top: calc(100% + 12px) !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 196px !important;
        min-width: 196px !important;
        max-width: calc(100vw - 24px) !important;
    }

    .cr-mobile-language-slot .cr-public-language-menu::before {
        right: auto;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
}
