<?php

$cinematic_photographer_tp_theme_css = '';

//theme-color
$cinematic_photographer_tp_color_option = get_theme_mod('cinematic_photographer_tp_color_option');

// 1st color
$cinematic_photographer_tp_color_option = get_theme_mod('cinematic_photographer_tp_color_option', '#ba3c9e');
if ($cinematic_photographer_tp_color_option) {
	$cinematic_photographer_tp_theme_css .= ':root {';
	$cinematic_photographer_tp_theme_css .= '--color-primary1: ' . esc_attr($cinematic_photographer_tp_color_option) . ';';
	$cinematic_photographer_tp_theme_css .= '}';
}

// 2nd color
$cinematic_photographer_tp_color_option_second = get_theme_mod('cinematic_photographer_tp_color_option_second', '#ef774c');
if ($cinematic_photographer_tp_color_option_second) {
	$cinematic_photographer_tp_theme_css .= ':root {';
	$cinematic_photographer_tp_theme_css .= '--color-primary2: ' . esc_attr($cinematic_photographer_tp_color_option_second) . ';';
	$cinematic_photographer_tp_theme_css .= '}';
}

//preloader//

$cinematic_photographer_tp_preloader_color1_option = get_theme_mod('cinematic_photographer_tp_preloader_color1_option');
$cinematic_photographer_tp_preloader_color2_option = get_theme_mod('cinematic_photographer_tp_preloader_color2_option');
$cinematic_photographer_tp_preloader_bg_option = get_theme_mod('cinematic_photographer_tp_preloader_bg_option');


if($cinematic_photographer_tp_preloader_color1_option != false){
$cinematic_photographer_tp_theme_css .='.center1{';
	$cinematic_photographer_tp_theme_css .='border-color: '.esc_attr($cinematic_photographer_tp_preloader_color1_option).' !important;';
$cinematic_photographer_tp_theme_css .='}';
}
if($cinematic_photographer_tp_preloader_color1_option != false){
$cinematic_photographer_tp_theme_css .='.center1 .ring::before{';
	$cinematic_photographer_tp_theme_css .='background: '.esc_attr($cinematic_photographer_tp_preloader_color1_option).' !important;';
$cinematic_photographer_tp_theme_css .='}';
}
if($cinematic_photographer_tp_preloader_color2_option != false){
$cinematic_photographer_tp_theme_css .='.center2{';
	$cinematic_photographer_tp_theme_css .='border-color: '.esc_attr($cinematic_photographer_tp_preloader_color2_option).' !important;';
$cinematic_photographer_tp_theme_css .='}';
}
if($cinematic_photographer_tp_preloader_color2_option != false){
$cinematic_photographer_tp_theme_css .='.center2 .ring::before{';
	$cinematic_photographer_tp_theme_css .='background: '.esc_attr($cinematic_photographer_tp_preloader_color2_option).' !important;';
$cinematic_photographer_tp_theme_css .='}';
}
if($cinematic_photographer_tp_preloader_bg_option != false){
$cinematic_photographer_tp_theme_css .='.loader{';
	$cinematic_photographer_tp_theme_css .='background: '.esc_attr($cinematic_photographer_tp_preloader_bg_option).';';
$cinematic_photographer_tp_theme_css .='}';
}

// footer-bg-color
$cinematic_photographer_tp_footer_bg_color_option = get_theme_mod('cinematic_photographer_tp_footer_bg_color_option');

if($cinematic_photographer_tp_footer_bg_color_option != false){
$cinematic_photographer_tp_theme_css .='#footer{';
	$cinematic_photographer_tp_theme_css .='background: '.esc_attr($cinematic_photographer_tp_footer_bg_color_option).' !important;';
$cinematic_photographer_tp_theme_css .='}';
}

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

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

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

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

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

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

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