/**
 * Estilos del Selector de Idiomas
 * Diseño minimalista y profesional que encaja con el header
 */

/* Contenedor del selector */
.lang-selector-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

/* Botón del selector */
.lang-selector-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.lang-selector-btn .lang-flag {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
}

.lang-selector-btn .lang-code {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: none; /* Ocultar código, solo bandera */
}

.lang-selector-btn .lang-arrow {
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.lang-selector-btn:hover .lang-arrow {
    opacity: 1;
}

/* Menú desplegable */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Opciones de idioma */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #f8fafc;
    padding-left: 20px;
}

.lang-option .lang-flag {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
}

.lang-option .lang-name {
    font-size: 14px;
    font-weight: 500;
}

/* Responsive - Móvil */
@media (max-width: 768px) {
    .lang-selector-wrapper {
        margin-right: 8px;
    }
    
    .lang-selector-btn {
        padding: 6px 10px;
    }
    
    .lang-selector-btn .lang-flag {
        font-size: 22px;
    }
    
    .lang-dropdown-menu {
        right: -10px;
        min-width: 160px;
    }
}

/* Añadir selector al menú móvil */
.mobile-lang-selector {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #f8fafc;
}

.mobile-lang-selector-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-lang-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mobile-lang-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: white;
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-lang-option:hover,
.mobile-lang-option.active {
    border-color: #6366f1;
    background: #f1f5f9;
}

.mobile-lang-option .lang-flag {
    font-size: 24px;
}

.mobile-lang-option .lang-code {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.mobile-lang-option.active .lang-code {
    color: #6366f1;
}
