/* Copyright (c) 2026 Smekker24 GmbH. Original work. */
.smekker-language-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.smekker-language-switcher__details {
    position: relative;
}

.smekker-language-switcher__button {
    box-sizing: border-box;
    display: inline-flex;
    min-block-size: 44px;
    min-inline-size: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--smekker-line, #d9e4e2);
    border-radius: 999px;
    padding-block: 8px;
    padding-inline: 12px;
    background: #fff;
    color: var(--smekker-teal-dark, #143f43);
    font: inherit;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

summary.smekker-language-switcher__button {
    cursor: pointer;
    list-style: none;
}

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

summary.smekker-language-switcher__button::after {
    content: '';
    inline-size: 7px;
    block-size: 7px;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.smekker-language-switcher__details[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
}

.smekker-language-switcher__button[aria-disabled='true'] {
    cursor: default;
}

.smekker-language-switcher__button:focus-visible,
.smekker-language-switcher__option:focus-visible {
    outline: 3px solid var(--smekker-teal, #1f817e);
    outline-offset: 3px;
}

.smekker-language-switcher__icon {
    inline-size: 20px;
    block-size: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.smekker-language-switcher__menu {
    position: absolute;
    z-index: 140;
    inset-block-start: calc(100% + 8px);
    inset-inline-end: 0;
    min-inline-size: 190px;
    max-block-size: min(70vh, 440px);
    overflow: auto;
    margin: 0;
    border: 1px solid var(--smekker-line, #d9e4e2);
    border-radius: 12px;
    padding: 6px;
    background: #fff;
    box-shadow: 0 18px 45px rgb(19 56 62 / 18%);
    list-style: none;
}

.smekker-language-switcher__menu li {
    margin: 0;
    padding: 0;
}

.smekker-language-switcher__option {
    box-sizing: border-box;
    display: block;
    inline-size: 100%;
    border-radius: 8px;
    padding-block: 10px;
    padding-inline: 12px;
    color: var(--smekker-teal-dark, #143f43);
    line-height: 1.25;
    text-align: start;
    text-decoration: none;
}

a.smekker-language-switcher__option:hover {
    background: #edf7f5;
}

.smekker-language-switcher__option.is-current {
    background: #e1f1ee;
    font-weight: 700;
}

@media (max-width: 720px) {
    .smekker-language-switcher__button {
        padding-inline: 10px;
    }

    .smekker-language-switcher__menu {
        position: fixed;
        inset-block-start: auto;
        inset-inline: 12px;
        inset-block-end: 12px;
        max-block-size: min(70vh, 520px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    summary.smekker-language-switcher__button::after {
        transition: transform 120ms ease;
    }
}
