/**
 * Estilos del Selector de Idioma (Frontend Switcher)
 * Mabel Tour Sevilla
 */

.mt-lang-switcher {
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    line-height: 1;
    font-size: 1rem;
    letter-spacing: 0.04em;
    user-select: none;
    -webkit-user-select: none;
}

.mt-lang-list {
    display: inline-flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.3em;
}

.mt-lang-item {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-flex;
}

.mt-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2em 0.3em;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    opacity: 0.72;
    transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    line-height: 0;
}

.mt-lang-link:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

/* Modo barra superior con fondo oscuro o texto claro */
.top-header-row .mt-lang-link:hover,
.site-header-row .mt-lang-link:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

/* Estado activo / idioma actual */
.mt-lang-item.is-current .mt-lang-link {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.top-header-row .mt-lang-item.is-current .mt-lang-link,
.site-header-row .mt-lang-item.is-current .mt-lang-link {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Bandera SVG */
.mt-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.mt-flag-icon {
    width: 1.1em;
    height: 0.75em;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    display: block;
    object-fit: cover;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    transform-origin: center center;
}

/* Efecto Hover: zoom fluido al 150% con elevación */
.mt-lang-link:hover .mt-flag-icon,
.mt-lang-link:focus-visible .mt-flag-icon,
.mt-lang-item.is-current .mt-flag-icon {
    transform: scale(1.5); /* Zoom fluido al 150% */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Código ISO (en caso de que show_codes esté activado) */
.mt-lang-code {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.3em;
}

/* Accesibilidad con teclado */
.mt-lang-link.mt-lse-link {
    line-height: 1;
}

.mt-lse-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    transform-origin: left center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mt-lse-link:hover .mt-lse-icon,
.mt-lse-link:focus-visible .mt-lse-icon,
.mt-lse-item.is-current .mt-lse-icon {
    transform: scale(1.5);
}

.mt-lse-hands {
    font-size: 1rem;
    line-height: 1;
}

.mt-lse-code {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mt-lang-link:focus-visible {
    outline: 2px solid #e0b557;
    outline-offset: 2px;
    opacity: 1;
}

/* Texto para lectores de pantalla */
.mt-lang-switcher .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Responsive móvil */
@media (max-width: 768px) {
    .mt-lang-list {
        gap: 0.3em;
    }
    .mt-lang-link {
        padding: 0.2em 0.3em;
    }
    .mt-flag-icon {
        width: 1.1em;
        height: 0.75em;
    }
}
