.tlj-language-switcher {
    --tlj-i18n-accent: #5ce3de;
    --tlj-i18n-bg: #050708;
    --tlj-i18n-bg-soft: rgba(92, 227, 222, .10);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(92, 227, 222, .38);
    border-radius: 12px;
    background: rgba(5, 7, 8, .92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.tlj-language-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 52px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #d9e6e6;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .04em;
    text-decoration: none !important;
    touch-action: manipulation;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.tlj-language-switcher__item:hover,
.tlj-language-switcher__item:focus-visible {
    color: #ffffff;
    background: rgba(92, 227, 222, .12);
    border-color: rgba(92, 227, 222, .55);
    outline: none;
}

.tlj-language-switcher__item.is-active {
    color: var(--tlj-i18n-accent);
    background: var(--tlj-i18n-bg-soft);
    border-color: var(--tlj-i18n-accent);
    box-shadow: inset 0 0 0 1px rgba(92, 227, 222, .08);
}

.tlj-language-switcher__flag {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 640px) {
    .tlj-language-switcher {
        gap: 4px;
        padding: 3px;
    }

    .tlj-language-switcher__item {
        min-width: 46px;
        min-height: 44px;
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* Selector ES | EN insertado automáticamente en la cabecera de Astra. */
.tlj-header-language-slot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
}

.tlj-header-language-switcher {
    --tlj-i18n-accent: #5ce3de;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    white-space: nowrap;
    line-height: 1;
}

.tlj-header-language-switcher__item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px;
    min-width: 44px;
    margin: 0 !important;
    padding: 5px 3px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #d8e1e1 !important;
    font: inherit;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: .06em;
    text-decoration: none !important;
    touch-action: manipulation;
    transition: color .18s ease, text-shadow .18s ease;
}

.tlj-header-language-switcher__item:hover,
.tlj-header-language-switcher__item:focus-visible {
    color: #ffffff !important;
    background: transparent !important;
    text-decoration: none !important;
    outline: none;
    text-shadow: 0 0 12px rgba(92, 227, 222, .32);
}

.tlj-header-language-switcher__item.is-active {
    filter: drop-shadow(0 0 3px var(--tlj-i18n-accent));
}

.tlj-header-language-switcher__separator {
    color: rgba(92, 227, 222, .72) !important;
    font-size: 12px;
    line-height: 1;
    user-select: none;
}

/* Escritorio: extremo derecho real de la barra y centrado en la misma fila. */
@media (min-width: 922px) {
    .tlj-i18n-header-anchor > .tlj-header-language-slot--desktop,
    .tlj-i18n-header-anchor > .tlj-header-language-slot--fallback {
        position: absolute !important;
        top: 50% !important;
        right: 18px !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        transform: translateY(-50%) !important;
    }
}

/* Móvil: a la derecha dentro de la barra, sin tapar el botón hamburguesa. */
@media (max-width: 921px) {
    .tlj-i18n-header-anchor > .tlj-header-language-slot--mobile,
    .tlj-i18n-header-anchor > .tlj-header-language-slot--fallback {
        position: absolute !important;
        top: 50% !important;
        right: 58px !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        transform: translateY(-50%) !important;
    }

    .tlj-header-language-switcher {
        gap: 5px;
    }

    .tlj-header-language-switcher__item {
        min-height: 44px;
        min-width: 44px;
        padding: 6px 6px !important;
        font-size: 11px !important;
    }
}


/* 1.5.7 - objetivo tactil movil robusto para Lighthouse. */
@media (max-width: 921px) {
    .tlj-i18n-header-anchor > .tlj-header-language-slot--mobile,
    .tlj-i18n-header-anchor > .tlj-header-language-slot--fallback {
        right: 66px !important;
    }

    .tlj-header-language-switcher {
        gap: 7px !important;
    }

    .tlj-header-language-switcher__item {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        flex: 0 0 48px !important;
        box-sizing: border-box !important;
    }
}
