<?php

if (!function_exists('educacion_mascot_sidebar_padding')) {
	/**
	 * Generate CSS codes for Sidebar Padding
	 */
	function educacion_mascot_sidebar_padding() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-padding';
		$declaration = array();
		$selector = array(
			'.sidebar-area'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		//added padding into the container.
		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-top'] != "" ) {
			$declaration['padding-top'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-top'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-right'] != "" ) {
			$declaration['padding-right'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-right'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-bottom'] != "" ) {
			$declaration['padding-bottom'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-bottom'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-left'] != "" ) {
			$declaration['padding-left'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-left'];
		}
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_padding');
}


if (!function_exists('educacion_mascot_sidebar_bg_color')) {
	/**
	 * Generate CSS codes for Sidebar Background Color
	 */
	function educacion_mascot_sidebar_bg_color() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-bg-color';
		$declaration = array();
		$selector = array(
			'.sidebar-area'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['background-color'] = $educacion_mascot_redux_theme_opt[$var_name];
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_bg_color');
}


if (!function_exists('educacion_mascot_sidebar_text_align')) {
	/**
	 * Generate CSS codes for Sidebar Text Alignment
	 */
	function educacion_mascot_sidebar_text_align() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-text-align';
		$declaration = array();
		$selector = array(
			'.sidebar-area'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['text-align'] = $educacion_mascot_redux_theme_opt[$var_name];
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_text_align');
}





if (!function_exists('educacion_mascot_sidebar_title_padding')) {
	/**
	 * Generate CSS codes for Sidebar Widget Title Padding
	 */
	function educacion_mascot_sidebar_title_padding() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-title-padding';
		$declaration = array();
		$selector = array(
			'.sidebar-area .widget .widget-title'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		//added padding into the container.
		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-top'] != "" ) {
			$declaration['padding-top'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-top'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-right'] != "" ) {
			$declaration['padding-right'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-right'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-bottom'] != "" ) {
			$declaration['padding-bottom'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-bottom'];
		}
		if( $educacion_mascot_redux_theme_opt[$var_name]['padding-left'] != "" ) {
			$declaration['padding-left'] = $educacion_mascot_redux_theme_opt[$var_name]['padding-left'];
		}
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_title_padding');
}


if (!function_exists('educacion_mascot_sidebar_title_bg_color')) {
	/**
	 * Generate CSS codes for Sidebar Widget Title Background Color
	 */
	function educacion_mascot_sidebar_title_bg_color() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-title-bg-color';
		$declaration = array();
		$selector = array(
			'.sidebar-area .widget .widget-title'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['background-color'] = $educacion_mascot_redux_theme_opt[$var_name];
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_title_bg_color');
}


if (!function_exists('educacion_mascot_sidebar_title_text_color')) {
	/**
	 * Generate CSS codes for Sidebar Widget Title Text Color
	 */
	function educacion_mascot_sidebar_title_text_color() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-title-text-color';
		$declaration = array();
		$selector = array(
			'.sidebar-area .widget .widget-title'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['color'] = $educacion_mascot_redux_theme_opt[$var_name];
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_title_text_color');
}


if (!function_exists('educacion_mascot_sidebar_title_font_size')) {
	/**
	 * Generate CSS codes for Sidebar Widget Title Font Size
	 */
	function educacion_mascot_sidebar_title_font_size() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-title-font-size';
		$declaration = array();
		$selector = array(
			'.sidebar-area .widget .widget-title'
		);

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['font-size'] = $educacion_mascot_redux_theme_opt[$var_name] . 'px';
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_title_font_size');
}


if (!function_exists('educacion_mascot_sidebar_title_line_bottom_color')) {
	/**
	 * Generate CSS codes for Sidebar Widget Title Line Bottom Color
	 */
	function educacion_mascot_sidebar_title_line_bottom_color() {
		global $educacion_mascot_redux_theme_opt;
		$var_name = 'sidebar-settings-sidebar-title-line-bottom-color';
		$declaration = array();
		$selector = array(
			'.sidebar-area .widget .widget-title.widget-title-line-bottom:after'
		);

		if( !educacion_mascot_get_redux_option( 'sidebar-settings-sidebar-title-show-line-bottom' ) ) {
			return;
		}

		//if empty then return
		if( !array_key_exists( $var_name, $educacion_mascot_redux_theme_opt ) ) {
			return;
		}

		if( $educacion_mascot_redux_theme_opt[$var_name] == '' ) {
			return;
		}
		
		$declaration['background-color'] = $educacion_mascot_redux_theme_opt[$var_name];
		echo educacion_mascot_dynamic_css_generator($selector, $declaration);
	}
	add_action('educacion_mascot_dynamic_css_generator_action', 'educacion_mascot_sidebar_title_line_bottom_color');
}