#kc-locale-dropdown #kc-current-locale-link {
    display: flex;
    align-items: center;
    font-family: inherit;
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 400 !important;
    color: var(--theme-text-primary) !important;
    padding: 6px 8px !important;
    margin: 0;
    cursor: pointer;
    background-color: var(--theme-surface-primary);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    transition:
        border-color var(--theme-animation-quick),
        background-color var(--theme-animation-quick);
}

#kc-locale-dropdown #kc-current-locale-link:hover {
    border-color: var(--theme-border-hover);
}

/* The icon is a ligature, so until Material Symbols has loaded the browser
   lays out the literal text "keyboard_arrow_down". A fixed box the size of the
   glyph reserves the space up front and clips the placeholder, so the button
   keeps its width instead of collapsing once the font arrives. `overflow`
   also zeroes the flex item's automatic minimum size, which would otherwise
   hold the button open at the placeholder's min-content width. */
#kc-locale-dropdown #kc-current-locale-link::after {
    content: 'keyboard_arrow_down';
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    overflow: hidden;
    font-family: 'Material Symbols Rounded';
    font-size: 20px;
    line-height: 1;
    color: var(--theme-text-primary);
    margin-left: 12px;
}

/* The parent theme opens the menu on `#kc-locale-dropdown:hover ul`. The
   `:not()` keeps our specificity equal to that rule, and this file is loaded
   after login.css, so the menu only opens on click via kc-dropdown--open. */
#kc-locale-dropdown:not(.kc-dropdown--open) ul {
    display: none;
}

#kc-locale-dropdown.kc-dropdown--open ul {
    display: block;
}

#kc-locale ul {
    position: absolute;
    top: 15px;
    right: 0;
    box-shadow:
        0 8px 24px 0 rgb(0 0 0 / 12%),
        0 2px 6px 0 rgb(0 0 0 / 8%);
    border-radius: var(--theme-radius-sm);
    border: 0;
    padding: 8px 0;
    background-color: var(--theme-surface-primary);
    min-width: max-content;
    list-style-type: none;
}

#kc-locale ul li a {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--theme-text-primary) !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 16px;
    background-color: var(--theme-surface-primary);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: background-color var(--theme-animation-quick);
}

#kc-locale ul li a:hover {
    background-color: var(--theme-surface-primary-hover);
}
