<?php 

$smallbiz_startup_color_scheme_gradiant1 = get_theme_mod('smallbiz_startup_color_scheme_gradiant1');
$smallbiz_startup_color_scheme_gradiant2 = get_theme_mod('smallbiz_startup_color_scheme_gradiant2');
$smallbiz_startup_color_scheme_css = "";

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

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

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

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

$smallbiz_startup_color_scheme_css .='.contact-us a, .pagemore a, .serv-btn a, .woocommerce ul.products li.product .button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit, #commentform input#submit,nav.woocommerce-MyAccount-navigation ul li,.listarticle, .logo,#sidebar input.search-submit,  #footer input.search-submit, form.woocommerce-product-search button,.img-box, span.color-inner-box img,span.design-box,.thumbbx,span.onsale, .breadcrumb a, .widget_calendar caption, #button, .tagcloud a:hover, .site-main .wp-block-button__link, 
.breadcrumb a, .page-links span, .page-links a, .wc-block-components-totals-coupon__button.contained, .woocommerce button.button.alt, button.wc-block-components-checkout-place-order-button, .postsec-list .search-form input.search-submit, #sidebar .wp-block-search__button, .woocommerce-account .addresses .title .edit, a.wc-block-components-checkout-return-to-cart-button, .woocommerce a.added_to_cart, .wc-block-cart__submit .wc-block-cart__submit-container a  {';
$smallbiz_startup_color_scheme_css .='background-image: linear-gradient(to right, '.esc_attr($smallbiz_startup_color_scheme_gradiant1).' , '.esc_attr($smallbiz_startup_color_scheme_gradiant2).') , linear-gradient(to right, '.esc_attr($smallbiz_startup_color_scheme_gradiant1).' , '.esc_attr($smallbiz_startup_color_scheme_gradiant2).') !important ';
$smallbiz_startup_color_scheme_css .='}';

$smallbiz_startup_color_scheme_css .= '.pagecontent, #commentform input#submit, .pagemore a, nav.woocommerce-MyAccount-navigation ul li, .woocommerce ul.products li.product .button, .woocommerce button.button.alt, .serv-btn a, .woocommerce a.button, .woocommerce a.added_to_cart{';
$smallbiz_startup_color_scheme_css .= 'box-shadow: 0 13px 22px 0px '. esc_attr($smallbiz_startup_color_scheme_gradiant2).' !important';
$smallbiz_startup_color_scheme_css .= '}';

$smallbiz_startup_color_scheme_css .= '.woocommerce-account .addresses .title .edit, .woocommerce button.button {';
$smallbiz_startup_color_scheme_css .= 'box-shadow: 0 0 15px 5px '. esc_attr($smallbiz_startup_color_scheme_gradiant2).' !important';
$smallbiz_startup_color_scheme_css .= '}';

//---------------------------------Logo-Max-height--------- 
$smallbiz_startup_logo_width = get_theme_mod('smallbiz_startup_logo_width');

if($smallbiz_startup_logo_width != false){

  $smallbiz_startup_color_scheme_css .='.logo img{';

    $smallbiz_startup_color_scheme_css .='width: '.esc_html($smallbiz_startup_logo_width).'px;';

  $smallbiz_startup_color_scheme_css .='}';
}


//---------------------------------slider css--------- 
$smallbiz_startup_disabled_pgboxes_1 = get_theme_mod('smallbiz_startup_disabled_pgboxes_1');
  $smallbiz_startup_pageboxes = get_theme_mod('smallbiz_startup_pageboxes');

if($smallbiz_startup_disabled_pgboxes_1 != true || $smallbiz_startup_pageboxes != true){

  $smallbiz_startup_color_scheme_css .='.page-template-template-home-page .header{';

    $smallbiz_startup_color_scheme_css .='position: static;
      padding: 15px 0;
      background: rgb(237, 237, 237);';

  $smallbiz_startup_color_scheme_css .='}';
}

/*---------------------------Slider Height ------------*/

  $smallbiz_startup_slider_img_height = get_theme_mod('smallbiz_startup_slider_img_height');
  if($smallbiz_startup_slider_img_height != false){
      $smallbiz_startup_color_scheme_css .='#head-banner span.color-inner-box img{';
          $smallbiz_startup_color_scheme_css .='height: '.esc_attr($smallbiz_startup_slider_img_height).' !important;';
      $smallbiz_startup_color_scheme_css .='}';
  }

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

  $smallbiz_startup_footer_bg_image = get_theme_mod('smallbiz_startup_footer_bg_image');
  if($smallbiz_startup_footer_bg_image != false){
      $smallbiz_startup_color_scheme_css .='#footer{';
          $smallbiz_startup_color_scheme_css .='background: url('.esc_attr($smallbiz_startup_footer_bg_image).')!important;';
      $smallbiz_startup_color_scheme_css .='}';
  }

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

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

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

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

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

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

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

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

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

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

/*--------------------------- Woocommerce Product Sale Position -------------------*/    

$smallbiz_startup_product_sale_position = get_theme_mod( 'smallbiz_startup_product_sale_position','Left');
if($smallbiz_startup_product_sale_position == 'Right'){
    $smallbiz_startup_color_scheme_css .='.woocommerce ul.products li.product .onsale{';
        $smallbiz_startup_color_scheme_css .='left:auto !important; right:.5em !important;';
    $smallbiz_startup_color_scheme_css .='}';
}else if($smallbiz_startup_product_sale_position == 'Left'){
    $smallbiz_startup_color_scheme_css .='.woocommerce ul.products li.product .onsale {';
        $smallbiz_startup_color_scheme_css .='right:auto !important; left:.5em !important;';
    $smallbiz_startup_color_scheme_css .='}';
} 

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

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