<?php
	
	$optical_glasses_tp_theme_css = '';

	// 1st color
	$optical_glasses_tp_color_option_first = get_theme_mod('optical_glasses_tp_color_option_first', '#373A50');
	if ($optical_glasses_tp_color_option_first) {
		$optical_glasses_tp_theme_css .= ':root {';
		$optical_glasses_tp_theme_css .= '--color-primary1: ' . esc_attr($optical_glasses_tp_color_option_first) . ';';
		$optical_glasses_tp_theme_css .= '}';
	}
	// 2nd color
	$optical_glasses_tp_color_option_sec = get_theme_mod('optical_glasses_tp_color_option_sec', '#F7F9FF');
	if ($optical_glasses_tp_color_option_sec) {
		$optical_glasses_tp_theme_css .= ':root {';
		$optical_glasses_tp_theme_css .= '--color-primary3: ' . esc_attr($optical_glasses_tp_color_option_sec) . ';';
		$optical_glasses_tp_theme_css .= '}';
	}

	// 3rd color
	$optical_glasses_tp_color_option_third = get_theme_mod('optical_glasses_tp_color_option_third', '#008769');
	if ($optical_glasses_tp_color_option_third) {
		$optical_glasses_tp_theme_css .= ':root {';
		$optical_glasses_tp_theme_css .= '--color-primary4: ' . esc_attr($optical_glasses_tp_color_option_third) . ';';
		$optical_glasses_tp_theme_css .= '}';
	}
	
	// preloader
	$optical_glasses_tp_preloader_color1_option = get_theme_mod('optical_glasses_tp_preloader_color1_option');
	if($optical_glasses_tp_preloader_color1_option != false){
	$optical_glasses_tp_theme_css .='.center1{';
		$optical_glasses_tp_theme_css .='border-color: '.esc_attr($optical_glasses_tp_preloader_color1_option).' !important;';
	$optical_glasses_tp_theme_css .='}';
	}
	if($optical_glasses_tp_preloader_color1_option != false){
	$optical_glasses_tp_theme_css .='.center1 .ring::before{';
		$optical_glasses_tp_theme_css .='background: '.esc_attr($optical_glasses_tp_preloader_color1_option).' !important;';
	$optical_glasses_tp_theme_css .='}';
	}

	$optical_glasses_tp_preloader_color2_option = get_theme_mod('optical_glasses_tp_preloader_color2_option');

	if($optical_glasses_tp_preloader_color2_option != false){
	$optical_glasses_tp_theme_css .='.center2{';
		$optical_glasses_tp_theme_css .='border-color: '.esc_attr($optical_glasses_tp_preloader_color2_option).' !important;';
	$optical_glasses_tp_theme_css .='}';
	}
	if($optical_glasses_tp_preloader_color2_option != false){
	$optical_glasses_tp_theme_css .='.center2 .ring::before{';
		$optical_glasses_tp_theme_css .='background: '.esc_attr($optical_glasses_tp_preloader_color2_option).' !important;';
	$optical_glasses_tp_theme_css .='}';
	}

	$optical_glasses_tp_preloader_bg_color_option = get_theme_mod('optical_glasses_tp_preloader_bg_color_option');

	if($optical_glasses_tp_preloader_bg_color_option != false){
	$optical_glasses_tp_theme_css .='.loader{';
		$optical_glasses_tp_theme_css .='background: '.esc_attr($optical_glasses_tp_preloader_bg_color_option).';';
	$optical_glasses_tp_theme_css .='}';
	}

	$optical_glasses_tp_footer_bg_color_option = get_theme_mod('optical_glasses_tp_footer_bg_color_option');


	if($optical_glasses_tp_footer_bg_color_option != false){
	$optical_glasses_tp_theme_css .='#footer{';
		$optical_glasses_tp_theme_css .='background: '.esc_attr($optical_glasses_tp_footer_bg_color_option).';';
	$optical_glasses_tp_theme_css .='}';
	}

	// logo tagline color
	$optical_glasses_site_tagline_color = get_theme_mod('optical_glasses_site_tagline_color');

	if($optical_glasses_site_tagline_color != false){
	$optical_glasses_tp_theme_css .='.logo h1 a, .logo p a, .logo p.site-title a{';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_site_tagline_color).';';
	$optical_glasses_tp_theme_css .='}';
	}

	$optical_glasses_logo_tagline_color = get_theme_mod('optical_glasses_logo_tagline_color');
	if($optical_glasses_logo_tagline_color != false){
	$optical_glasses_tp_theme_css .='p.site-description{';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_logo_tagline_color).';';
	$optical_glasses_tp_theme_css .='}';
	}

	// footer widget title color
	$optical_glasses_footer_widget_title_color = get_theme_mod('optical_glasses_footer_widget_title_color');
	if($optical_glasses_footer_widget_title_color != false){
	$optical_glasses_tp_theme_css .='#footer h3, #footer h2.wp-block-heading{';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_footer_widget_title_color).';';
	$optical_glasses_tp_theme_css .='}';
	}

	// copyright text color
	$optical_glasses_footer_copyright_text_color = get_theme_mod('optical_glasses_footer_copyright_text_color');
	if($optical_glasses_footer_copyright_text_color != false){
	$optical_glasses_tp_theme_css .='#footer .site-info p, #footer .site-info a {';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_footer_copyright_text_color).'!important;';
	$optical_glasses_tp_theme_css .='}';
	}

	// header image title color
	$optical_glasses_header_image_title_text_color = get_theme_mod('optical_glasses_header_image_title_text_color');
	if($optical_glasses_header_image_title_text_color != false){
	$optical_glasses_tp_theme_css .='.box-text h2{';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_header_image_title_text_color).';';
	$optical_glasses_tp_theme_css .='}';
	}

	// menu color
	$optical_glasses_menu_color = get_theme_mod('optical_glasses_menu_color');
	if($optical_glasses_menu_color != false){
	$optical_glasses_tp_theme_css .='.main-navigation a{';
	$optical_glasses_tp_theme_css .='color: '.esc_attr($optical_glasses_menu_color).';';
	$optical_glasses_tp_theme_css .='}';
}