<?php
$blood_donation_campaign_color_scheme_css = '';
$blood_donation_campaign_first_color = get_theme_mod('blood_donation_campaign_first_color');
$blood_donation_campaign_second_color = get_theme_mod('blood_donation_campaign_second_color');

/*------------------ Global First Color -----------*/

if ($blood_donation_campaign_first_color) {
    $blood_donation_campaign_color_scheme_css .= ':root {';
    $blood_donation_campaign_color_scheme_css .= '--first-theme-color: ' . esc_attr($blood_donation_campaign_first_color) . ' !important;';
    $blood_donation_campaign_color_scheme_css .= '} ';
}

/*------------------ Global Second Color -----------*/

if ($blood_donation_campaign_second_color) {
    $blood_donation_campaign_color_scheme_css .= ':root {';
    $blood_donation_campaign_color_scheme_css .= '--second-theme-color: ' . esc_attr($blood_donation_campaign_second_color) . ' !important;';
    $blood_donation_campaign_color_scheme_css .= '} ';
}

//---------------------------------Logo-Max-height--------- 
$blood_donation_campaign_logo_width = get_theme_mod('blood_donation_campaign_logo_width', 200);
if($blood_donation_campaign_logo_width != false){
    $blood_donation_campaign_color_scheme_css .='.logo img{';
      $blood_donation_campaign_color_scheme_css .='width: '.esc_html($blood_donation_campaign_logo_width).'px;';
    $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Woocommerce Product Image Border Radius -------------------*/

$blood_donation_campaign_woo_product_img_border_radius = get_theme_mod('blood_donation_campaign_woo_product_img_border_radius');
if($blood_donation_campaign_woo_product_img_border_radius != false){
    $blood_donation_campaign_color_scheme_css .='.woocommerce-shop.woocommerce .product-content .product-image img{';
    $blood_donation_campaign_color_scheme_css .='border-radius: '.esc_attr($blood_donation_campaign_woo_product_img_border_radius).'px;';
    $blood_donation_campaign_color_scheme_css .='}';
}  

/*--------------------------- Scroll to top positions -------------------*/

$blood_donation_campaign_scroll_position = get_theme_mod( 'blood_donation_campaign_scroll_position','Right');
if($blood_donation_campaign_scroll_position == 'Right'){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .='right: 20px;';
    $blood_donation_campaign_color_scheme_css .='}';
}else if($blood_donation_campaign_scroll_position == 'Left'){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .='left: 20px;';
    $blood_donation_campaign_color_scheme_css .='}';
}else if($blood_donation_campaign_scroll_position == 'Center'){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .='right: 50%;left: 50%;';
    $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Footer background image -------------------*/

$blood_donation_campaign_footer_bg_image = get_theme_mod('blood_donation_campaign_footer_bg_image');
if($blood_donation_campaign_footer_bg_image != false){
    $blood_donation_campaign_color_scheme_css .='#footer{';
        $blood_donation_campaign_color_scheme_css .='background: url('.esc_attr($blood_donation_campaign_footer_bg_image).');';
        $blood_donation_campaign_color_scheme_css .= 'background-size: cover;';  
    $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Footer image position -------------------*/

$blood_donation_campaign_footer_img_position = get_theme_mod('blood_donation_campaign_footer_img_position','center center');
if($blood_donation_campaign_footer_img_position != false){
    $blood_donation_campaign_color_scheme_css .='#footer{';
        $blood_donation_campaign_color_scheme_css .='background-position: '.esc_attr($blood_donation_campaign_footer_img_position).';';
    $blood_donation_campaign_color_scheme_css .='}';
}	

/*--------------------------- Shop page pagination -------------------*/

$blood_donation_campaign_wooproducts_nav = get_theme_mod('blood_donation_campaign_wooproducts_nav', 'Yes');
if($blood_donation_campaign_wooproducts_nav == 'No'){
  $blood_donation_campaign_color_scheme_css .='.woocommerce nav.woocommerce-pagination{';
    $blood_donation_campaign_color_scheme_css .='display: none;';
  $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Related Product -------------------*/

$blood_donation_campaign_related_product_enable = get_theme_mod('blood_donation_campaign_related_product_enable',true);
if($blood_donation_campaign_related_product_enable == false){
  $blood_donation_campaign_color_scheme_css .='.related.products{';
    $blood_donation_campaign_color_scheme_css .='display: none;';
  $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Scroll to Top Button Shape -------------------*/

$blood_donation_campaign_scroll_top_shape = get_theme_mod('blood_donation_campaign_scroll_top_shape', 'circle');
if($blood_donation_campaign_scroll_top_shape == 'box' ){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .=' border-radius: 0%';
    $blood_donation_campaign_color_scheme_css .='}';
}elseif($blood_donation_campaign_scroll_top_shape == 'curved' ){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .=' border-radius: 20%';
    $blood_donation_campaign_color_scheme_css .='}';
}elseif($blood_donation_campaign_scroll_top_shape == 'circle' ){
    $blood_donation_campaign_color_scheme_css .='#button{';
        $blood_donation_campaign_color_scheme_css .=' border-radius: 50%;';
    $blood_donation_campaign_color_scheme_css .='}';
}

/*--------------------------- Menu Typography -------------------*/

$blood_donation_campaign_theme_lay = get_theme_mod( 'blood_donation_campaign_menu_text_transform','Capitalize');
if($blood_donation_campaign_theme_lay == 'Uppercase'){
    $blood_donation_campaign_color_scheme_css .='.main-nav a{';
        $blood_donation_campaign_color_scheme_css .='text-transform: uppercase;';
    $blood_donation_campaign_color_scheme_css .='}';
}else if($blood_donation_campaign_theme_lay == 'Lowercase'){
    $blood_donation_campaign_color_scheme_css .='.main-nav a{';
        $blood_donation_campaign_color_scheme_css .='text-transform: lowercase;';
    $blood_donation_campaign_color_scheme_css .='}';
}
else if($blood_donation_campaign_theme_lay == 'Capitalize'){
    $blood_donation_campaign_color_scheme_css .='.main-nav a{';
        $blood_donation_campaign_color_scheme_css .='text-transform: capitalize;';
    $blood_donation_campaign_color_scheme_css .='}';
}