.sc-language-switcher {
    align-items: center;
    display: inline-flex;
    max-width: 100%;
    position: relative;
}

.sc-language-switcher__label {
    color: #3f4652;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-right: 8px;
}

.sc-language-switcher__dropdown {
    position: relative;
}

.sc-language-switcher__dropdown[open] {
    z-index: 10000;
}

.sc-language-switcher__button {
    align-items: center;
    background: #fff;
    border: 1px solid #d5dbe3;
    border-radius: 999px;
    color: #243043;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    list-style: none;
    min-height: 34px;
    min-width: 34px;
    padding: 7px;
    user-select: none;
    white-space: nowrap;
}

.sc-language-switcher__button::-webkit-details-marker {
    display: none;
}

.sc-language-switcher__button:focus {
    outline: 2px solid rgba(31, 111, 235, .35);
    outline-offset: 2px;
}

.sc-language-switcher__flag {
    font-size: 16px;
    line-height: 1;
}

.sc-language-switcher__menu {
    background: #fff;
    border: 1px solid #d5dbe3;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
    display: grid;
    gap: 2px;
    min-width: 190px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
}

.sc-language-switcher__option {
    align-items: center;
    border-radius: 6px;
    color: #243043;
    display: grid;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    grid-template-columns: 22px 1fr auto;
    line-height: 1.2;
    min-height: 38px;
    padding: 8px 10px;
    text-decoration: none;
}

.sc-language-switcher__option:focus,
.sc-language-switcher__option:hover {
    background: #eef3f8;
    color: #1f2733;
    text-decoration: none;
}

.sc-language-switcher__option.is-active {
    background: #e8f1ff;
    color: #1f6feb;
}

.sc-language-switcher__short {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.sc-language-switcher__name {
    white-space: nowrap;
}

.sc-language-switcher-top-bar {
    align-items: center;
    display: inline-flex;
    margin: 0 4px;
}

.top-app-bar .sc-language-switcher__button {
    background: transparent;
    border-color: transparent;
    border-radius: 50%;
    color: var(--md-sys-color-on-primary, #fff);
    height: 40px;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    width: 40px;
}

.top-app-bar .sc-language-switcher__button:focus,
.top-app-bar .sc-language-switcher__button:hover {
    background: rgba(255, 255, 255, .14);
    outline: none;
}

.top-app-bar .sc-language-switcher__button:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
}

.top-app-bar .sc-language-switcher__button .sc-language-switcher__flag {
    font-size: 20px;
}

.top-app-bar .sc-language-switcher__menu {
    max-height: calc(100vh - var(--sc-language-menu-top, 72px) - 12px);
    overflow: auto;
    position: fixed;
    right: var(--sc-language-menu-right, 12px);
    top: var(--sc-language-menu-top, 72px);
    z-index: 2147483000;
}

.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option,
.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option:visited {
    color: #243043;
}

.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option:focus,
.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option:hover {
    color: #1f2733;
}

.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option.is-active,
.top-app-bar .sc-language-switcher__menu .sc-language-switcher__option.is-active:visited {
    color: #1f6feb;
}

@media (max-width: 599px) {
    .sc-language-switcher-top-bar {
        margin: 0;
    }

    .sc-language-switcher-top-bar .sc-language-switcher__button {
        height: 36px;
        min-height: 36px;
        min-width: 36px;
        width: 36px;
    }
}
