/* Sprachwahl und Popup „Sprache übernehmen?“ (KS-2026-067, Bilder 1a, 1c, 2; Aldin E22).
   Stilvertrag wie Hilfe-Menü/Glocke: Schwebendes mit --vl-shadow-float, Karten 8 px, Knöpfe 6 px,
   kein blauer Schein, Dialog ohne Schleier, Abbrechen links, Knopffarbe wie Kontoseiten (--im-vx-button*). */

.im-lang__form {
    display: contents;
}

.im-lang__trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.im-lang__menu button {
    gap: 10px;
}

.im-lang__menu button strong,
.im-lang-row button strong {
    min-width: 22px;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .04em;
}

/* Am Handy wohnt die Sprachwahl im ☰-Menü bzw. im Profilmenü (Bild 1c), nicht oben in der Leiste. */
@media (max-width: 900px) {
    .vuexy-lab .vuexy-lab__portal-nav .vuexy-lab__portal-nav-actions > .im-lang {
        display: none;
    }

    /* vuexy-lab.css blendet die Gastknöpfe über das deutsche aria-label „Account Aktionen“ aus; übersetzt greift das
       nicht mehr. Dieser feste Haken übernimmt das für jede Fremdsprache (vuexy-lab.css bleibt unverändert). */
    :is(.vuexy-lab--public, .vuexy-lab--auth) .vuexy-lab__portal-nav .vuexy-lab__portal-auth-actions[data-portal-guest-actions] {
        display: none;
    }
}

.im-lang-row {
    display: grid;
    gap: 8px;
    padding: 6px 12px 8px;
}

.im-lang-row > span {
    color: var(--vl-muted);
    font-size: .8125rem;
    font-weight: 600;
}

.im-lang-row__options {
    display: grid;
    grid-template-columns: repeat(var(--im-lang-count, 2), minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--vl-border);
    border-radius: 6px;
}

.vuexy-lab .vuexy-lab__portal-nav .im-lang-row .im-lang__form .im-lang__choice,
.topmenu .im-lang-row .im-lang__form .im-lang__choice {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-right: 1px solid var(--vl-border);
    border-radius: 0;
    background: var(--vl-surface);
    box-shadow: none;
    color: var(--vl-text);
    cursor: pointer;
    font: inherit;
    font-size: .9375rem;
    font-weight: 500;
    padding: 0 6px;
}

.vuexy-lab .vuexy-lab__portal-nav .im-lang-row .im-lang__form:last-child .im-lang__choice,
.topmenu .im-lang-row .im-lang__form:last-child .im-lang__choice {
    border-right: 0;
}

.vuexy-lab .vuexy-lab__portal-nav .im-lang-row .im-lang__form .im-lang__choice.is-active,
.topmenu .im-lang-row .im-lang__form .im-lang__choice.is-active {
    background: color-mix(in srgb, var(--vl-primary, #0e74de) 10%, transparent);
    color: var(--vl-primary, #0e74de);
}

.im-lang-pop {
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 28px 28px 0;
    border: 1px solid var(--vl-border, #d2e2f5);
    border-radius: 8px;
    background: var(--vl-surface, #fff);
    color: var(--vl-heading, var(--vl-text, #0b1730));
    box-shadow: var(--vl-shadow-float, 0 12px 30px -18px rgba(11, 23, 48, .45));
}

.im-lang-pop::backdrop {
    background: transparent;
}

html body dialog.im-lang-pop .im-lang-pop__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--vl-border, #d2e2f5);
    border-radius: 50%;
    background: var(--vl-surface, #fff);
    color: var(--vl-text, #0b1730);
    cursor: pointer;
    padding: 0;
}

html body dialog.im-lang-pop .im-lang-pop__close svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

html body dialog.im-lang-pop .im-lang-pop__title {
    color: inherit;
    margin: 0 36px 10px 0;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.3;
}

html body dialog.im-lang-pop .im-lang-pop__body {
    color: inherit;
    font-size: 1rem;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* P05 (E74): Option „auch für Social-Beiträge“ – Haken wie im Profil, Text in Seitenfarbe. */
html body dialog.im-lang-pop .im-lang-pop__social {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -8px 0 22px;
    cursor: pointer;
}

html body dialog.im-lang-pop .im-lang-pop__social[hidden] {
    display: none;
}

html body dialog.im-lang-pop .im-lang-pop__social .form-check-label {
    display: grid;
    gap: 2px;
    color: inherit;
    line-height: 1.45;
}

html body dialog.im-lang-pop .im-lang-pop__social small {
    color: inherit;
    font-size: .875rem;
    opacity: .85;
}

html body dialog.im-lang-pop .im-lang-pop__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -28px;
    padding: 16px 28px;
    border-top: 1px solid var(--vl-border, #d2e2f5);
}

html body dialog.im-lang-pop .im-lang-pop__cancel {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

html body dialog.im-lang-pop .im-lang-pop__apply {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: var(--im-vx-button-height, 40px);
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    background: var(--im-vx-button, #0e74de);
    color: var(--im-vx-button-fg, #fff);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

html body dialog.im-lang-pop .im-lang-pop__apply:hover {
    background: var(--im-vx-button-hover, #0b5fb8);
}

html body dialog.im-lang-pop .im-lang-pop__apply:disabled {
    cursor: progress;
    opacity: .6;
}

.im-lang-toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    max-width: min(520px, calc(100% - 32px));
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--vl-border, #d2e2f5);
    border-radius: 8px;
    background: var(--vl-surface, #fff);
    box-shadow: var(--vl-shadow-float, 0 12px 30px -18px rgba(11, 23, 48, .45));
    color: var(--vl-text, #0b1730);
    font-weight: 500;
    transform: translateX(-50%);
}

.im-lang-toast[hidden] {
    display: none;
}
