#ek-login-root {
    position: relative;
}

#ek-login-root .ek-language--login {
    position: absolute;
    z-index: 5;
    inset-block-start: clamp(12px, 2vw, 24px);
    inset-inline-end: clamp(12px, 2vw, 24px);
}

#ek-pro-header .ek-language {
    position: relative;
}

/* Keelemenüü ühine kujundus mõlemas PRO vaates. */
:is(#ek-login-root, #ek-pro-header) .ek-language {
    color: #fff;
}

:is(#ek-login-root, #ek-pro-header) .ek-language > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #eaeaea;
    border-radius: 5px;
    background: #141414;
    color: inherit;
    font: inherit;
    cursor: pointer;
    list-style: none;
}

:is(#ek-login-root, #ek-pro-header) .ek-language > summary::-webkit-details-marker {
    display: none;
}

:is(#ek-login-root, #ek-pro-header) .ek-language svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: butt;
    stroke-linejoin: miter;
}

:is(#ek-login-root, #ek-pro-header) .ek-language .ek-language__chevron {
    width: 14px;
    height: 14px;
}

:is(#ek-login-root, #ek-pro-header) .ek-language[open] .ek-language__chevron {
    transform: rotate(180deg);
}

:is(#ek-login-root, #ek-pro-header) .ek-language .ek-language__dropdown {
    position: absolute;
    inset-block-start: calc(100% + 5px);
    inset-inline-end: 0;
    width: auto;
    min-width: 128px;
    padding: 4px;
    border: 1px solid #eaeaea;
    border-radius: 5px;
    background: #141414;
    color: inherit;
    box-shadow: none;
}

:is(#ek-login-root, #ek-pro-header) .ek-language button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

:is(#ek-login-root, #ek-pro-header) .ek-language button:hover,
:is(#ek-login-root, #ek-pro-header) .ek-language button:focus-visible,
:is(#ek-login-root, #ek-pro-header) .ek-language button[aria-pressed="true"] {
    background: #ffdd00;
    color: #141414;
}

:is(#ek-login-root, #ek-pro-header) .ek-language :focus-visible {
    outline: 2px solid #ffdd00;
    outline-offset: 2px;
}
