.navbar__langs {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 0;
}

.maus-lang-switcher {
    flex-shrink: 0;
    color-scheme: light;
    position: relative;
}

.maus-lang-switcher.is-open {
    z-index: 10050;
}

.maus-lang-switcher__inner {
    position: relative;
    display: inline-block;
}

/* Panel stängd: tvinga dolt (undviker “fast” öppen lista) */
.maus-lang-switcher__panel {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    left: auto;
    min-width: 11rem;
    width: max-content;
    max-width: 18rem;
    margin: 0;
    padding: 0;
    background-color: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 0.35rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
    z-index: 10051;
}

.maus-lang-switcher.is-open .maus-lang-switcher__panel {
    display: block !important;
    visibility: visible;
    pointer-events: auto;
}

.maus-lang-switcher__panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 1rem;
    margin-right: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 7px solid #d8d8d8;
    pointer-events: none;
}

.maus-lang-switcher__panel::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 1rem;
    margin-right: -5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #fff;
    pointer-events: none;
}

.maus-lang-switcher__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.4rem 0.55rem;
    box-sizing: border-box;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    color: #1a1a1a;
    background-color: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.maus-lang-switcher__code--toggle {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    flex-shrink: 0;
}

.maus-lang-switcher__codes,
.maus-lang-switcher__sep,
.maus-lang-switcher__current-label {
    display: none;
}

.maus-lang-switcher__chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    margin-left: 0;
    margin-right: 0;
    color: inherit;
    opacity: 0.72;
    transition: opacity 0.2s ease;
}

.maus-lang-switcher__chevron-icon {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.maus-lang-switcher.is-open .maus-lang-switcher__chevron {
    opacity: 0.92;
}

.maus-lang-switcher.is-open .maus-lang-switcher__chevron-icon {
    transform: rotate(180deg);
}

.maus-lang-switcher__toggle:hover {
    border-color: #c0c0c0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.maus-lang-switcher__toggle:focus {
    outline: none;
}

.maus-lang-switcher__toggle:focus-visible {
    outline: 2px solid #2f6feb;
    outline-offset: 2px;
}

.maus-lang-switcher__list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}

.maus-lang-switcher__item {
    margin: 0;
    border-bottom: 1px solid #ececec;
}

.maus-lang-switcher__item:last-child {
    border-bottom: none;
}

.maus-lang-switcher__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    min-height: 2.55rem;
    padding: 0.45rem 0.85rem 0.45rem 0.75rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    color: #2c2c2c;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.maus-lang-switcher__link .maus-lang-switcher__code {
    flex-shrink: 0;
    min-width: 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
}

.maus-lang-switcher__link.is-current .maus-lang-switcher__code {
    font-weight: 700;
}

.maus-lang-switcher__link .maus-lang-switcher__flag,
.maus-lang-switcher__label {
    display: none;
}

.maus-lang-switcher__link:hover,
.maus-lang-switcher__link:focus {
    background-color: #f4f4f4;
    outline: none;
}

.maus-lang-switcher__link:focus-visible {
    outline: 2px solid #2f6feb;
    outline-offset: -2px;
}

.maus-lang-switcher__link.is-current {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.navbar:not(.navbar--scrolled) .maus-lang-switcher__toggle,
.navbar--scrolled .maus-lang-switcher__toggle {
    color: #1a1a1a;
    background-color: #fff;
    border-color: #d8d8d8;
}

.layout-dark .navbar:not(.navbar--scrolled) .maus-lang-switcher__toggle,
.layout-dark .navbar--scrolled .maus-lang-switcher__toggle {
    color: #1a1a1a;
    background-color: #fff;
    border-color: #d8d8d8;
}

.maus-logo-header .maus-lang-switcher {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    color-scheme: dark;
}

.maus-logo-header .maus-lang-switcher__toggle {
    color: #f0f0f0;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.maus-logo-header .maus-lang-switcher__toggle:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.maus-logo-header .maus-lang-switcher__toggle:focus-visible {
    outline-color: rgba(204, 0, 19, 0.9);
}

.maus-logo-header .maus-lang-switcher__chevron {
    opacity: 0.88;
}

.maus-logo-header .maus-lang-switcher__panel {
    background-color: #141414;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.maus-logo-header .maus-lang-switcher__panel::before {
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

.maus-logo-header .maus-lang-switcher__panel::after {
    border-bottom-color: #141414;
}

.maus-logo-header .maus-lang-switcher__item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.maus-logo-header .maus-lang-switcher__link {
    color: #ececec;
}

.maus-logo-header .maus-lang-switcher__link:hover,
.maus-logo-header .maus-lang-switcher__link:focus {
    background-color: rgba(255, 255, 255, 0.08);
}

.maus-logo-header .maus-lang-switcher__link:focus-visible {
    outline-color: rgba(204, 0, 19, 0.9);
}

.maus-logo-header .maus-lang-switcher__link.is-current {
    background-color: rgba(255, 255, 255, 0.12);
}

.navbar__mobile-menu .maus-lang-switcher {
    padding: 1.25rem 1.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0.5rem;
}

.navbar__mobile-menu .maus-lang-switcher__inner {
    width: 100%;
    max-width: 20rem;
}

.navbar__mobile-menu .maus-lang-switcher__toggle {
    width: auto;
    min-width: 0;
    min-height: 2.75rem;
    font-size: 0.9375rem;
    justify-content: center;
}

.navbar__mobile-menu .maus-lang-switcher__panel {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.navbar__mobile-menu .maus-lang-switcher__panel::before {
    right: auto;
    left: 1.55rem;
    margin-right: 0;
    margin-left: -6px;
}

.navbar__mobile-menu .maus-lang-switcher__panel::after {
    right: auto;
    left: 1.55rem;
    margin-right: 0;
    margin-left: -5px;
}

@media screen and (max-width: 992px) {
    .navbar__container .maus-lang-switcher--desktop {
        display: none;
    }
}

.maus-lang-switcher .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
    .maus-lang-switcher__toggle,
    .maus-lang-switcher__chevron,
    .maus-lang-switcher__chevron-icon,
    .maus-lang-switcher__link {
        transition: none;
    }
}
