( function( api ) {

	// Extends our custom "modern-blogger" section.
	api.sectionConstructor['modern-blogger'] = api.Section.extend( {

		// No events for this type of section.
		attachEvents: function () {},

		// Always make the section active.
		isContextuallyActive: function () {
			return true;
		}
	} );

	(function ($) {
	    $(document).ready(function ($) {
	        $('input[data-input-type]').on('input change', function () {
	            var val = $(this).val();
	            $(this).prev('.cs-range-value').html(val);
	            $(this).val(val);
	        });
	    })
	})(jQuery);

	jQuery(document).ready(function($) {
	    $('body').on('click', '.icon-list li', function(){
	        var icon_class = $(this).find('i').attr('class');
	        $(this).addClass('icon-active').siblings().removeClass('icon-active');
	        $(this).parent('.icon-list').prev('.selected-icon').children('i').attr('class','').addClass(icon_class);
	        $(this).parent('.icon-list').next('input').val(icon_class).trigger('change');
	    });

	    $('body').on('click', '.selected-icon', function(){
	        $(this).next().slideToggle();
	    });

	    $(".socialInput").on("keyup", function() {
	        var value = $(this).val().toLowerCase();
	        $(".icon-list li").filter(function() {
	          $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
	        });
	    });
	});

} )( wp.customize );

/* Reset Settings */
#customize-control-modern_blogger_reset_demo_import_settings, #customize-control-modern_blogger_reset_color {
  display: flex;
  flex-direction: row-reverse;
  justify-content: start;
  align-items: center;
  gap: 10px; 
}
#customize-control-modern_blogger_reset_demo_import_settings label, #customize-control-modern_blogger_reset_color label {
  font-size: 16px;
  color: #0073aa;
  display: block;
  line-height: 1.75;
  font-weight: 500;
  margin-bottom: 4px;
}
#customize-control-modern_blogger_reset_demo_import_settings input, #customize-control-modern_blogger_reset_color input{
  margin: 0px;
  padding: 5px;
  height: 15px;
}