.tg-lang-switcher { position: relative; display: inline-block; }
.tg-lang-toggle {
    display: inline-flex; align-items: center; gap: 6px; padding: 0;
    background: transparent; border: 0; color: inherit; font: inherit; line-height: 1; cursor: pointer;
}
/* Colour follows the header state. Order matters (equal specificity): transparent header white, sticky (white bar) dark, primary top bar always white. */
.tg-transparent .tg-lang-toggle { color: var(--tg-common-white, #fff); }
.header-sticky .tg-lang-toggle { color: var(--tg-common-black, #1b1b1b); }
.tg-header-top .tg-lang-toggle { color: var(--tg-common-white, #fff); }
.tg-lang-toggle:focus-visible,
.tg-lang-menu a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.tg-lang-toggle svg { flex: 0 0 auto; }
.tg-lang-menu {
    position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 1001;
    min-width: 150px; margin: 0; padding: 6px 0; list-style: none;
    background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
/* Invisible bridge over the 8px gap so the menu stays open while the pointer travels from the toggle to it. */
.tg-lang-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.tg-lang-switcher:hover .tg-lang-menu,
.tg-lang-switcher:focus-within .tg-lang-menu { opacity: 1; visibility: visible; transform: none; }
.tg-lang-menu a { display: block; padding: 8px 16px; color: #1b1b1b; white-space: nowrap; text-decoration: none; }
.tg-lang-menu a:hover,
.tg-lang-menu .active a { color: var(--tg-theme-primary, #ba9160); }

.tg-lang-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tg-lang-list a {
    display: inline-block; padding: 4px 12px; border: 1px solid currentColor; border-radius: 20px;
    color: inherit; font-size: 14px; text-decoration: none;
}
.tg-lang-list .active a { background: var(--tg-theme-primary, #ba9160); border-color: var(--tg-theme-primary, #ba9160); color: #fff; }
.tgmobile__menu-box .tg-lang-list { padding: 0 20px; margin: 20px 0; }
