<?php
/**
 * Avada Options.
 *
 * @author     ThemeFusion
 * @copyright  (c) Copyright by ThemeFusion
 * @link       https://avada.com
 * @package    Avada
 * @subpackage Core
 * @since      4.0.0
 */

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'Direct script access denied.' );
}

/**
 * Privacy settings.
 *
 * @param array $sections An array of our sections.
 * @return array
 */
function avada_options_section_privacy( $sections ) {
	$embed_types = [];
	if ( class_exists( 'Avada_Privacy_Embeds' ) ) {
		$embed_types    = Avada()->privacy_embeds->get_embed_defaults( true );
		$embed_defaults = array_keys( $embed_types );
	}

	$sections['privacy'] = [
		'label'    => esc_html__( 'Privacy & Consent', 'Avada' ),
		'id'       => 'heading_privacy',
		'priority' => 25,
		'icon'     => 'el-icon-user',
		'alt_icon' => 'fusiona-privacy',
		'fields'   => [
			'privacy_note'                   => [
				'label'       => '',
				'description' => '<div class="fusion-redux-important-notice">' . __( '<strong>IMPORTANT NOTE:</strong> The options in this section help you comply more easily with data privacy regulations such as the GDPR. When the "Privacy Consent" option is enabled, Avada creates a cookie named <b>"privacy_embeds"</b> in visitors’ browsers to store and manage consent preferences for third-party embeds and tracking scripts. This also includes scripts added through "Custom Code Snippets" (Advanced > Code Fields) that use a privacy category. You may want to include information about this cookie in your privacy policy.', 'Avada' ) . '</div>',
				'id'          => 'privacy_note',
				'type'        => 'custom',
			],
			'gfonts_load_method'             => [
				'id'          => 'gfonts_load_method',
				'label'       => esc_html__( 'Google & Font Awesome Fonts Mode', 'Avada' ),
				'description' => esc_html__( 'When set to "Local", the Google and Font Awesome fonts set in Global Options will be downloaded to your server. Set to "CDN" to use the Google and FontAwesome CDNs.', 'Avada' ),
				'type'        => 'radio-buttonset',
				'default'     => 'cdn',
				'choices'     => [
					'local' => esc_html__( 'Local', 'Avada' ),
					'cdn'   => esc_html__( 'CDN', 'Avada' ),
				],
				// No need to refresh the page.
				'transport'   => 'postMessage',
			],
			'privacy_embeds'                 => [
				'label'       => esc_html__( 'Privacy Consent Tools', 'Avada' ),
				'description' => esc_html__( 'Turn on to prevent scripts and embeds from loading until user consent is given.', 'Avada' ),
				'id'          => 'privacy_embeds',
				'default'     => '0',
				'type'        => 'switch',
				// No need to refresh the page.
				'transport'   => 'postMessage',
			],
			'privacy_expiry'                 => [
				'label'       => esc_html__( 'Privacy Consent Cookie Expiration', 'Avada' ),
				'description' => esc_html__( 'Controls how long the consent cookie should be stored for.  In days.', 'Avada' ),
				'id'          => 'privacy_expiry',
				'default'     => '30',
				'type'        => 'slider',
				'choices'     => [
					'min'  => '1',
					'max'  => '366',
					'step' => '1',
				],
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// No need to refresh the page.
				'transport'   => 'postMessage',
			],
			'privacy_embed_types'            => [
				'label'       => esc_html__( 'Privacy Consent Types', 'Avada' ),
				'description' => esc_html__( 'Select the types of embeds which you would like to require consent. Custom Code Snippets with a privacy category are automatically included and do not need to be selected here.', 'Avada' ),
				'id'          => 'privacy_embed_types',
				'default'     => $embed_defaults,
				'type'        => 'select',
				'multi'       => true,
				'choices'     => $embed_types,
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// No need to refresh the page.
				'transport'   => 'postMessage',
			],
			'privacy_embed_defaults'         => [
				'label'       => esc_html__( 'Privacy Selected Consent Types', 'Avada' ),
				'description' => esc_html__( 'Select the types of embeds which you would like to have checked by default.  This applies to both the privacy bar and the privacy element.', 'Avada' ),
				'id'          => 'privacy_embed_defaults',
				'default'     => [],
				'type'        => 'select',
				'multi'       => true,
				'choices'     => $embed_types,
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// No need to refresh the page.
				'transport'   => 'postMessage',
			],
			'privacy_embed_section'             => [
				'label'    => esc_html__( 'Third-Party Embeds', 'Avada' ),
				'id'       => 'privacy_embed_section',
				'icon'     => true,
				'type'     => 'info',
				'required' => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],			
			'privacy_embed_description'      => [
				'label'       => esc_html__( 'Third-Party Embed Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below each third-party embed consent checkbox (YouTube, Instagram, Google Maps, etc.).', 'Avada' ),
				'id'          => 'privacy_embed_description',
				'default'     => esc_html__( 'Embeds from this vendor are blocked and replaced with a placeholder until consent is given.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_bg_color'               => [
				'label'       => esc_html__( 'Privacy Placeholder Background Color', 'Avada' ),
				'description' => esc_html__( 'Controls the background color for the privacy placeholders.', 'Avada' ),
				'id'          => 'privacy_bg_color',
				'type'        => 'color-alpha',
				'default'     => 'hsla(var(--awb-color8-h),var(--awb-color8-s),var(--awb-color8-l),calc(var(--awb-color8-a) - 90%))',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bg_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_color'                  => [
				'label'       => esc_html__( 'Privacy Placeholder Text Color', 'Avada' ),
				'description' => esc_html__( 'Controls the text color for the embed placeholders.', 'Avada' ),
				'id'          => 'privacy_color',
				'type'        => 'color-alpha',
				'default'     => 'hsla(var(--awb-color8-h),var(--awb-color8-s),var(--awb-color8-l),calc(var(--awb-color8-a) - 70%))',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],			
			'google_consent_mode_section'             => [
				'label' => esc_html__( 'Google Consent Mode v2', 'Avada' ),
				'id'    => 'google_consent_mode_section',
				'icon'  => true,
				'type'  => 'info',
				'class' => 'fusion-gutter-and-or-or-or',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_analytics_storage',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_storage',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_user_data',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_personalization',
					],				
				],
			],
			'privacy_google_analytics_storage_label'       => [
				'label'       => esc_html__( 'Google Analytics Label', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend label for the Google Analytics Storage consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_analytics_storage_label',
				'default'     => esc_html__( 'Google Analytics', 'Avada' ),
				'type'        => 'text',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_analytics_storage',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_analytics_storage_description' => [
				'label'       => esc_html__( 'Google Analytics Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below the Google Analytics Storage consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_analytics_storage_description',
				'default'     => esc_html__( 'Enables Google Analytics to store data about your visit, such as pages viewed, time spent, and interactions, to help us understand and improve website performance.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_analytics_storage',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_storage_label'              => [
				'label'       => esc_html__( 'Google Advertising Cookies Label', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend label for the Google Ad Storage consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_storage_label',
				'default'     => esc_html__( 'Google Advertising Cookies', 'Avada' ),
				'type'        => 'text',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_storage',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_storage_description'        => [
				'label'       => esc_html__( 'Google Advertising Cookies Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below the Google Ad Storage consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_storage_description',
				'default'     => esc_html__( 'Enables Google to store cookies used for advertising, such as tracking ad clicks and measuring conversion rates.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_storage',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_user_data_label'            => [
				'label'       => esc_html__( 'Google Advertising User Data Label', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend label for the Google Ad User Data consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_user_data_label',
				'default'     => esc_html__( 'Google Advertising User Data', 'Avada' ),
				'type'        => 'text',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_user_data',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_user_data_description'      => [
				'label'       => esc_html__( 'Google Advertising User Data Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below the Google Ad User Data consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_user_data_description',
				'default'     => esc_html__( 'Allows Google to collect and use your data for ad targeting and to measure the performance of advertising campaigns.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_user_data',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_personalization_label'      => [
				'label'       => esc_html__( 'Google Advertising Personalization Label', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend label for the Google Ad Personalization consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_personalization_label',
				'default'     => esc_html__( 'Google Advertising Personalization', 'Avada' ),
				'type'        => 'text',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_personalization',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_google_ad_personalization_description' => [
				'label'       => esc_html__( 'Google Advertising Personalization Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below the Google Ad Personalization consent checkbox.', 'Avada' ),
				'id'          => 'privacy_google_ad_personalization_description',
				'default'     => esc_html__( 'Allows Google to show you personalised ads based on your interests and browsing history.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'google_ad_personalization',
					],
				],
				'transport'   => 'postMessage',
			],
			'hubspot_section'             => [
				'label' => esc_html__( 'HubSpot Consent', 'Avada' ),
				'id'    => 'hubspot_section',
				'icon'  => true,
				'type'  => 'info',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'hubspot',
					],
				],
			],
			'privacy_hubspot_label'                        => [
				'label'       => esc_html__( 'HubSpot Label', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend label for the HubSpot consent checkbox.', 'Avada' ),
				'id'          => 'privacy_hubspot_label',
				'default'     => esc_html__( 'HubSpot', 'Avada' ),
				'type'        => 'text',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'hubspot',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_hubspot_description'                  => [
				'label'       => esc_html__( 'HubSpot Description', 'Avada' ),
				'description' => esc_html__( 'Controls the frontend description shown below the HubSpot consent checkbox.', 'Avada' ),
				'id'          => 'privacy_hubspot_description',
				'default'     => esc_html__( 'Enables HubSpot to track your activity on this site, power the live chat widget, and manage marketing interactions.', 'Avada' ),
				'type'        => 'textarea',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embed_types',
						'operator' => 'contains',
						'value'    => 'hubspot',
					],
				],
				'transport'   => 'postMessage',
			],
			'privacy_consent_content_section'             => [
				'label' => esc_html__( 'Consent Categories', 'Avada' ),
				'id'    => 'privacy_consent_content_section',
				'icon'  => true,
				'type'  => 'info',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],			
			],
			'privacy_bar_content'            => [
				'label'       => esc_html__( 'Consent Categories', 'Avada' ),
				'description' => esc_html__( 'Defines the consent categories displayed in the Privacy & Consent Bar and the Privacy & Consent Element. Each entry sets the category type, title, and description shown to visitors when grouped layout is used. Click the "Add" button to add additional categories.', 'Avada' ),
				'id'          => 'privacy_bar_content',
				'default'     => [],
				'type'        => 'repeater',
				'bind_title'  => 'title',
				'limit'       => 6,
				'fields'      => [
					'type'        => [
						'id'          => 'type',
						'type'        => 'select',
						'description' => esc_html__( 'Select the type of cookie/content to display.', 'Avada' ),
						'default'     => 'necessary',
						'choices'     => [
							'necessary'   => esc_html__( 'Necessary Cookies', 'Avada' ),
							'embeds'      => esc_html__( 'Functional Cookies (Third Party Embeds)', 'Avada' ),
							'statistics'  => esc_html__( 'Statistics Cookies (Analytics)', 'Avada' ),
							'tracking'    => esc_html__( 'Marketing Cookies (Advertising & Targeting)', 'Avada' ),
							'custom'      => esc_html__( 'Custom Content', 'Avada' ),
						],
					],
					'title'       => [
						'id'      => 'title',
						'type'    => 'text',
						'label'   => esc_html__( 'Title for the content', 'Avada' ),
						'default' => '',
					],
					'description' => [
						'id'      => 'description',
						'type'    => 'textarea',
						'label'   => esc_html__( 'Description for the content', 'Avada' ),
						'default' => '',
					],
				],
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_button_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],				
			],
			'privacy_bar_show_group_toggle'  => [
				'label'       => esc_html__( 'Group Master Toggle', 'Avada' ),
				'description' => esc_html__( 'Display a master checkbox next to each group title to enable or disable all items in the group at once. The "Necessary" group is excluded.', 'Avada' ),
				'id'          => 'privacy_bar_show_group_toggle',
				'default'     => '0',
				'type'        => 'switch',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],			
			'privacy_bar_show_wp_cookies'    => [
				'label'       => esc_html__( 'List WordPress Necessary Cookies', 'Avada' ),
				'description' => esc_html__( 'Enable to automatically list standard WordPress necessary cookies. If WooCommerce or The Events Calendar are active, their necessary cookies are included automatically. Note: This will only be displayed if a consent category with the "Necessary Cookies" type is present in the Consent Categories above.', 'Avada' ),
				'id'          => 'privacy_bar_show_wp_cookies',
				'default'     => '0',
				'type'        => 'switch',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_necessary_opacity'      => [
				'label'       => esc_html__( 'Necessary Cookies Opacity', 'Avada' ),
				'description' => esc_html__( 'Controls the opacity of necessary cookie items to visually indicate they cannot be toggled off.', 'Avada' ),
				'id'          => 'privacy_necessary_opacity',
				'default'     => '0.7',
				'type'        => 'slider',
				'choices'         => [
					'min'  => '0',
					'max'  => '1',
					'step' => '0.1',
				],
				'css_vars'    => [
					[
						'name' => '--privacy_necessary_opacity',
					],
				],
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],					
					[
						'setting'  => 'privacy_bar_show_wp_cookies',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_bar_show_lifespan'      => [
				'label'       => esc_html__( 'Show Cookie Lifespan', 'Avada' ),
				'description' => esc_html__( 'Whether to display the cookie lifespan next to each consent item.', 'Avada' ),
				'id'          => 'privacy_bar_show_lifespan',
				'default'     => '0',
				'type'        => 'switch',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_bar_show_cookie_desc'   => [
				'label'       => esc_html__( 'Show Cookie Description', 'Avada' ),
				'description' => esc_html__( 'Whether to display the cookie description for each consent item.', 'Avada' ),
				'id'          => 'privacy_bar_show_cookie_desc',
				'default'     => '0',
				'type'        => 'switch',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_bar_desc_toggle'        => [
				'label'       => esc_html__( 'Cookie Description Toggle', 'Avada' ),
				'description' => esc_html__( 'Add a toggle button next to each consent item to expand/collapse its description. Descriptions start collapsed.', 'Avada' ),
				'id'          => 'privacy_bar_desc_toggle',
				'default'     => '0',
				'type'        => 'switch',
				'required'    => [
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_show_cookie_desc',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_bar_section'             => [
				'label' => esc_html__( 'Privacy & Consent Bar', 'Avada' ),
				'id'    => 'privacy_bar_section',
				'icon'  => true,
				'type'  => 'info',
			],
			'privacy_bar'                    => [
				'label'       => esc_html__( 'Privacy & Consent Bar', 'Avada' ),
				'description' => esc_html__( 'Turn on to enable a privacy & consent bar at the bottom of the page.', 'Avada' ),
				'id'          => 'privacy_bar',
				'default'     => '0',
				'type'        => 'switch',
			],
			'privacy_bar_padding'            => [
				'label'       => esc_html__( 'Privacy Bar Expanded Padding', 'Avada' ),
				'description' => esc_html__( 'Controls the top/right/bottom/left paddings of the privacy bar area.', 'Avada' ),
				'id'          => 'privacy_bar_padding',
				'default'     => [
					'top'    => '15px',
					'bottom' => '15px',
					'left'   => '30px',
					'right'  => '30px',
				],
				'choices'     => [
					'top'    => true,
					'bottom' => true,
					'left'   => true,
					'right'  => true,
				],
				'type'        => 'spacing',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'   => '--privacy_bar_padding-top',
						'choice' => 'top',
					],
					[
						'name'   => '--privacy_bar_padding-bottom',
						'choice' => 'bottom',
					],
					[
						'name'   => '--privacy_bar_padding-left',
						'choice' => 'left',
					],
					[
						'name'   => '--privacy_bar_padding-right',
						'choice' => 'right',
					],
				],
			],
			'privacy_bar_bg_color'           => [
				'label'       => esc_html__( 'Privacy Bar Background Color', 'Avada' ),
				'description' => esc_html__( 'Controls the background color for the privacy bar.', 'Avada' ),
				'id'          => 'privacy_bar_bg_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color8)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_bg_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_font_size'          => [
				'label'       => esc_html__( 'Privacy Bar Font Size', 'Avada' ),
				'description' => esc_html__( 'Controls the font size for the privacy bar content.', 'Avada' ),
				'id'          => 'privacy_bar_font_size',
				'default'     => '13px',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', 'em' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name' => '--privacy_bar_font_size',
					],
				],
			],
			'privacy_bar_color'              => [
				'label'       => esc_html__( 'Privacy Bar Text Color', 'Avada' ),
				'description' => esc_html__( 'Controls the text color for the privacy bar content.', 'Avada' ),
				'id'          => 'privacy_bar_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color6)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_link_color'         => [
				'label'       => esc_html__( 'Privacy Bar Link Color', 'Avada' ),
				'description' => esc_html__( 'Controls the link color for the privacy bar.', 'Avada' ),
				'id'          => 'privacy_bar_link_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color2)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_link_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_link_hover_color'   => [
				'label'       => esc_html__( 'Privacy Bar Link Hover Color', 'Avada' ),
				'description' => esc_html__( 'Controls the link hover color for the privacy bar.', 'Avada' ),
				'id'          => 'privacy_bar_link_hover_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color4)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_link_hover_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_text'               => [
				'label'           => esc_html__( 'Privacy Bar Text', 'Avada' ),
				'description'     => esc_html__( 'Enter the text which you want to appear on the privacy bar.', 'Avada' ),
				'id'              => 'privacy_bar_text',
				'default'         => esc_html__( 'This website uses cookies and third party services.', 'Avada' ),
				'type'            => 'textarea',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_button_save'        => [
				'label'       => esc_html__( 'Privacy Bar Primary Button Action', 'Avada' ),
				'description' => esc_html__( '"Dismiss Only" — the button closes the bar without saving any consent; visitors grant consent via placeholders or the details panel. "Save Pre-selected" — the button immediately saves the consent types selected under "Privacy Selected Consent Types". "Save on Change" — the button is hidden until the visitor opens the details panel and changes a checkbox; it then appears as a contextual save action. Note: regardless of this setting, once the settings panel is open the button always saves the current checkbox selection.', 'Avada' ),
				'id'          => 'privacy_bar_button_save',
				'default'     => 'dismiss',
				'type'        => 'radio-buttonset',
				'choices'     => [
					'dismiss'     => esc_html__( 'Dismiss Only', 'Avada' ),
					'save'        => esc_html__( 'Save Pre-selected', 'Avada' ),
					'contextual'  => esc_html__( 'Save on Change', 'Avada' ),
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'output'      => [
					// This is for the avadaPrivacyVars.button var.
					[
						'element'           => 'helperElement',
						'property'          => 'bottom',
						'js_callback'       => [
							'fusionGlobalScriptSet',
							[
								'globalVar' => 'avadaPrivacyVars',
								'id'        => 'button',
								'trigger'   => [ 'fusionPrivacyBar' ],
							],
						],
						'sanitize_callback' => '__return_empty_string',
					],
				],
			],
			'privacy_bar_button_text'        => [
				'label'           => esc_html__( 'Privacy Bar Primary Button Text', 'Avada' ),
				'description'     => esc_html__( 'Controls the text for the primary privacy bar button. With the "Save on Change" action this text is not shown, as the button only appears after a checkbox changes and uses the "Privacy Bar Primary Button Update Text" instead.', 'Avada' ),
				'id'              => 'privacy_bar_button_text',
				'default'         => esc_html__( 'OK', 'Avada' ),
				'type'            => 'text',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_button_save',
						'operator' => '!=',
						'value'    => 'contextual',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_button_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_button_font_size'   => [
				'label'       => esc_html__( 'Privacy Bar Button Font Size', 'Avada' ),
				'description' => esc_html__( 'Controls the font size of the privacy bar buttons. Leave empty to inherit the global button font size.', 'Avada' ),
				'id'          => 'privacy_bar_button_font_size',
				'default'     => '',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', 'em' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name' => '--privacy_bar_button_font_size',
					],
				],
			],
			'privacy_bar_main_layout'        => [
				'label'           => esc_html__( 'Privacy Bar Layout', 'Avada' ),
				'description'     => esc_html__( 'Controls how the message text and action buttons are arranged. "Centered" keeps them together, centered on one row. "Edges" places the text and buttons on one row, pushed to opposite sides. "Stacked" moves the buttons to a centered second row below the message text.', 'Avada' ),
				'id'              => 'privacy_bar_main_layout',
				'default'         => 'centered',
				'type'            => 'radio-buttonset',
				'choices'         => [
					'centered' => esc_html__( 'Centered', 'Avada' ),
					'edges'    => esc_html__( 'Edges', 'Avada' ),
					'stacked'  => esc_html__( 'Stacked', 'Avada' ),
				],
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh so the layout updates live in the customizer.
				'partial_refresh' => [
					'privacy_bar_main_layout_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_main_max_width'     => [
				'label'       => esc_html__( 'Privacy Bar Message Max Width', 'Avada' ),
				'description' => esc_html__( 'Controls the maximum width of the privacy bar\'s main row (the message text and action buttons), centered within the bar. Leave empty for full width. With the "Stacked" layout, this width applies to the message text only.', 'Avada' ),
				'id'          => 'privacy_bar_main_max_width',
				'default'     => '',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', '%', 'vw' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name' => '--privacy_bar_main_max_width',
					],
				],
			],
			'privacy_bar_more'               => [
				'label'           => esc_html__( 'Privacy Bar Settings', 'Avada' ),
				'description'     => esc_html__( 'If enabled, a settings section will be added to show more information and to provide checkboxes for tracking and third party embeds.', 'Avada' ),
				'id'              => 'privacy_bar_more',
				'default'         => '0',
				'type'            => 'switch',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_more_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_more_style'         => [
				'label'           => esc_html__( 'Privacy Bar Settings Style', 'Avada' ),
				'description'     => esc_html__( 'Controls how the settings entry is rendered. "Inline Link" shows it inline within the bar text. "Button" renders it as a button alongside the other action buttons (more visible, recommended for clearer consent UX). "Standalone Link" shows it as a link placed next to the action buttons rather than within the text.', 'Avada' ),
				'id'              => 'privacy_bar_more_style',
				'default'         => 'link',
				'type'            => 'radio-buttonset',
				'choices'         => [
					'link'         => esc_html__( 'Inline Link', 'Avada' ),
					'button'       => esc_html__( 'Button', 'Avada' ),
					'link_buttons' => esc_html__( 'Standalone Link', 'Avada' ),
				],
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_more_style_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_more_text'          => [
				'label'           => esc_html__( 'Privacy Bar Settings Text', 'Avada' ),
				'description'     => esc_html__( 'Controls the link text for the privacy bar settings.', 'Avada' ),
				'id'              => 'privacy_bar_more_text',
				'default'         => esc_html__( 'Settings', 'Avada' ),
				'type'            => 'text',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_more_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_update_text'        => [
				'label'           => esc_html__( 'Privacy Bar Primary Button Update Text', 'Avada' ),
				'description'     => esc_html__( 'Controls the text shown on the primary privacy bar button after a checkbox has changed in the details panel.', 'Avada' ),
				'id'              => 'privacy_bar_update_text',
				'default'         => esc_html__( 'Update Settings', 'Avada' ),
				'type'            => 'text',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_update_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_content_layout'     => [
				'label'       => esc_html__( 'Privacy Bar Content Layout', 'Avada' ),
				'description' => esc_html__( 'Controls the layout for the privacy bar content.', 'Avada' ),
				'id'          => 'privacy_bar_content_layout',
				'default'     => 'columns',
				'type'        => 'radio-buttonset',
				'choices'     => [
					'columns' => esc_html__( 'Columns', 'Avada' ),
					'tabs'    => esc_html__( 'Tabs', 'Avada' ),
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_content_layout' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_content_max_width'     => [
				'label'       => esc_html__( 'Privacy Bar Content Max Width', 'Avada' ),
				'description' => esc_html__( 'Controls the maximum width of the content container.', 'Avada' ),
				'id'          => 'privacy_bar_content_max_width',
				'default'     => '50%',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', '%', 'vw' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name' => '--privacy_bar_content_max_width',
					],
				],
			],
			'privacy_bar_tabs_content_height' => [
				'label'       => esc_html__( 'Privacy Bar Tabs Content Height', 'Avada' ),
				'description' => esc_html__( 'Set a height for the tab content area, that all tabs will share. Content taller than this height will be scrollable. Leave empty to auto-size each tab to its content.', 'Avada' ),
				'id'          => 'privacy_bar_tabs_content_height',
				'default'     => '',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', '%', 'vw' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'tabs',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_tabs_content_height',
						'callback' => [ 'sanitize_dimension' ],
					],
				],
			],
			'privacy_bar_headings_font_size' => [
				'label'       => esc_html__( 'Privacy Bar Heading Font Size', 'Avada' ),
				'description' => esc_html__( 'Controls the font size for the privacy bar heading text.', 'Avada' ),
				'id'          => 'privacy_bar_headings_font_size',
				'default'     => '13px',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', 'em' ],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_headings_font_size',
						'callback' => [ 'sanitize_dimension' ],
					],
				],				
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
			],
			'privacy_bar_headings_color'     => [
				'label'       => esc_html__( 'Privacy Bar Headings Color', 'Avada' ),
				'description' => esc_html__( 'Controls the text color of the privacy bar heading font.', 'Avada' ),
				'id'          => 'privacy_bar_headings_color',
				'default'     => 'var(--awb-color1)',
				'type'        => 'color-alpha',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_headings_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_tabs_border_size'   => [
				'label'       => esc_html__( 'Privacy Bar Tabs Border Size', 'Avada' ),
				'description' => esc_html__( 'Controls the border size for the tabs layout. In Pixels.', 'Avada' ),
				'id'          => 'privacy_bar_tabs_border_size',
				'default'     => '1',
				'type'        => 'slider',
				'choices'     => [
					'min'  => '0',
					'max'  => '10',
					'step' => '1',
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'tabs',
					],
				],
				'css_vars'    => [
					[
						'name'          => '--privacy_bar_tabs_border_size',
						'value_pattern' => '$px',
					],
				],
			],
			'privacy_bar_tabs_border_color'  => [
				'label'       => esc_html__( 'Privacy Bar Tabs Border Color', 'Avada' ),
				'description' => esc_html__( 'Controls the border color for the tabs layout.', 'Avada' ),
				'id'          => 'privacy_bar_tabs_border_color',
				'default'     => 'var(--awb-color6)',
				'type'        => 'color-alpha',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'tabs',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_tabs_border_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_tabs_active_bg_color' => [
				'label'       => esc_html__( 'Privacy Bar Tabs Active Background Color', 'Avada' ),
				'description' => esc_html__( 'Controls the background color of the active tab.', 'Avada' ),
				'id'          => 'privacy_bar_tabs_active_bg_color',
				'default'     => 'var(--awb-color7)',
				'type'        => 'color-alpha',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'tabs',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_tabs_active_bg_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_tabs_content_padding' => [
				'label'       => esc_html__( 'Privacy Bar Tabs Content Padding', 'Avada' ),
				'description' => esc_html__( 'Controls the padding for the tab content area.', 'Avada' ),
				'id'          => 'privacy_bar_tabs_content_padding',
				'default'     => [
					'top'    => '20px',
					'bottom' => '20px',
					'left'   => '20px',
					'right'  => '20px',
				],
				'type'        => 'spacing',
				'choices'     => [
					'top'    => true,
					'bottom' => true,
					'left'   => true,
					'right'  => true,
					'units'  => [ 'px' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'tabs',
					],
				],
				'css_vars'    => [
					[
						'name'   => '--privacy_bar_tabs_padding-top',
						'choice' => 'top',
					],
					[
						'name'   => '--privacy_bar_tabs_padding-bottom',
						'choice' => 'bottom',
					],
					[
						'name'   => '--privacy_bar_tabs_padding-left',
						'choice' => 'left',
					],
					[
						'name'   => '--privacy_bar_tabs_padding-right',
						'choice' => 'right',
					],
				],
			],
			'privacy_bar_column_gap'         => [
				'label'       => esc_html__( 'Privacy Bar Column Gap', 'Avada' ),
				'description' => esc_html__( 'Controls the gap between columns in the privacy bar content.', 'Avada' ),
				'id'          => 'privacy_bar_column_gap',
				'default'     => '30px',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_content_layout',
						'operator' => '==',
						'value'    => 'columns',
					],
				],
				'css_vars'    => [
					[
						'name' => '--privacy_bar_column_gap',
					],
				],
			],
			'privacy_bar_consent_item_style' => [
				'label'           => esc_html__( 'Privacy Bar Consent Item Style', 'Avada' ),
				'description'     => esc_html__( 'Choose between standard checkboxes or slide toggles for the consent items.', 'Avada' ),
				'id'              => 'privacy_bar_consent_item_style',
				'default'         => 'checkbox',
				'type'            => 'radio-buttonset',
				'choices'         => [
					'checkbox' => esc_html__( 'Checkbox', 'Avada' ),
					'toggle'   => esc_html__( 'Toggle', 'Avada' ),
				],
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_consent_item_style_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_toggle_off_color'   => [
				'label'       => esc_html__( 'Privacy Bar Consent Toggle Inactive Color', 'Avada' ),
				'description' => esc_html__( 'Track color when a consent item is disabled.', 'Avada' ),
				'id'          => 'privacy_bar_toggle_off_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color6)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_consent_item_style',
						'operator' => '==',
						'value'    => 'toggle',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_toggle_off_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],			
			'privacy_bar_toggle_on_color'    => [
				'label'       => esc_html__( 'Privacy Bar Consent Toggle Active Color', 'Avada' ),
				'description' => esc_html__( 'Track color when a consent item is enabled.', 'Avada' ),
				'id'          => 'privacy_bar_toggle_on_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color5)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_consent_item_style',
						'operator' => '==',
						'value'    => 'toggle',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_toggle_on_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_toggle_thumb_color' => [
				'label'       => esc_html__( 'Privacy Bar Consent Toggle Thumb Color', 'Avada' ),
				'description' => esc_html__( 'Color of the toggle thumb.', 'Avada' ),
				'id'          => 'privacy_bar_toggle_thumb_color',
				'type'        => 'color-alpha',
				'default'     => 'var(--awb-color3)',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_consent_item_style',
						'operator' => '==',
						'value'    => 'toggle',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_toggle_thumb_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],			
			'privacy_bar_lifespan_color'     => [
				'label'       => esc_html__( 'Privacy Bar Cookie Lifespan Color', 'Avada' ),
				'description' => esc_html__( 'Controls the text color for the cookie lifespan shown next to each consent option. Leave empty to inherit from "Privacy Bar Text Color".', 'Avada' ),
				'id'          => 'privacy_bar_lifespan_color',
				'type'        => 'color-alpha',
				'default'     => '',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_show_lifespan',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_lifespan_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_desc_color'         => [
				'label'       => esc_html__( 'Privacy Bar Cookie Description Color', 'Avada' ),
				'description' => esc_html__( 'Controls the text color for the cookie descriptions shown below each consent option.  Leave empty to inherit from "Privacy Bar Text Color".', 'Avada' ),
				'id'          => 'privacy_bar_desc_color',
				'type'        => 'color-alpha',
				'default'     => '',
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_show_cookie_desc',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_desc_color',
						'callback' => [ 'sanitize_color' ],
					],
				],
			],
			'privacy_bar_desc_font_size'     => [
				'label'       => esc_html__( 'Privacy Bar Cookie Description Font Size', 'Avada' ),
				'description' => esc_html__( 'Controls the font size for the cookie descriptions shown below each consent option.', 'Avada' ),
				'id'          => 'privacy_bar_desc_font_size',
				'default'     => '0.85em',
				'type'        => 'dimension',
				'choices'     => [
					'units' => [ 'px', 'em', 'rem' ],
				],
				'required'    => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_more',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_show_cookie_desc',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'css_vars'    => [
					[
						'name'     => '--privacy_bar_desc_font_size',
						'callback' => [ 'sanitize_dimension' ],
					],
				],
			],
			'privacy_bar_accept_all'         => [
				'label'           => esc_html__( 'Privacy Bar Accept All Button', 'Avada' ),
				'description'     => esc_html__( 'If enabled, the privacy bar will be extended with a button that grants consent for every available type, regardless of which checkboxes the visitor has toggled.', 'Avada' ),
				'id'              => 'privacy_bar_accept_all',
				'default'         => '0',
				'type'            => 'switch',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_accept_all_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_accept_all_text'    => [
				'label'           => esc_html__( 'Privacy Bar Accept All Button Text', 'Avada' ),
				'description'     => esc_html__( 'Controls the link text for the privacy bar accept all button.', 'Avada' ),
				'id'              => 'privacy_bar_accept_all_text',
				'default'         => esc_html__( 'Accept All', 'Avada' ),
				'type'            => 'text',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_accept_all',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				'partial_refresh' => [
					'privacy_bar_accept_all_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_reject'             => [
				'label'           => esc_html__( 'Privacy Bar Reject All Button', 'Avada' ),
				'description'     => esc_html__( 'If enabled, the privacy bar will be extended with a button that allows users to reject all.', 'Avada' ),
				'id'              => 'privacy_bar_reject',
				'default'         => '0',
				'type'            => 'switch',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_reject_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
			'privacy_bar_reject_text'        => [
				'label'           => esc_html__( 'Privacy Bar Reject All Button Text', 'Avada' ),
				'description'     => esc_html__( 'Controls the link text for the privacy bar reject all button.', 'Avada' ),
				'id'              => 'privacy_bar_reject_text',
				'default'         => esc_html__( 'Reject All', 'Avada' ),
				'type'            => 'text',
				'required'        => [
					[
						'setting'  => 'privacy_bar',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_bar_reject',
						'operator' => '==',
						'value'    => '1',
					],
					[
						'setting'  => 'privacy_embeds',
						'operator' => '==',
						'value'    => '1',
					],
				],
				// Partial refresh for the searchform.
				'partial_refresh' => [
					'privacy_bar_reject_text_partial' => [
						'selector'              => '.fusion-privacy-bar.fusion-privacy-bar-bottom',
						'container_inclusive'   => true,
						'render_callback'       => [ 'Avada_Partial_Refresh_Callbacks', 'privacy_bar' ],
						'success_trigger_event' => [ 'fusionPrivacyBar' ],
					],
				],
			],
		],
	];

	return $sections;

}
