.nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
}

.hark-language-switch .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hark-language-switch {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    height: 44px;
    min-width: 70px;
    width: auto;
    max-width: calc(100vw - 24px);
    flex: 0 0 auto;
    align-self: center;
    padding: 0 28px 0 10px;
    border: 1px solid rgba(15, 67, 47, .2);
    border-radius: 14px;
    background: #fff;
    color: #0f432f;
    font: 800 .78rem/1 system-ui, sans-serif;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: .18s background, .18s border-color, .18s transform;
}

/* De server voegt deze variant als fallback onderaan <body> toe. De runtime
   verplaatst hem naar de publieke header; tot dat moment blijft hij compact. */
.hark-language-switch--auto {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 1000;
}

.hark-language-switch::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-68%) rotate(45deg);
    pointer-events: none;
}

.hark-language-switch:hover {
    background: #f2f7ec;
    border-color: rgba(15, 67, 47, .38);
    transform: translateY(-1px);
}

.hark-language-switch:focus-within {
    outline: 3px solid rgba(20, 63, 45, .22);
    outline-offset: 2px;
}

.hark-market-flag {
    position: relative;
    display: inline-block;
    flex: 0 0 21px;
    width: 21px;
    height: 15px;
    overflow: hidden;
    border: 1px solid rgba(15, 35, 27, .16);
    border-radius: 3px;
    background: #e8eee9;
    box-shadow: 0 1px 2px rgba(15, 35, 27, .12);
}

.hark-market-flag::before {
    content: "🌐";
    position: absolute;
    inset: -3px;
    display: grid;
    place-items: center;
    border: 0;
    background: #e8eee9;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 17px;
    line-height: 1;
}

.hark-market-flag--nl::before {
    content: "";
    inset: 0;
    background: linear-gradient(to bottom, #ae1c28 0 33.333%, #fff 33.333% 66.666%, #21468b 66.666% 100%);
}

.hark-market-code {
    letter-spacing: .06em;
}

.hark-language-switch select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
}

.hark-language-switch--navbar {
    height: 38px;
    min-width: 62px;
    border-radius: 12px;
    box-shadow: none;
}

.cms-navbar-language-item {
    min-width: max-content;
}

@media (max-width: 900px) {
    .nav-actions {
        margin-left: auto;
    }

    .hark-language-switch {
        height: 46px;
        min-width: 64px;
        border-radius: 14px;
    }

    .hark-market-code {
        font-size: .72rem;
    }
}

@media (max-width: 380px) {
    .hark-language-switch {
        min-width: 52px;
        padding-left: 8px;
        padding-right: 22px;
    }

    .hark-market-code {
        display: none;
    }

    .hark-language-switch::after {
        right: 9px;
    }
}
