<?php
$broker_consultants_first_color = get_theme_mod('broker_consultants_first_color');
$broker_consultants_second_color = get_theme_mod('broker_consultants_second_color');
$broker_consultants_third_color = get_theme_mod('broker_consultants_third_color');
$broker_consultants_color_scheme_css = '';

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

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

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

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

/*------------------ Global Third Color -----------*/

if ($broker_consultants_third_color) {
  $broker_consultants_color_scheme_css .= ':root {';
  $broker_consultants_color_scheme_css .= '--third-theme-color: ' . esc_attr($broker_consultants_third_color) . ' !important;';
  $broker_consultants_color_scheme_css .= '} ';
}

$broker_consultants_color_scheme_css .='.slide-btn a, .service-btn a, nav.woocommerce-MyAccount-navigation ul li, .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, a.wc-block-components-totals-coupon-link,a.components-button.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained, a.wc-block-components-checkout-return-to-cart-button,.wc-block-components-totals-coupon__button.contained,button.wc-block-components-checkout-place-order-button, .breadcrumb a, .woocommerce a.button, .woocommerce a.button {';
$broker_consultants_color_scheme_css .= 'background-image: linear-gradient(to right, ' . esc_attr($broker_consultants_first_color) . ', ' . esc_attr($broker_consultants_third_color) . ') !important;';
$broker_consultants_color_scheme_css .= '} ';

// slider hide css
$broker_consultants_slider = get_theme_mod( 'broker_consultants_slider', true);
if($broker_consultants_slider != true){
$broker_consultants_color_scheme_css .='.page-template-template-home-page .header{';
  $broker_consultants_color_scheme_css .='position:static;';
$broker_consultants_color_scheme_css .='}';
$broker_consultants_color_scheme_css .='.page-template-template-home-page p.site-title a, .page-template-template-home-page span.site-description, .page-template-template-home-page .main-nav a{';
  $broker_consultants_color_scheme_css .='color:var(--second-theme-color);';
$broker_consultants_color_scheme_css .='}';
}

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

if($broker_consultants_logo_width != false){

$broker_consultants_color_scheme_css .='.broker-consultants-logo img{';

    $broker_consultants_color_scheme_css .='width: '.esc_html($broker_consultants_logo_width).'px;';

$broker_consultants_color_scheme_css .='}';
}

// slider users
$broker_consultants_satisfied_number = get_theme_mod('broker_consultants_satisfied_number');

if($broker_consultants_satisfied_number != true){

$broker_consultants_color_scheme_css .='.slider-users{';

  $broker_consultants_color_scheme_css .='padding:0; background:none;';

$broker_consultants_color_scheme_css .='}';
}

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

$broker_consultants_slider_img_height = get_theme_mod('broker_consultants_slider_img_height');
if($broker_consultants_slider_img_height != false){
    $broker_consultants_color_scheme_css .='.imagebox img{';
        $broker_consultants_color_scheme_css .='height: '.esc_attr($broker_consultants_slider_img_height).' !important;';
    $broker_consultants_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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