/**
 * Bokun Language Switcher CSS
 * Estilos para el selector de idioma
 */

/* =================================
   LANGUAGE SWITCHER
   ================================= */
.bokun-language-switcher {
    position: relative;
    display: inline-block;
}

.bokun-language-switcher .language-dropdown {
    position: relative;
}

.bokun-language-switcher .current-language {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
}

.bokun-language-switcher .current-language:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.bokun-language-switcher .current-language .flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

.bokun-language-switcher .current-language .flag.flag-es {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUwIiBoZWlnaHQ9IjUwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgIDxyZWN0IHdpZHRoPSI3NTAiIGhlaWdodD0iNTAwIi8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KICA8ZyBjbGlwLXBhdGg9InVybCgjYSkiPgogICAgPHBhdGggZmlsbD0iI2FhMTUxYiIgZD0iTTAgMGg3NTB2NTAwSDB6Ii8+CiAgICA8cGF0aCBmaWxsPSIjZmZkNzAwIiBkPSJNMCAxMjVoNzUwdjI1MEgweiIvPgogIDwvZz4KPC9zdmc+');
}

.bokun-language-switcher .current-language .flag.flag-en {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAxMjAwIDYwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgIDxyZWN0IHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjYwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj4KICAgIDxwYXRoIGZpbGw9IiMwMTIxNjkiIGQ9Ik0wIDBoMTIwMHY2MDBIMHoiLz4KICAgIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMTIwMHY0Nkgwem0wIDk2aDEyMDB2NDZIMHptMCA5NmgxMjAwdjQ2SDB6bTAgOTZoMTIwMHY0Nkgwem0wIDk2aDEyMDB2NDZIMHptMCA5NmgxMjAwdjQ2SDBaIi8+CiAgICA8cGF0aCBmaWxsPSIjMDEyMTY5IiBkPSJNMCAwaDQ4MHYzMDBIMHoiLz4KICA8L2c+Cjwvc3ZnPg==');
}

.bokun-language-switcher .current-language .arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.bokun-language-switcher.open .current-language .arrow {
    transform: rotate(180deg);
}

.bokun-language-switcher .language-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.bokun-language-switcher.open .language-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bokun-language-switcher .language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s ease;
}

.bokun-language-switcher .language-option:hover {
    background: #f5f5f5;
}

.bokun-language-switcher .language-option.active {
    background: #e3f2fd;
    color: #1976d2;
}

/* =================================
   RESPONSIVE
   ================================= */
@media (max-width: 768px) {
    .bokun-language-switcher .current-language {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .bokun-language-switcher .current-language .flag {
        width: 18px;
        height: 13px;
    }
    
    .bokun-language-switcher .language-option {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* =================================
   VARIANTES DE ESTILO
   ================================= */

/* Variante simple (solo banderas) */
.bokun-language-switcher.style-simple .current-language,
.bokun-language-switcher.style-simple .language-option {
    padding: 6px;
}

.bokun-language-switcher.style-simple .language-text {
    display: none;
}

.bokun-language-switcher.style-simple .current-language .flag,
.bokun-language-switcher.style-simple .language-option .flag {
    width: 24px;
    height: 18px;
}

/* Variante inline (sin dropdown) */
.bokun-language-switcher.style-inline {
    display: flex;
    gap: 5px;
}

.bokun-language-switcher.style-inline .language-dropdown {
    display: none;
}

.bokun-language-switcher.style-inline .language-inline {
    display: flex;
    gap: 5px;
}

.bokun-language-switcher.style-inline .language-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    background: #f5f5f5;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    transition: all 0.2s ease;
}

.bokun-language-switcher.style-inline .language-option:hover,
.bokun-language-switcher.style-inline .language-option.active {
    background: #3498db;
    color: white;
}

/* =================================
   INTEGRACIÓN CON TEMAS
   ================================= */

/* Para barras de navegación oscuras */
.bokun-language-switcher.dark-theme .current-language {
    background: #333;
    border-color: #555;
    color: #fff;
}

.bokun-language-switcher.dark-theme .current-language:hover {
    background: #444;
    border-color: #666;
}

.bokun-language-switcher.dark-theme .language-options {
    background: #333;
    border-color: #555;
}

.bokun-language-switcher.dark-theme .language-option {
    color: #fff;
}

.bokun-language-switcher.dark-theme .language-option:hover {
    background: #444;
}

.bokun-language-switcher.dark-theme .language-option.active {
    background: #1976d2;
    color: #fff;
}

/* =================================
   ESTADOS DE CARGA Y ERROR
   ================================= */
.bokun-language-switcher.loading .current-language {
    opacity: 0.6;
    pointer-events: none;
}

.bokun-language-switcher.error .current-language {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* =================================
   ANIMACIONES
   ================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bokun-language-switcher .language-options {
    animation: fadeIn 0.2s ease;
}