<?php

$solar_services_first_color = get_theme_mod('solar_services_first_color');
$solar_services_second_color = get_theme_mod('solar_services_second_color');
$solar_services_color_scheme_css = '';

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

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

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

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

// slider hide css
$solar_services_hide_categorysec = get_theme_mod( 'solar_services_hide_categorysec', true);
$solar_services_slidersection = get_theme_mod('solar_services_slidersection');
if($solar_services_hide_categorysec == false || $solar_services_slidersection == false){
$solar_services_color_scheme_css .='.page-template-template-home-page .bhead {';
  $solar_services_color_scheme_css .='position:static !important;';
$solar_services_color_scheme_css .='}';
$solar_services_color_scheme_css .='#feature_box {';
  $solar_services_color_scheme_css .='margin-top:10px;';
$solar_services_color_scheme_css .='}';
}

//---------------------------------logo-Max-height--------- 
$solar_services_logo_width = get_theme_mod('solar_services_logo_width');

if($solar_services_logo_width != false){

$solar_services_color_scheme_css .='.solar-services-logo img{';

  $solar_services_color_scheme_css .='width: '.esc_html($solar_services_logo_width).'px;';

$solar_services_color_scheme_css .='}';
}

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

$solar_services_footer_bg_image = get_theme_mod('solar_services_footer_bg_image');
if($solar_services_footer_bg_image != false){
    $solar_services_color_scheme_css .='.footer-widget{';
        $solar_services_color_scheme_css .='background: url('.esc_attr($solar_services_footer_bg_image).');';
    $solar_services_color_scheme_css .='}';
}

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

$solar_services_footer_img_position = get_theme_mod('solar_services_footer_img_position','center center');
if($solar_services_footer_img_position != false){
    $solar_services_color_scheme_css .='.footer-widget{';
        $solar_services_color_scheme_css .='background-position: '.esc_attr($solar_services_footer_img_position).';';
    $solar_services_color_scheme_css .='}';
}	

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

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

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

$solar_services_woo_product_img_border_radius = get_theme_mod('solar_services_woo_product_img_border_radius');
if($solar_services_woo_product_img_border_radius != false){
    $solar_services_color_scheme_css .='.woocommerce ul.products li.product a img{';
        $solar_services_color_scheme_css .='border-radius: '.esc_attr($solar_services_woo_product_img_border_radius).'px;';
    $solar_services_color_scheme_css .='}';
}

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

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

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

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

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

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