/* Language switcher — compact segmented control; resets global `button` height from style.css */

/* Prevent logo distortion (keep intrinsic aspect ratio) */
.logo-wrapper img {
    width: 150px;
    height: auto;
}

.navbar .lang-switcher--nav {
    position: static;
    z-index: auto;
    display: inline-flex;
    flex-direction: row;
    flex-shrink: 0;
    align-self: center;
    align-items: center;
    padding: 0;
    border-radius: var(--border-radius, 3px);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: transparent;
}

.navbar:not(.nav-scroll) .lang-switcher--nav {
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-scroll .navbar .lang-switcher--nav {
    border-color: rgba(255, 255, 255, 0.22);
}

/* Cancel global `button { margin-bottom }` in navbar */
.navbar .lang-switcher--nav,
.navbar .lang-switcher--nav .lang-switcher__btn {
    margin-bottom: 0;
}

/* Match site .btn / .btn--stroke: Manrope, uppercase, 2px stroke via outer box; height NOT from --vspace-btn */
.lang-switcher .lang-switcher__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 0;
    min-width: 2.5rem;
    padding: 0.35rem 0.5rem;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-2, "Manrope", sans-serif);
    font-size: calc(var(--text-size) * 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lang-switcher__btn + .lang-switcher__btn {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.navbar:not(.nav-scroll) .lang-switcher__btn + .lang-switcher__btn {
    border-left-color: rgba(255, 255, 255, 0.32);
}

.nav-scroll .navbar .lang-switcher__btn + .lang-switcher__btn {
    border-left-color: rgba(255, 255, 255, 0.18);
}

.lang-switcher__btn:hover:not(.is-active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Active: navy to match header / nav brand — not theme orange */
.lang-switcher__btn.is-active {
    color: #fff;
    background: #081c4e;
}

.lang-switcher__btn:focus {
    outline: none;
}

.lang-switcher__btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .lang-switcher__btn {
        transition-duration: 0.01ms;
    }
}

/* Standalone (e.g. datenschutz, 404) — same chip styling */
body > .lang-switcher:not(.lang-switcher--nav) {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 20;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-radius: var(--border-radius, 3px);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.28);
    background: rgba(28, 28, 36, 0.92);
}

body > .lang-switcher:not(.lang-switcher--nav) .lang-switcher__btn + .lang-switcher__btn {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

body > .lang-switcher:not(.lang-switcher--nav) .lang-switcher__btn {
    margin-bottom: 0;
}

/* Detail cards: stretch children to full width and keep bullet + text on the same line */
.service-card--detail {
    align-items: stretch;
}

.service-card--detail .service-card-desc span {
    display: inline;
}

/* Mobile: DE/EN beside burger; collapsed nav full width below (Bootstrap navbar row + wrap) */
@media (max-width: 991px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar .navbar-collapse {
        flex-basis: 100%;
        width: 100%;
    }

    .navbar-mobile-toolbar {
        display: inline-flex;
        align-items: center;
        gap: 0.85rem;
    }

    .navbar-mobile-toolbar .lang-switcher--nav {
        margin-top: 0;
    }

    /*
     * Global `button` in style.css forces ~64px height on the burger; the lang chip is short,
     * so the icon sat high and the DE/EN block looked “below” it. Shrink the toggler to icon size.
     */
    .navbar .navbar-mobile-toolbar .navbar-toggler {
        height: auto !important;
        min-height: 0 !important;
        line-height: 1 !important;
        padding: 0.4rem 0.45rem !important;
        margin: 0 15px 0 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        background: transparent !important;
        font-size: 1.35rem;
        font-weight: 400;
        letter-spacing: normal;
        text-transform: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
    }

    /* Slightly larger tap targets + type in the top bar */
    .navbar-mobile-toolbar .lang-switcher__btn {
        min-width: 2.85rem;
        padding: 0.45rem 0.65rem;
        font-size: calc(var(--text-size) * 0.56);
    }

    /* Fixed corner switcher: sit a bit higher, match larger scale */
    body > .lang-switcher:not(.lang-switcher--nav) {
        bottom: calc(32px + env(safe-area-inset-bottom, 0px));
        right: 18px;
    }

    body > .lang-switcher:not(.lang-switcher--nav) .lang-switcher__btn {
        min-width: 2.85rem;
        padding: 0.45rem 0.65rem;
        font-size: calc(var(--text-size) * 0.56);
    }
}
