<?php

$classic_events_first_color = get_theme_mod('classic_events_first_color');
$classic_events_second_color = get_theme_mod('classic_events_second_color');
$classic_events_color_scheme_css = '';

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

if ($classic_events_first_color) {
  $classic_events_color_scheme_css .= ':root {';
  $classic_events_color_scheme_css .= '--first-theme-color: ' . esc_attr($classic_events_first_color) . ';';
  $classic_events_color_scheme_css .= '} ';
}

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

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

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

  if($classic_events_logo_width != false){

    $classic_events_color_scheme_css .='.classic-events-logo img{';

      $classic_events_color_scheme_css .='width: '.esc_html($classic_events_logo_width).'px;';

    $classic_events_color_scheme_css .='}';
  }

  // slider hide css
  $classic_events_slider = get_theme_mod( 'classic_events_slider', true);
    $classic_events_catData = get_theme_mod('classic_events_slider_cat');
  if($classic_events_slider != true || $classic_events_catData != true){
    $classic_events_color_scheme_css .='.page-template-template-home-page .mainhead{';
      $classic_events_color_scheme_css .='position:static; background-color: var(--first-theme-color);';
    $classic_events_color_scheme_css .='}';
    $classic_events_color_scheme_css .='.page-template-template-home-page .main-nav a:hover{';
      $classic_events_color_scheme_css .='color:#fff;';
    $classic_events_color_scheme_css .='}';
    $classic_events_color_scheme_css .='.page-template-template-home-page .main-nav ul ul a:hover{';
      $classic_events_color_scheme_css .='color:var(--first-theme-color);';
    $classic_events_color_scheme_css .='}';
    $classic_events_color_scheme_css .='.page-template-template-home-page .contact-us a{';
      $classic_events_color_scheme_css .='background-color: #fff; color: var(--first-theme-color);';
    $classic_events_color_scheme_css .='}';
    $classic_events_color_scheme_css .='.page-template-template-home-page .contact-us a:hover{';
      $classic_events_color_scheme_css .='background-color: #000; color: #fff;';
    $classic_events_color_scheme_css .='}';
  }

  // slider and about
    
    $classic_events_hidepageboxes = get_theme_mod('classic_events_disabled_pgboxes', true);
    if( $classic_events_slider != true && $classic_events_hidepageboxes != true){
      $classic_events_color_scheme_css .='.page-template-template-home-page .logo:after{';
      $classic_events_color_scheme_css .='content:none !important;';
    $classic_events_color_scheme_css .='}';
  }

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

    $classic_events_slider_img_height = get_theme_mod('classic_events_slider_img_height');
    if($classic_events_slider_img_height != false){
        $classic_events_color_scheme_css .='#slider-cat{';
            $classic_events_color_scheme_css .='height: '.esc_attr($classic_events_slider_img_height).' !important;';
        $classic_events_color_scheme_css .='}';
    }

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

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

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

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

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

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

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

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

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

    $classic_events_product_sale_position = get_theme_mod( 'classic_events_product_sale_position','Left');
    if($classic_events_product_sale_position == 'Right'){
        $classic_events_color_scheme_css .='.woocommerce ul.products li.product .onsale{';
            $classic_events_color_scheme_css .='left:auto; right:0;';
        $classic_events_color_scheme_css .='}';
    }else if($classic_events_product_sale_position == 'Left'){
        $classic_events_color_scheme_css .='.woocommerce ul.products li.product .onsale {';
            $classic_events_color_scheme_css .='right:auto; left:0;';
        $classic_events_color_scheme_css .='}';
    }    

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

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

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

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

    /*--------------------------- Slider Bg Image --------------------*/
    $classic_events_slider_background_image_sec = get_theme_mod('classic_events_slider_background_image_sec');
    if($classic_events_slider_background_image_sec != false){
      $classic_events_color_scheme_css .='#slider-cat{';
        $classic_events_color_scheme_css .='background: url('.esc_attr($classic_events_slider_background_image_sec).'); background-size: cover;';
      $classic_events_color_scheme_css .='}';
    }

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

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

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

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

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

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