<?php $settings = $args; ?>
<div class="popup-search">
    <div class="popup-search-container">
        <span class="popup-search-close"></span>
        <div class="popup-search-form-wrap">
            <h5><?php echo (!empty($settings['popup_title']))? esc_html($settings['popup_title']) : esc_html__('Search the Site', 'newsfy'); ?></h5>
            <div class="popup-search-form">
                <form action="<?php echo esc_url(home_url('/')); ?>" method="get" class="rivax-search-form">
                    <input type="text" name="s" value="" class="search-field" placeholder="<?php echo (!empty($settings['placeholder_text']))? esc_attr($settings['placeholder_text']) : esc_attr__('Search ...', 'newsfy'); ?>" aria-label="Search" required>
                    <button type="submit" class="submit" aria-label="Submit">
                        <?php if(empty($settings) || $settings['submit_icon'] == 'yes'): ?><i class="ri-search"></i><?php endif; ?>
                        <?php if(!empty($settings['submit_title'])): ?><span class="title"><?php echo esc_html($settings['submit_title']); ?></span><?php endif; ?>
                    </button>
                </form>
            </div>
        </div>
	    <?php get_template_part("elementor/templates/search/popular-search", NULL, $settings); ?>
	    <?php get_template_part("elementor/templates/search/recent-posts", NULL, $settings); ?>
    </div>
</div>
