<?php

$live_artist_first_color = get_theme_mod('live_artist_first_color');
$live_artist_second_color = get_theme_mod('live_artist_second_color');
$live_artist_color_scheme_css = '';

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

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

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

// Sticky Header
$live_artist_resp_stickyheader = get_theme_mod( 'live_artist_sticky_header',false);
if($live_artist_resp_stickyheader != true){
    $live_artist_color_scheme_css .='.header-fixed{';
        $live_artist_color_scheme_css .='position:static;';
    $live_artist_color_scheme_css .='} ';
}
if($live_artist_resp_stickyheader == true){
    $live_artist_color_scheme_css .='@media screen and (max-width:575px) {';
    $live_artist_color_scheme_css .='.header-fixed{';
        $live_artist_color_scheme_css .='position:fixed;';
    $live_artist_color_scheme_css .='} }';
}else if($live_artist_resp_stickyheader == false){
    $live_artist_color_scheme_css .='@media screen and (max-width:575px){';
    $live_artist_color_scheme_css .='.header-fixed{';
        $live_artist_color_scheme_css .='position:static;';
    $live_artist_color_scheme_css .='} }';
}

$live_artist_banner = get_theme_mod('live_artist_banner', true);
if($live_artist_banner != true){
    $live_artist_color_scheme_css .='.page-template-template-home-page .main-header{';
        $live_artist_color_scheme_css .='position: static;';
    $live_artist_color_scheme_css .='}';
}

//---------------------------------Logo-Max-height--------- 
$live_artist_logo_width = get_theme_mod('live_artist_logo_width');
if($live_artist_logo_width != false){
    $live_artist_color_scheme_css .='.live-artist-logo img{';
      $live_artist_color_scheme_css .='width: '.esc_html($live_artist_logo_width).'px;';
    $live_artist_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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