<?php
$robotics_services_color_scheme_css = '';
$robotics_services_first_color = get_theme_mod('robotics_services_first_color');
$robotics_services_second_color = get_theme_mod('robotics_services_second_color');

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

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

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

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

$robotics_services_banner = get_theme_mod('robotics_services_banner', false);
if($robotics_services_banner != true){
    $robotics_services_color_scheme_css .='.page-template-template-home-page .main-header{';
        $robotics_services_color_scheme_css .='position: static; margin-bottom: 20px;';
    $robotics_services_color_scheme_css .='}';
}

//---------------------------------Logo-Max-height--------- 
$robotics_services_logo_width = get_theme_mod('robotics_services_logo_width', 250);
if($robotics_services_logo_width != false){
    $robotics_services_color_scheme_css .='.robotics-services-logo img{';
      $robotics_services_color_scheme_css .='width: '.esc_html($robotics_services_logo_width).'px;';
    $robotics_services_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

/*--------------------------- Blog Post Page Image Box Shadow -------------------*/

$robotics_services_blog_post_page_image_box_shadow = get_theme_mod('robotics_services_blog_post_page_image_box_shadow',0);
if($robotics_services_blog_post_page_image_box_shadow != false){
    $robotics_services_color_scheme_css .='.blog-post img{';
        $robotics_services_color_scheme_css .='box-shadow: '.esc_attr($robotics_services_blog_post_page_image_box_shadow).'px '.esc_attr($robotics_services_blog_post_page_image_box_shadow).'px '.esc_attr($robotics_services_blog_post_page_image_box_shadow).'px #cccccc;';
    $robotics_services_color_scheme_css .='}';
}       

/*--------------------------- Single Post Page Image Box Shadow -------------------*/

$robotics_services_single_post_page_image_box_shadow = get_theme_mod('robotics_services_single_post_page_image_box_shadow',0);
if($robotics_services_single_post_page_image_box_shadow != false){
    $robotics_services_color_scheme_css .='.single-post img{';
        $robotics_services_color_scheme_css .='box-shadow: '.esc_attr($robotics_services_single_post_page_image_box_shadow).'px '.esc_attr($robotics_services_single_post_page_image_box_shadow).'px '.esc_attr($robotics_services_single_post_page_image_box_shadow).'px #cccccc;';
    $robotics_services_color_scheme_css .='}';
}  

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

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

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

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

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

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

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

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

/*--------------------------- Post Layout -------------------*/

$robotics_services_blog_layouts = get_theme_mod('robotics_services_blog_layout_option_setting', 'Left');
if ($robotics_services_blog_layouts == 'Left') {
    $robotics_services_color_scheme_css .= '.postsec-list .listarticle{';
    $robotics_services_color_scheme_css .= 'text-align:left;';
    $robotics_services_color_scheme_css .= '}';
} elseif ($robotics_services_blog_layouts == 'Center') {
    $robotics_services_color_scheme_css .= '.postsec-list .listarticle{';
    $robotics_services_color_scheme_css .= 'text-align:center;';
    $robotics_services_color_scheme_css .= '}';
} elseif ($robotics_services_blog_layouts == 'Right') {
    $robotics_services_color_scheme_css .= '.postsec-list .listarticle{';
    $robotics_services_color_scheme_css .= 'text-align:right;';
    $robotics_services_color_scheme_css .= '}';
}