<?php

$stylish_blog_tp_theme_css = '';

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

// 1st color
$stylish_blog_tp_color_option = get_theme_mod('stylish_blog_tp_color_option', '#473BF0');
if ($stylish_blog_tp_color_option) {
	$stylish_blog_tp_theme_css .= ':root {';
	$stylish_blog_tp_theme_css .= '--color-primary1: ' . esc_attr($stylish_blog_tp_color_option) . ';';
	$stylish_blog_tp_theme_css .= '}';
}

//preloader

$stylish_blog_tp_preloader_color1_option = get_theme_mod('stylish_blog_tp_preloader_color1_option');
$stylish_blog_tp_preloader_color2_option = get_theme_mod('stylish_blog_tp_preloader_color2_option');
$stylish_blog_tp_preloader_bg_color_option = get_theme_mod('stylish_blog_tp_preloader_bg_color_option');

if($stylish_blog_tp_preloader_color1_option != false){
$stylish_blog_tp_theme_css .='.center1{';
	$stylish_blog_tp_theme_css .='border-color: '.esc_attr($stylish_blog_tp_preloader_color1_option).' !important;';
$stylish_blog_tp_theme_css .='}';
}
if($stylish_blog_tp_preloader_color1_option != false){
$stylish_blog_tp_theme_css .='.center1 .ring::before{';
	$stylish_blog_tp_theme_css .='background: '.esc_attr($stylish_blog_tp_preloader_color1_option).' !important;';
$stylish_blog_tp_theme_css .='}';
}
if($stylish_blog_tp_preloader_color2_option != false){
$stylish_blog_tp_theme_css .='.center2{';
	$stylish_blog_tp_theme_css .='border-color: '.esc_attr($stylish_blog_tp_preloader_color2_option).' !important;';
$stylish_blog_tp_theme_css .='}';
}
if($stylish_blog_tp_preloader_color2_option != false){
$stylish_blog_tp_theme_css .='.center2 .ring::before{';
	$stylish_blog_tp_theme_css .='background: '.esc_attr($stylish_blog_tp_preloader_color2_option).' !important;';
$stylish_blog_tp_theme_css .='}';
}
if($stylish_blog_tp_preloader_bg_color_option != false){
$stylish_blog_tp_theme_css .='.loader{';
	$stylish_blog_tp_theme_css .='background: '.esc_attr($stylish_blog_tp_preloader_bg_color_option).';';
$stylish_blog_tp_theme_css .='}';
}

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

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

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

if($stylish_blog_site_tagline_color != false){
$stylish_blog_tp_theme_css .='.logo h1 a, .logo p a{';
$stylish_blog_tp_theme_css .='color: '.esc_attr($stylish_blog_site_tagline_color).';';
$stylish_blog_tp_theme_css .='}';
}

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

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

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

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

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