/* ==========================================================================
   Stellar Translations - Language Switcher (Frontend)
   ========================================================================== */

@font-face {
    font-family: 'Twemoji Country Flags';
    unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F;
    src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
    font-display: swap;
}

/* --- Inline Switcher (PL | EN) --- */
.stellar-lang-switcher--inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: "Twemoji Country Flags", inherit, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.stellar-lang-switcher__link {
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    padding: 2px 4px;
}

.stellar-lang-switcher__link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.stellar-lang-switcher__link--active {
    opacity: 1;
    font-weight: 700;
    position: relative;
}

.stellar-lang-switcher__link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.stellar-lang-switcher__separator {
    opacity: 0.3;
    font-weight: 300;
    user-select: none;
}

/* --- Dropdown Switcher --- */
.stellar-lang-switcher--dropdown {
    position: relative;
    display: inline-block;
    font-size: 13px;
    font-family: "Twemoji Country Flags", inherit, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.stellar-lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.stellar-lang-switcher__toggle:hover {
    border-color: rgba(0, 0, 0, 0.24);
    background: rgba(0, 0, 0, 0.03);
}

.stellar-lang-switcher__arrow {
    transition: transform 0.2s ease;
}

.stellar-lang-switcher__toggle[aria-expanded="true"] .stellar-lang-switcher__arrow {
    transform: rotate(180deg);
}

.stellar-lang-switcher__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100%;
    list-style: none;
    margin: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.stellar-lang-switcher__item a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.stellar-lang-switcher__item a:hover {
    background: rgba(0, 0, 0, 0.04);
}

.stellar-lang-switcher__item--active a {
    font-weight: 700;
    color: #111;
}
