<?php
$roofing_installation_color_scheme_css = '';
$roofing_installation_first_color = get_theme_mod('roofing_installation_first_color');

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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