<?php
/**
 * WP Grid Builder theme styles integration.
 *
 * @package BricksExtras
 */

namespace BricksExtras;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( class_exists( 'WPGridBuilderStyler' ) ) {
	return;
}

/**
 * WP Grid Builder styler class.
 */
class WPGridBuilderStyler {

	/**
	 * Initialize WP Grid Builder theme styles.
	 */
	public static function init() {

			add_filter( 'bricks/elements/wpgb-facet/control_groups', array( __CLASS__, 'wpgb_facet_group' ) );
			add_filter( 'bricks/elements/wpgb-facet/controls', array( __CLASS__, 'wpgb_facet_controls' ) );

			add_filter( 'bricks/theme_styles/control_groups', array( __CLASS__, 'wpgb_theme_facet_group' ) );
			add_filter( 'bricks/theme_styles/controls', array( __CLASS__, 'wpgb_theme_facet_controls' ) );
	}

	/**
	 * Add WPGB facet control group to theme styles.
	 *
	 * @param array $control_groups Control groups.
	 * @return array Modified control groups.
	 */
	public static function wpgb_theme_facet_group( $control_groups ) {

		$control_groups['x_wpgb_facet_theme'] = array(
			'title' => esc_html__( 'WPGB Facets', 'bricksextras' ),
		);

		return $control_groups;
	}

	/**
	 * Add WPGB facet controls to theme styles.
	 *
	 * @param array $controls Controls array.
	 * @return array Modified controls.
	 */
	public static function wpgb_theme_facet_controls( $controls ) {

		$facet_controls = array();

		$accent_color_selectors = array(
			'body .flatpickr-day.endRange',
			'body .flatpickr-day.endRange.inRange',
			'body .flatpickr-day.endRange.nextMonthDay',
			'body .flatpickr-day.endRange.prevMonthDay',
			'body .flatpickr-day.endRange:focus',
			'body .flatpickr-day.endRange:hover',
			'body .flatpickr-day.selected',
			'body .flatpickr-day.selected.inRange',
			'body .flatpickr-day.selected.nextMonthDay',
			'body .flatpickr-day.selected.prevMonthDay',
			'body .flatpickr-day.selected:focus',
			'body .flatpickr-day.selected:hover',
			'body .flatpickr-day.startRange',
			'body .flatpickr-day.startRange.inRange',
			'body .flatpickr-day.startRange.nextMonthDay',
			'body .flatpickr-day.startRange.prevMonthDay',
			'body .flatpickr-day.startRange:focus',
			'body .flatpickr-day.startRange:hover',
		);

		$accent_color_rules = array_merge( \BricksExtras\Helpers::do_css_rules( 'background-color', $accent_color_selectors, true ), \BricksExtras\Helpers::do_css_rules( 'border-color', $accent_color_selectors, true ) );

		$select_drop_down_rule = array(
			array(
				'property' => 'background-color',
				'selector' => '.wpgb-select-dropdown ul li[aria-selected="true"]',
			),
		);

		$facet_controls['x_wpgb_facet_theme'] = array(

			'x_wpgb_facet_accent_color'               => array(
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Color', 'bricks' ) . ' (' . esc_html__( 'Accent', 'bricks' ) . ')',
				'type'  => 'color',
				'css'   => array_merge( $accent_color_rules, $select_drop_down_rule ),
			),

			'x_wpgb_facet_select_dropdown_sep'        => array(
				'type'  => 'separator',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Select dropdown', 'bricksextras' ),
			),

			'x_wpgb_facet_select_dropdown_border'     => array(
				'type'  => 'border',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Dropdown border', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'border',
						'selector' => 'body .wpgb-select-dropdown',
					),
					array(
						'property' => 'border',
						'selector' => 'body .acplt-menu',
					),
				),
			),

			'x_wpgb_facet_select_dropdown_box_shadow' => array(
				'type'  => 'box-shadow',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Dropdown box shadow', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'box-shadow',
						'selector' => 'body .wpgb-select-dropdown',
					),
					array(
						'property' => 'box-shadow',
						'selector' => 'body .acplt-menu',
					),
				),
			),

			'x_wpgb_facet_select_bg'                  => array(
				'type'  => 'color',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List background', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => 'body .wpgb-select-dropdown ul li',
					),
					array(
						'property' => 'background-color',
						'selector' => 'body .acplt-menu .acplt-item',
					),
				),
			),

			'x_wpgb_facet_select_font'                => array(
				'type'  => 'typography',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List typography', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => 'body .wpgb-select-dropdown ul li',
					),
					array(
						'property' => 'font',
						'selector' => 'body .acplt-menu .acplt-item',
					),
				),
			),

			'x_wpgb_facet_select_focused_bg'          => array(
				'type'  => 'color',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List background (focused)', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => 'body .wpgb-select-dropdown ul li.wpgb-focused',
					),
					array(
						'property' => 'background-color',
						'selector' => 'body .acplt-menu .acplt-item.wpgb-focused',
					),
				),
			),

			'x_wpgb_facet_select_font_focused'        => array(
				'type'  => 'typography',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List typography (focused)', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => 'body .wpgb-select-dropdown ul li.wpgb-focused',
					),
					array(
						'property' => 'font',
						'selector' => 'body .acplt-menu .acplt-item.wpgb-focused',
					),
				),
			),

			'x_wpgb_facet_select_bg_selected'         => array(
				'type'  => 'color',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List background (selected)', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => 'body .wpgb-select-dropdown ul li[aria-selected="true"]',
					),
					array(
						'property' => 'background-color',
						'selector' => 'body .acplt-menu .acplt-item[aria-selected="true"]',
					),
				),
			),

			'x_wpgb_facet_select_font_selected'       => array(
				'type'  => 'typography',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'List typography (selected)', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => 'body .wpgb-select-dropdown ul li[aria-selected="true"]',
					),
					array(
						'property' => 'font',
						'selector' => 'body .acplt-menu .acplt-item[aria-selected="true"]',
					),
				),
			),

			'x_wpgb_facet_select_padding'             => array(
				'type'  => 'spacing',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Select padding', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'padding',
						'selector' => 'body .wpgb-select-dropdown ul li',
					),
					array(
						'property' => 'padding',
						'selector' => 'body .acplt-menu .acplt-item',
					),
				),
			),

			'x_wpgb_facet_calendar_sep'               => array(
				'type'  => 'separator',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Date calendar', 'bricksextras' ),
			),

			'x_wpgb_facet_calendar_bg'                => array(
				'type'  => 'color',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Background color', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'border-bottom-color',
						'selector' => 'body .flatpickr-calendar.arrowTop:after',
					),
					array(
						'property' => 'border-top-color',
						'selector' => 'body .flatpickr-calendar.arrowBottom:after',
					),
					array(
						'property' => 'border-bottom-color',
						'selector' => 'body .flatpickr-calendar.arrowTop:before',
					),
					array(
						'property' => 'border-top-color',
						'selector' => 'body .flatpickr-calendar.arrowBottom:before',
					),
					array(
						'property' => 'background-color',
						'selector' => 'body .flatpickr-calendar',
					),
				),
			),

			'x_wpgb_facet_calendar_color'             => array(
				'type'  => 'color',
				'group' => 'x_wpgb_facet_theme',
				'label' => esc_html__( 'Text color', 'bricksextras' ),
				'css'   => array(
					array(
						'property' => 'color',
						'selector' => 'body .flatpickr-calendar',
					),
				),
			),

		);

		return array_merge( $controls, $facet_controls );
	}

	/**
	 * Add WPGB facet control groups to element.
	 *
	 * @param array $control_groups Control groups.
	 * @return array Modified control groups.
	 */
	public static function wpgb_facet_group( $control_groups ) {

			$control_groups['x_facet_title'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Title', 'bricks' ),
			);

			$control_groups['x_facet_inputs'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Input', 'bricks' ),
			);

			$control_groups['x_facet_labels'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Label', 'bricks' ),
			);

			$control_groups['x_facet_checkbox'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Checkbox', 'bricks' ) . ' / ' . esc_html__( 'Radio', 'bricks' ),
			);

			$control_groups['x_facet_buttons'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Button', 'bricks' ),
			);

			$control_groups['x_facet_selections'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Selection', 'bricks' ),
			);

			$control_groups['x_facet_dropdown'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Dropdown', 'bricks' ),
			);

			$control_groups['x_facet_loadmore'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Load more', 'bricks' ),
			);

			$control_groups['x_facet_slider'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Range Slider', 'bricksextras' ),
			);

			$control_groups['x_facet_pagination'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Pagination', 'bricks' ),
			);

			$control_groups['x_facet_reset'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Reset', 'bricks' ),
			);

			$control_groups['x_facet_search'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Search', 'bricks' ),
			);

			$control_groups['x_facet_number'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Number', 'bricks' ),
			);

			$control_groups['x_facet_date'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Date', 'bricks' ),
			);

			$control_groups['x_facet_star_rating'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'Rating', 'bricks' ),
			);

			$control_groups['x_facet_az_index'] = array(
				'tab'   => 'content',
				'title' => esc_html__( 'A-Z index', 'bricksextras' ),
			);

			return $control_groups;
	}

	/**
	 * Add WPGB facet controls to element.
	 *
	 * @param array $controls Controls array.
	 * @return array Modified controls.
	 */
	public static function wpgb_facet_controls( $controls ) {

			$controls['color_sep'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'label' => esc_html__( 'General colors', 'bricksextras' ),
			);

			$controls['x_accent_color'] = array(
				'tab'   => 'content',
				'label' => esc_html__( 'Color', 'bricks' ) . ' (' . esc_html__( 'Accent', 'bricks' ) . ')',
				'type'  => 'color',
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-button[aria-pressed="true"]',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-range-facet .wpgb-range-slider .wpgb-range-progress',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio-control:after',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-load-more,.wpgb-facet .wpgb-apply,.wpgb-facet .wpgb-number-submit',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-reset',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-button[aria-pressed="true"]',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-color-facet .wpgb-color[aria-pressed="true"] .wpgb-color-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio[aria-pressed="true"] .wpgb-radio-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-range-facet .wpgb-range-slider .wpgb-range-thumb',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-color-facet .wpgb-color[aria-pressed="true"] .wpgb-color-control,.wpgb-facet .wpgb-radio-facet .wpgb-radio[aria-pressed="true"] .wpgb-radio-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control',
					),
					array(
						'property' => 'color',
						'selector' => '.wpgb-facet .wpgb-pagination li a[aria-current]',
					),
				),

			);

			$controls['x_facet_general_border-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'label' => esc_html__( 'Border color', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'color',
						'selector' => '.wpgb-facet .wpgb-select-controls',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet input[type="search"]',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet ul .wpgb-button',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-select',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-geolocation-facet .wpgb-input',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet ul .wpgb-button',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-button:not(button)',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-radio .wpgb-radio-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-checkbox .wpgb-checkbox-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-checkbox .wpgb-checkbox-control:before',
					),
				),
			);

			$controls['x_facet_general_borderhover-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'label' => esc_html__( 'Border color', 'bricks' ) . ' (' . esc_html__( 'hover', 'bricks' ) . ')',
				'css'   => array(
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-input:hover',
					),
					array(
						'property' => 'color',
						'selector' => 'wpgb-facet .wpgb-select:hover + .wpgb-select-controls',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-select:hover',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-button:hover:not(button):not([aria-pressed="true"]):not([tabindex="-1"])',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-radio:hover:not([tabindex="-1"]) .wpgb-radio-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-radio:hover:not([tabindex="-1"]) .wpgb-radio-control',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-checkbox:hover:not([tabindex="-1"]) .wpgb-checkbox-control',
					),
				),
			);

			$controls['x_facet_general_borderfocus-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'label' => esc_html__( 'Border color', 'bricks' ) . ' (' . esc_html__( 'Focus', 'bricks' ) . ')',
				'css'   => array(
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-input:focus',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-select.wpgb-select-focused',
					),
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-select:focus',
					),
				),
			);

			$focus_outline_selectors = array(
				'.wpgb-facet .wpgb-button:focus:not(button)',
				'.wpgb-facet .wpgb-rating:focus',
				'.wpgb-facet .wpgb-hierarchy:focus',
				'.wpgb-facet .wpgb-toggle-hidden:focus',
				'.wpgb-facet .wpgb-range-clear:focus',
				'.wpgb-facet .wpgb-range-thumb:focus',
				'.wpgb-facet .wpgb-pagination li a:focus',
				'.wpgb-facet .wpgb-radio:focus .wpgb-radio-control',
				'.wpgb-facet .wpgb-checkbox:focus .wpgb-checkbox-control',
				'.wpgb-facet .wpgb-color:focus .wpgb-color-control',
				'.wpgb-facet .wpgb-az-index:focus .wpgb-az-index-label',
			);

			$controls['x_facet_general_outline-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'label' => esc_html__( 'Outline color', 'bricks' ) . ' (' . esc_html__( 'Focus', 'bricks' ) . ')',
				'css'   => \BricksExtras\Helpers::do_css_rules( 'outline-color', $focus_outline_selectors, true ),
			);

			/* titles */

			$title_selector = '.wpgb-facet .wpgb-facet-title';

			$controls['x_facet_title_typography'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_title',
				'type'  => 'typography',
				'label' => esc_html__( 'Typography', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => $title_selector,
					),
				),
			);

			$controls['x_facet_title_margin'] = array(
				'tab'   => 'content',
				'label' => esc_html__( 'Margin', 'bricks' ),
				'group' => 'x_facet_title',
				'type'  => 'spacing',
				'css'   => array(
					array(
						'property' => 'margin',
						'selector' => $title_selector,
					),
				),
			);

			/* inputs */

			$controls['inputSep'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'group' => 'x_facet_inputs',
			);

			$controls['x_facet_input_typography'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'typography',
				'label' => esc_html__( 'Typography', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet select.wpgb-select+.wpgb-select-controls',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-geolocation-facet .wpgb-input',
					),

				),
			);

			$controls['x_facet_input_typography_placeholder'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'typography',
				'label' => esc_html__( 'Typography', 'bricks' ) . ' (' . esc_html__( 'Placeholder', 'bricks' ) . ')',
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet select.wpgb-select::-webkit-input-placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]::-webkit-input-placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]::-webkit-input-placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]::-webkit-input-placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number::-webkit-input-placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet select.wpgb-select::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-select-placeholder input[type="text"]::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-input::placeholder',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-input::-webkit-input-placeholder',
					),

				),
			);

			$controls['x_facet_input_bg'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'color',
				'label' => esc_html__( 'Background color', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-geolocation-facet .wpgb-input',
					),

				),
			);

			$controls['x_facet_input_border'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'border',
				'label' => esc_html__( 'Border', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-select',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-geolocation-facet .wpgb-input',
					),

				),
			);

			$controls['x_facet_general-icon-sep'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'group' => 'x_facet_inputs',
			);

			$controls['x_facet_general_icon-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'group' => 'x_facet_inputs',
				'label' => esc_html__( 'Icon color', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'color',
						'selector' => '.wpgb-facet .wpgb-input-icon',
					),
				),

			);

			$controls['x_facet_general_icon-size'] = array(
				'tab'         => 'content',
				'type'        => 'number',
				'units'       => true,
				'group'       => 'x_facet_inputs',
				'label'       => esc_html__( 'Icon size', 'bricks' ),
				'css'         => array(
					array(
						'property' => 'width',
						'selector' => '.wpgb-facet .wpgb-input-icon',
					),
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-input-icon',
					),
					array(
						'property' => 'top',
						'selector' => '.wpgb-facet .wpgb-input-icon',
						'value'    => 'calc( 50% - %s/2 )',
					),

				),
				'placeholder' => '16px',
			);

			$controls['x_facet_general_icon-margin'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'label' => esc_html__( 'Icon margin', 'bricks' ),
				'type'  => 'spacing',
				'css'   => array(
					array(
						'property' => 'margin',
						'selector' => '.wpgb-facet .wpgb-input-icon',
					),
				),
			);

			$controls['x_facet_general_clear-icon-sep'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'group' => 'x_facet_inputs',
				'label' => esc_html__( 'Clear button', 'bricks' ),
			);

			$controls['x_facet_general_clear-icon-color'] = array(
				'tab'   => 'content',
				'type'  => 'color',
				'group' => 'x_facet_inputs',
				'label' => esc_html__( 'Icon color', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'color',
						'selector' => '.wpgb-facet .wpgb-clear-button svg',
					),
				),

			);

			$controls['x_facet_general_clear-icon-size'] = array(
				'tab'         => 'content',
				'type'        => 'number',
				'units'       => true,
				'group'       => 'x_facet_inputs',
				'label'       => esc_html__( 'Icon size', 'bricks' ),
				'css'         => array(
					array(
						'property' => 'width',
						'selector' => '.wpgb-facet .wpgb-clear-button svg',
					),
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-clear-button svg',
					),
					array(
						'property' => 'top',
						'selector' => '.wpgb-facet .wpgb-clear-button svg',
						'value'    => 'calc( 50% - %s/2 )',
					),

				),
				'placeholder' => '16px',
			);

			$controls['x_facet_general_clear-icon-margin'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'label' => esc_html__( 'Icon margin', 'bricks' ),
				'type'  => 'spacing',
				'css'   => array(
					array(
						'property' => 'margin',
						'selector' => '.wpgb-facet .wpgb-clear-button svg',
					),
				),
			);

			$controls['x_facet_input_height'] = array(
				'label' => esc_html__( 'Height', 'bricks' ),
				'group' => 'x_facet_inputs',
				'type'  => 'number',
				'units' => true,
				'css'   => array(
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet select.wpgb-select',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet .wpgb-select',
					),
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
					),
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
					),
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"]',
					),

					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number',
					),
					array(
						'property' => 'min-height',
						'selector' => '.wpgb-facet .wpgb-number-facet .wpgb-number',
					),

				),
			);

			$controls['geolocationInputSep'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'label' => esc_html__( 'Geolocation Input', 'bricksextras' ),
				'group' => 'x_facet_inputs',
			);

			$controls['locationIconColor'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'color',
				'label' => esc_html__( 'Icon color', 'bricks' ) . ' (' . esc_html__( 'Location', 'bricks' ) . ')',
				'css'   => array(
					array(
						'property' => 'color',
						'selector' => '.wpgb-facet .wpgb-locate-button',
					),
				),
			);

			$controls['locationIconSize'] = array(
				'tab'         => 'content',
				'group'       => 'x_facet_inputs',
				'type'        => 'number',
				'units'       => true,
				'label'       => esc_html__( 'Icon size', 'bricks' ) . ' (' . esc_html__( 'Location', 'bricks' ) . ')',
				'css'         => array(
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-locate-button svg',
					),
				),
				'placeholder' => '20px',
			);

			$controls['georadiusTypography'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_inputs',
				'type'  => 'typography',
				'label' => esc_html__( 'Typography', 'bricks' ) . ' (' . esc_html__( 'Georadius', 'bricksextras' ) . ')',
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-geo-radius',
					),
				),
			);

			/* labels */

			$controls['x_facet_labels_typography'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_labels',
				'type'  => 'typography',
				'label' => esc_html__( 'Typography', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-radio-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-button-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-rating-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-az-index-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-checkbox-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-hierarchy-label',
					),
				),
			);

			/* checkbox / radio */

			$controls['x_facet_vertical-gap'] = array(
				'label' => esc_html__( 'Gap', 'bricks' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'number',
				'units' => true,
				'css'   => array(
					array(
						'property' => 'gap',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-hierarchical-list',
					),
					array(
						'property' => 'gap',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-hierarchical-list',
					),
				),
			);

			$controls['x_facet_list_direction'] = array(
				'tab'     => 'content',
				'label'   => esc_html__( 'Direction', 'bricks' ) . ' (' . esc_html__( 'List', 'bricks' ) . ')',
				'group'   => 'x_facet_checkbox',
				'tooltip' => array(
					'content'  => 'flex-direction',
					'position' => 'top-left',
				),
				'type'    => 'direction',
				'css'     => array(
					array(
						'property' => 'flex-direction',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-hierarchical-list',
					),
					array(
						'property' => 'flex-direction',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-hierarchical-list',
					),
				),
				'inline'  => true,
			);

			$controls['x_facet_list_wrap'] = array(
				'tab'         => 'content',
				'label'       => esc_html__( 'Flex wrap', 'bricks' ),
				'group'       => 'x_facet_checkbox',
				'tooltip'     => array(
					'content'  => 'flex-wrap',
					'position' => 'top-left',
				),
				'type'        => 'select',
				'options'     => array(
					'nowrap'       => esc_html__( 'No wrap', 'bricks' ),
					'wrap'         => esc_html__( 'Wrap', 'bricks' ),
					'wrap-reverse' => esc_html__( 'Wrap reverse', 'bricks' ),
				),
				'inline'      => true,
				'css'         => array(
					array(
						'property' => 'flex-wrap',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-hierarchical-list',
					),
					array(
						'property' => 'flex-wrap',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-hierarchical-list',
					),
				),
				'placeholder' => esc_html__( 'Wrap', 'bricks' ),
			);

			$controls['checkbox_label_start'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'group' => 'x_facet_checkbox',
			);

			$controls['x_facet_checkbox_labels_typography'] = array(
				'tab'   => 'content',
				'group' => 'x_facet_checkbox',
				'type'  => 'typography',
				'label' => esc_html__( 'Label typography', 'bricks' ),
				'css'   => array(
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio-label',
					),
					array(
						'property' => 'font',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox-label',
					),
				),
			);

			$controls['x_facet-horizontal-gap'] = array(
				'label' => esc_html__( 'Horizontal gap', 'bricksextras' ),
				'info'  => esc_html__( 'Gap between label and checkbox', 'bricksextras' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'number',
				'units' => true,
				'css'   => array(
					array(
						'property' => 'padding-left',
						'selector' => '.wpgb-facet .wpgb-radio-label',
					),
					array(
						'property' => 'padding-left',
						'selector' => '.wpgb-facet .wpgb-checkbox-label',
					),
				),
			);

			$controls['checkbox_label_end'] = array(
				'tab'   => 'content',
				'type'  => 'separator',
				'group' => 'x_facet_checkbox',
			);

			$controls['x_facet_checkbox_bg'] = array(
				'label' => esc_html__( 'Background color', 'bricks' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'color',
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-checkbox .wpgb-checkbox-control',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-radio .wpgb-radio-control',
					),
				),
			);

			$controls['x_facet_checkbox_border'] = array(
				'label' => esc_html__( 'Border', 'bricks' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'border',
				'css'   => array(
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-checkbox .wpgb-checkbox-control',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-radio .wpgb-radio-control',
					),
				),
			);

			$controls['x_facet_checkbox_bg_selected'] = array(
				'label' => esc_html__( 'Background color', 'bricks' ) . ' (' . esc_html__( 'Selected', 'bricks' ) . ')',
				'group' => 'x_facet_checkbox',
				'type'  => 'color',
				'css'   => array(
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio[aria-pressed="true"] .wpgb-radio-control',
					),
				),
			);

			$controls['x_facet_checkbox_border_selected'] = array(
				'label' => esc_html__( 'Border', 'bricks' ) . ' (' . esc_html__( 'Selected', 'bricks' ) . ')',
				'group' => 'x_facet_checkbox',
				'type'  => 'border',
				'css'   => array(
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control',
					),
					array(
						'property' => 'border',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio[aria-pressed="true"] .wpgb-radio-control',
					),
				),
			);

			$controls['x_facet_checkbox_inner_selected'] = array(
				'label' => esc_html__( 'Inner color', 'bricksextras' ) . ' (' . esc_html__( 'Selected', 'bricks' ) . ')',
				'group' => 'x_facet_checkbox',
				'type'  => 'color',
				'css'   => array(
					array(
						'property' => 'border-color',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox[aria-pressed="true"] .wpgb-checkbox-control:after',
					),
					array(
						'property' => 'background-color',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio-control:after',
					),

				),
			);

			$controls['x_facet_checkbox_sep'] = array(
				'label' => esc_html__( 'Checkbox', 'bricks' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'separator',
			);

			$controls['x_facet_checkbox_size'] = array(
				'label'       => esc_html__( 'Size', 'bricks' ),
				'group'       => 'x_facet_checkbox',
				'type'        => 'number',
				'units'       => true,
				'placeholder' => '20px',
				'css'         => array(
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox-control',
					),
					array(
						'property' => 'width',
						'selector' => '.wpgb-facet .wpgb-checkbox-facet .wpgb-checkbox-control',
					),
				),
			);

			$controls['x_facet_radio_sep'] = array(
				'label' => esc_html__( 'Radio', 'bricks' ),
				'group' => 'x_facet_checkbox',
				'type'  => 'separator',
			);

			$controls['x_facet_radio_size'] = array(
				'label'       => esc_html__( 'Size', 'bricks' ),
				'group'       => 'x_facet_checkbox',
				'type'        => 'number',
				'units'       => true,
				'placeholder' => '20px',
				'css'         => array(
					array(
						'property' => 'height',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio-control',
					),
					array(
						'property' => 'width',
						'selector' => '.wpgb-facet .wpgb-radio-facet .wpgb-radio-control',
					),
				),
			);

			$controls['x_facet_radio_gap_sep'] = array(
				'group' => 'x_facet_checkbox',
				'type'  => 'separator',
			);

			// Loadmore.

			$loadmore_selector = '.wpgb-facet .wpgb-load-more.wpgb-button';

			$controls['x_facet_loadmore_border'] = array(
				'label' => esc_html__( 'Border', 'bricks' ),
				'group' => 'x_facet_loadmore',
				'type'  => 'border',
				'css'   => array(
					array(
						'property' => 'border',
						'selector' => $loadmore_selector,
					),
				),
			);

				$controls['x_facet_loadmore_bg'] = array(
					'label' => esc_html__( 'Background color', 'bricks' ),
					'group' => 'x_facet_loadmore',
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $loadmore_selector,
						),
					),
				);

				$controls['x_facet_loadmore_font'] = array(
					'label' => esc_html__( 'Typography', 'bricks' ),
					'group' => 'x_facet_loadmore',
					'type'  => 'typography',
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $loadmore_selector,
						),
					),
				);

				$controls['x_facet_loadmore_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_loadmore',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $loadmore_selector,
						),
					),
				);

				$controls['x_facet_loadmore_width'] = array(
					'tab'   => 'content',
					'type'  => 'number',
					'units' => true,
					'group' => 'x_facet_loadmore',
					'label' => esc_html__( 'Button width', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'width',
							'selector' => $loadmore_selector,
						),
					),
				);

				/* slider */
				$slider_selector = '.wpgb-facet .wpgb-range-facet .wpgb-range-slider';
				$thumb_selector  = '.wpgb-facet .wpgb-range-facet .wpgb-range-slider .wpgb-range-thumb';

				$controls['slider_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Slider', 'bricks' ),
					'group' => 'x_facet_slider',
				);

				$controls['x_facet_slider_height'] = array(
					'label'       => esc_html__( 'Height', 'bricks' ),
					'group'       => 'x_facet_slider',
					'type'        => 'number',
					'units'       => true,
					'css'         => array(
						array(
							'property' => 'height',
							'selector' => $slider_selector,
						),
					),
					'placeholder' => '6px',
				);

				$controls['x_facet_slider_border'] = array(
					'tab'   => 'content',
					'label' => esc_html__( 'Border', 'bricks' ),
					'type'  => 'border',
					'group' => 'x_facet_slider',
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $slider_selector,
						),
					),
				);

				$controls['x_facet_slider_bg'] = array(
					'group' => 'x_facet_slider',
					'label' => esc_html__( 'Background color', 'bricks' ),
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $slider_selector,
						),
					),
				);

				$controls['x_facet_slider_progress_bg'] = array(
					'tab'   => 'content',
					'label' => esc_html__( 'Background color', 'bricks' ) . ' (' . esc_html__( 'Progress', 'bricks' ) . ')',
					'group' => 'x_facet_slider',
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet .wpgb-range-facet .wpgb-range-slider .wpgb-range-progress',
						),
					),
				);

				$controls['slider_thumb_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Slider Thumb', 'bricksextras' ),
					'group' => 'x_facet_slider',
				);

				$controls['x_facet_slider_control_height'] = array(
					'label'       => esc_html__( 'Size', 'bricks' ),
					'group'       => 'x_facet_slider',
					'type'        => 'number',
					'units'       => true,
					'placeholder' => '16px',
					'css'         => array(
						array(
							'property' => 'height',
							'selector' => $thumb_selector,
						),
						array(
							'property' => 'width',
							'selector' => $thumb_selector,
						),
					),
				);

				$controls['x_facet_slider_control_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $thumb_selector,
						),
					),
				);

				$controls['x_facet_slider_control_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $thumb_selector,
						),
					),
				);

				$controls['range_value_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'group' => 'x_facet_slider',
				);

				$controls['x_facet_range_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ) . ' (' . esc_html__( 'Value range', 'bricksextras' ) . ')',
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-range-facet .wpgb-range-values',
						),
					),
				);

				$controls['range_clear_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Button', 'bricks' ) . ' (' . esc_html__( 'Clear', 'bricks' ) . ')',
					'group' => 'x_facet_slider',
				);

				$range_clear_button = '.wpgb-facet .wpgb-range-facet .wpgb-range-clear';

				$controls['x_facet_range_clear_button_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $range_clear_button,
						),
					),
				);

				$controls['x_facet_range_clear_button_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $range_clear_button,
						),
					),
				);

				$controls['x_facet_range_clear_button_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $range_clear_button,
						),
					),
				);

				$controls['x_facet_range_clear_button_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $range_clear_button,
						),
					),
				);

				$controls['x_facet_range_clear_button_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_slider',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $range_clear_button,
						),
					),
				);

				/* buttons */

				$button_selector = '.wpgb-facet .wpgb-button';

				$controls['x_facet_button_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button',
						),
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet button.wpgb-button',
						),
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-button-label',
						),
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-button',
						),

					),
				);

				$controls['x_facet_button_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button',
						),
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet button.wpgb-button',
						),
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet .wpgb-button',
						),
					),
				);

				$controls['x_facet_button_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button',
						),
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet button.wpgb-button',
						),
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet .wpgb-button',
						),
					),
				);

				$controls['x_facet_button_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button',
						),
						array(
							'property' => 'box-shadow',
							'selector' => '.wpgb-facet button.wpgb-button',
						),
						array(
							'property' => 'box-shadow',
							'selector' => '.wpgb-facet .wpgb-button',
						),
					),
				);

				$controls['x_facet_button_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button',
						),
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet button.wpgb-button',
						),
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-button',
						),
					),
				);

				$controls['button_selected_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Selected', 'bricks' ),
					'group' => 'x_facet_buttons',
				);

				$controls['x_facet_button_typography_selected'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button[aria-pressed="true"]',
						),
					),
				);

				$controls['x_facet_button_bg_selected'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button[aria-pressed="true"]',
						),
					),
				);

				$controls['x_facet_button_border_selected'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_buttons',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet .wpgb-button-facet .wpgb-button[aria-pressed="true"]',
						),
					),
				);

				/* selections */

				$selections_button_selector = '.wpgb-facet .wpgb-selection-facet .wpgb-button';

				$controls['x_facet_selection_buttons_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Buttons', 'bricks' ) . ' (' . esc_html__( 'Selection', 'bricks' ) . ')',
					'group' => 'x_facet_selections',
				);

				$controls['x_facet_selections_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_selections',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $selections_button_selector,
						),
						array(
							'property' => 'font',
							'selector' => $selections_button_selector . ' .wpgb-button-label',
						),
					),
				);

				$controls['x_facet_button_selectionsbg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_selections',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $selections_button_selector,
						),
					),
				);

				$controls['x_facet_button_selectionsborder'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_selections',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $selections_button_selector,
						),
					),
				);

				$controls['x_facet_button_selectionsboxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_selections',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $selections_button_selector,
						),
					),
				);

				$controls['x_facet_button_selectionspadding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_selections',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $selections_button_selector,
						),
					),
				);

				/* dropdown */

				$controls['x_facet_dropdown_height'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Height', 'bricks' ) . ' (' . esc_html__( 'Input', 'bricks' ) . ')',
					'type'  => 'number',
					'css'   => array(
						array(
							'property' => 'height',
							'selector' => '.wpgb-facet .wpgb-select-facet .wpgb-select',
						),
						array(
							'property' => 'min-height',
							'selector' => '.wpgb-facet .wpgb-select-facet select.wpgb-select',
						),
					),
				);

				$controls['x_facet_dropdown_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Padding', 'bricks' ) . ' (' . esc_html__( 'Input', 'bricks' ) . ')',
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet select.wpgb-select',
						),
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-select-placeholder',
						),

					),
				);

				$controls['x_facet_dropdown_icon_color'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Icon color', 'bricks' ),
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'color',
							'selector' => '.wpgb-facet .wpgb-select-controls .wpgb-select-toggle',
						),
					),
				);

				$controls['x_facet_dropdown_sepearator_color'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Separator color', 'bricks' ),
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet .wpgb-select-controls .wpgb-select-separator',
						),
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet select.wpgb-select+.wpgb-select-controls .wpgb-select-separator',
						),
					),
				);

				$controls['x_facet_dropdown_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet div.wpgb-select',
						),
						array(
							'property' => 'border',
							'selector' => '.wpgb-facet select.wpgb-select',
						),
					),
				);

				$controls['x_facet_dropdown_bg'] = array(
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Background color', 'bricks' ),
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet div.wpgb-select',
						),
						array(
							'property' => 'background-color',
							'selector' => '.wpgb-facet select.wpgb-select',
						),
					),
				);

				$controls['x_facet_dropdown_font'] = array(
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'type'  => 'typography',
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet div.wpgb-select',
						),
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet select.wpgb-select',
						),
						array(
							'property' => 'font',
							'selector' => '.wpgb-facet .wpgb-select-placeholder input[type=text]::placeholder',
						),
					),
				);

				$controls['x_facet_dropdown_selection_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Multiple Selection values', 'bricksextras' ),
					'group' => 'x_facet_dropdown',
				);

				$dropdown_selected_values = '.wpgb-select-placeholder .wpgb-select-values>div.wpgb-select-value';

				$controls['x_facet_dropdown_selected_bg'] = array(
					'label' => esc_html__( 'Background color', 'bricks' ),
					'group' => 'x_facet_dropdown',
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selected_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selected_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selected_font'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selected_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selected_margin'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Margin', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'margin',
							'selector' => $dropdown_selected_values,
						),
					),
				);

				$controls['x_facet_dropdown_selection_remove_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Multiple Selection remove icon', 'bricksextras' ),
					'group' => 'x_facet_dropdown',
				);

				$dropdown_selected_remove_button = '.wpgb-select-placeholder .wpgb-select-values>div.wpgb-select-value button.wpgb-select-remove';

				$controls['x_facet_dropdown_selected_remove_bg'] = array(
					'label' => esc_html__( 'Background color', 'bricks' ),
					'group' => 'x_facet_dropdown',
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				$controls['x_facet_dropdown_selected_remove_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				$controls['x_facet_dropdown_selected_remove_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Box Shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				$controls['x_facet_dropdown_selected_remove_font'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				$controls['x_facet_dropdown_selected_remove_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				$controls['x_facet_dropdown_selected_remove_margin'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_dropdown',
					'label' => esc_html__( 'Margin', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'margin',
							'selector' => $dropdown_selected_remove_button,
						),
					),
				);

				/* pagination */

				$controls['pagination_link_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Links', 'bricks' ),
					'group' => 'x_facet_pagination',
				);

				$pagination_link_selector = '.wpgb-facet .wpgb-pagination li a';

				$controls['x_facet_pagination_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $pagination_link_selector,
						),
					),
				);

				$controls['x_facet_pagination_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'color',
					'label' => esc_html__( 'Background color', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $pagination_link_selector,
						),
					),
				);

				$controls['x_facet_pagination_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $pagination_link_selector,
						),
					),
				);

				$controls['x_facet_pagination_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $pagination_link_selector,
						),
					),
				);

				$controls['x_facet_pagination_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $pagination_link_selector,
						),
					),
				);

				$controls['x_facet_pagination_gap'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'label' => esc_html__( 'Gap', 'bricks' ),
					'type'  => 'number',
					'units' => true,
					'css'   => array(
						array(
							'property' => 'gap',
							'selector' => '.wpgb-pagination',
						),
					),
				);

				$controls['pagination_link_current_sep'] = array(
					'tab'   => 'content',
					'type'  => 'separator',
					'label' => esc_html__( 'Links', 'bricks' ) . ' (' . esc_html__( 'Current', 'bricks' ) . ')',
					'group' => 'x_facet_pagination',
				);

				$controls['x_facet_pagination_current_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $pagination_link_selector . '[aria-current]',
						),
					),
				);

				$controls['x_facet_pagination_current_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'color',
					'label' => esc_html__( 'Background color', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $pagination_link_selector . '[aria-current]',
						),
					),
				);

				$controls['x_facet_pagination_current_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $pagination_link_selector . '[aria-current]',
						),
					),
				);

				$controls['x_facet_pagination_current_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_pagination',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $pagination_link_selector . '[aria-current]',
						),
					),
				);

				/* reset */

				$reset_selector = '.wpgb-facet .wpgb-button.wpgb-reset';

				$controls['x_facet_reset_typography'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_reset',
					'type'  => 'typography',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $reset_selector,
						),
					),
				);

				$controls['x_facet_reset_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_reset',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $reset_selector,
						),
					),
				);

				$controls['x_facet_reset_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_reset',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $reset_selector,
						),
					),
				);

				$controls['x_facet_reset_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_reset',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $reset_selector,
						),
					),
				);

				$controls['x_facet_reset-button-width'] = array(
					'tab'   => 'content',
					'type'  => 'number',
					'units' => true,
					'group' => 'x_facet_reset',
					'label' => esc_html__( 'Button width', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'width',
							'selector' => $reset_selector,
						),
					),
				);

				$controls['x_facet_reset_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_reset',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $reset_selector,
						),
					),
				);

				/* search */

				$controls['x_facet_search_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_search',
					'label' => esc_html__( 'Padding', 'bricks' ) . ' (' . esc_html__( 'Input', 'bricks' ) . ')',
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-autocomplete-facet input[type="search"]',
						),
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-search-facet input[type="search"]',
						),

					),
				);

				/* number */

				$number_input_selector = '.wpgb-facet .wpgb-number-facet .wpgb-number';

				$controls['x_facet_number_sep'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'type'  => 'separator',
					'label' => esc_html__( 'Input', 'bricks' ),
				);

				$controls['x_facet_number_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $number_input_selector,
						),
					),
				);

				$controls['x_facet_number_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $number_input_selector,
						),
					),
				);

				$controls['x_facet_number_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $number_input_selector,
						),
					),
				);

				$controls['x_facet_number_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Input padding', 'bricksextras' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $number_input_selector,
						),
					),
				);

				$controls['x_facet_number_submit_sep'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'type'  => 'separator',
					'label' => esc_html__( 'Submit button', 'bricks' ),
				);

				$number_submit_selector = '.wpgb-facet button.wpgb-button.wpgb-number-submit';

				$controls['x_facet_number_submit_border'] = array(
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Border', 'bricks' ),
					'type'  => 'border',
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $number_submit_selector,
						),
					),
				);

				$controls['x_facet_number_submit_bg'] = array(
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Background color', 'bricks' ),
					'type'  => 'color',
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $number_submit_selector,
						),
					),
				);

				$controls['x_facet_number_submit_font'] = array(
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Typography', 'bricks' ),
					'type'  => 'typography',
					'css'   => array(
						array(
							'property' => 'font',
							'selector' => $number_submit_selector,
						),
					),
				);

				$controls['x_facet_number_submit_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $number_submit_selector,
						),
					),
				);

				$controls['x_facet_number_submit_width'] = array(
					'tab'   => 'content',
					'type'  => 'number',
					'units' => true,
					'group' => 'x_facet_number',
					'label' => esc_html__( 'Button width', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'width',
							'selector' => $number_submit_selector,
						),
					),
				);

				/* date */

				$controls['x_facet_date_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_date',
					'label' => esc_html__( 'Input padding', 'bricksextras' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => '.wpgb-facet .wpgb-date-facet label input[type="text"].wpgb-input',
						),
					),
				);

				/* star rating */

				$controls['x_facet_star_color'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_star_rating',
					'type'  => 'color',
					'label' => esc_html__( 'Star color', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'color',
							'selector' => '.wpgb-facet .wpgb-rating-facet .wpgb-rating-control .wpgb-rating-svg',
						),
					),
				);

				$controls['x_facet_star_color_active'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_star_rating',
					'type'  => 'color',
					'label' => esc_html__( 'Star color', 'bricks' ) . ' (' . esc_html__( 'Active', 'bricks' ) . ')',
					'css'   => array(
						array(
							'property' => 'color',
							'selector' => '.wpgb-facet .wpgb-rating-facet .wpgb-rating[aria-pressed="true"] .wpgb-rating-svg',
						),
						array(
							'property' => 'color',
							'selector' => '.wpgb-facet .wpgb-rating-facet .wpgb-rating:hover:not([tabindex="-1"]) .wpgb-rating-svg',
						),
					),
				);

				/* a-z index */

				$index_button_selector = '.wpgb-facet .wpgb-az-index-facet .wpgb-az-index-label';

				$controls['x_facet_index_sep'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_az_index',
					'type'  => 'separator',
					'label' => esc_html__( 'Button style', 'bricks' ),
				);

				$controls['x_facet_index_typography'] = array(
					'tab'         => 'content',
					'group'       => 'x_facet_az_index',
					'label'       => esc_html__( 'Typography', 'bricks' ),
					'type'        => 'typography',
					'css'         => array(
						array(
							'property' => 'font',
							'selector' => $index_button_selector,
						),
					),
					'placeholder' => '0.4',
				);

				$controls['x_facet_index_bg'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_az_index',
					'type'  => 'color',
					'label' => esc_html__( 'Background', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'background-color',
							'selector' => $index_button_selector,
						),
					),
				);

				$controls['x_facet_index_border'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_az_index',
					'type'  => 'border',
					'label' => esc_html__( 'Border', 'bricks' ),
					'css'   => array(
						array(
							'property' => 'border',
							'selector' => $index_button_selector,
						),
					),
				);

				$controls['x_facet_index_boxshadow'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_az_index',
					'label' => esc_html__( 'Box shadow', 'bricks' ),
					'type'  => 'box-shadow',
					'css'   => array(
						array(
							'property' => 'box-shadow',
							'selector' => $index_button_selector,
						),
					),
				);

				$controls['x_facet_index_padding'] = array(
					'tab'   => 'content',
					'group' => 'x_facet_az_index',
					'label' => esc_html__( 'Padding', 'bricks' ),
					'type'  => 'spacing',
					'css'   => array(
						array(
							'property' => 'padding',
							'selector' => $index_button_selector,
						),
					),
				);

				$controls['x_facet_index_disabled_opacity'] = array(
					'tab'         => 'content',
					'group'       => 'x_facet_az_index',
					'label'       => esc_html__( 'Opacity', 'bricks' ) . ' (' . esc_html__( 'Disabled', 'bricks' ) . ')',
					'type'        => 'number',
					'css'         => array(
						array(
							'property' => 'opacity',
							'selector' => '.wpgb-facet .wpgb-az-index-facet [class^="wpgb"][role="button"][tabindex="-1"]',
						),
					),
					'placeholder' => '0.4',
				);

				return $controls;
	}
}
