<?php

$creative_blogger_first_color = get_theme_mod('creative_blogger_first_color');
$creative_blogger_second_color = get_theme_mod('creative_blogger_second_color');
$creative_blogger_third_color = get_theme_mod('creative_blogger_third_color');
$creative_blogger_fourth_color = get_theme_mod('creative_blogger_fourth_color');
$creative_blogger_fifth_color = get_theme_mod('creative_blogger_fifth_color');
$creative_blogger_sixth_color = get_theme_mod('creative_blogger_sixth_color');
$creative_blogger_color_scheme_css = '';

/*------------------ Global First Color -----------*/
$creative_blogger_color_scheme_css .='.page-template-template-home-page li.main-nav .current_page_item, .postsec-list .search-form input.search-submit, span.page-numbers.current, .nav-links .page-numbers:hover, .page-links a, .page-links span, .tagcloud a:hover, .copywrap, .breadcrumb a, button.wc-block-components-checkout-place-order-button, button.wc-block-components-checkout-place-order-button, .wc-block-components-totals-coupon__button.contained, #commentform input#submit, nav.woocommerce-MyAccount-navigation ul li, .woocommerce ul.products li.product .button, .woocommerce span.onsale, .woocommerce button.button.alt{';
  $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.postsec-list .wp-block-button__link, .site-main .wp-block-button__link, .tags a, .serach_inner, #button, .topbar, .middle-header .mid-header-img .shop-btn a, .page-template-template-home-page li.main-nav .current_page_item, #sidebar input.search-submit, #footer input.search-submit, form.woocommerce-product-search button, .widget_calendar caption, .widget_calendar caption, #footer input.search-submit, .main-nav li.current_page_item, .widget_calendar #today{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.postsec-list .wp-block-button.is-style-outline a, .page-template-template-home-page .search-box i:hover, .page-template-template-home-page p.site-title a:hover, .page-template-template-home-page h1.site-title a:hover, .main-nav ul ul a:hover, .listarticle h2 a:hover, #sidebar ul li::before, #sidebar .widget a:active, #footer li a:hover, #footer h6, .ftr-4-box h5, #commentform input#submit:hover, #comments a, .added_to_cart, .posted_in a, .onsale, .postmeta a:hover,  .nav-links a, .edit-link a,  #sidebar li a:hover{';
  $creative_blogger_color_scheme_css .='color: '.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.site-main .wp-block-button.is-style-outline a, .postsec-list .wp-block-button.is-style-outline a, .widget .tagcloud a:hover{';
  $creative_blogger_color_scheme_css .='border: 1px solid'.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.main-nav ul.sub-menu li a:focus, .main-nav ul ul a:focus, .serach_inner input[type="submit"]:focus, .postsec-list .search-form input.search-submit, #sidebar input[type="text"], #sidebar input[type="search"], #footer input[type="search"] {';
  $creative_blogger_color_scheme_css .='border: 2px solid'.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.main-nav li ul {';
  $creative_blogger_color_scheme_css .='border-top: 3px solid'.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='#sidebar .widget {';
  $creative_blogger_color_scheme_css .='border-bottom: 3px solid'.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.tagcloud a:hover {';
  $creative_blogger_color_scheme_css .='border-color: '.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='blockquote {';
  $creative_blogger_color_scheme_css .='border-left: 5px solid '.esc_attr($creative_blogger_first_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='
@media screen and (max-width:1000px) {
  .toggle-nav button {';
    $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_first_color).' !important;';
$creative_blogger_color_scheme_css .='} }';  

$creative_blogger_color_scheme_css .='
@media screen and (max-width:767px) {
  .toggle-nav button {';
    $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_first_color).' !important;';
$creative_blogger_color_scheme_css .='} }';  

$creative_blogger_color_scheme_css .='
@media screen and (min-width: 768px) and (max-width: 1000px) {
  .toggle-nav button {';
    $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_first_color).' !important;';
$creative_blogger_color_scheme_css .='} }';  

$creative_blogger_color_scheme_css .='
@media screen and (min-width: 768px) and (max-width: 1000px) {
  .page-template-template-home-page .header .toggle-nav button{';
    $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_first_color).' !important;';
$creative_blogger_color_scheme_css .='} }';  

/*------------------ Global Second Color -----------*/
$creative_blogger_color_scheme_css .='.nav-links .page-numbers,  button.wc-block-components-checkout-place-order-button:hover, .wc-block-components-totals-coupon__button.contained:hover, #commentform input#submit:hover, nav.woocommerce-MyAccount-navigation ul li:hover, .woocommerce ul.products li.product .button:hover, .woocommerce button.button.alt:hover{';
  $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_second_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='h1,h2,h3,h4,h5,h6, .woocommerce-page p, .single-post .entry-content p, p.site-title a, h1.site-title a , .comment-content p, .page-template-template-home-page p.site-title a, .page-template-template-home-page h1.site-title a, .page-header h1, #slider-cat .feature-box .post-title a, #trending_section h3.trending-title, #trending_section .cat-box .articles a, .type-page .entry-content p  {';
  $creative_blogger_color_scheme_css .='color: '.esc_attr($creative_blogger_second_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='.header, .breadcrumb .current-breadcrumb, .header{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_second_color).'!important;';
$creative_blogger_color_scheme_css .='}';

$creative_blogger_color_scheme_css .='
@media screen and (max-width:767px) {
  .page-template-template-home-page .header {';
    $creative_blogger_color_scheme_css .='background-color: '.esc_attr($creative_blogger_second_color).' !important;';
$creative_blogger_color_scheme_css .='} }';  

/*------------------ Global Third Color -----------*/
$creative_blogger_color_scheme_css .='#slider-cat .feature-box:nth-child(2) a.post-categories{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_third_color).'!important;';
$creative_blogger_color_scheme_css .='}';

/*------------------ Global Fourth Color -----------*/
$creative_blogger_color_scheme_css .='#slider-cat .feature-box:nth-child(1) a.post-categories{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_fourth_color).'!important;';
$creative_blogger_color_scheme_css .='}';

/*------------------ Global Fifth Color -----------*/
$creative_blogger_color_scheme_css .='#slider-cat .feature-box:nth-child(3) a.post-categories{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_fifth_color).'!important;';
$creative_blogger_color_scheme_css .='}';

/*------------------ Global Sixth Color -----------*/
$creative_blogger_color_scheme_css .='#slider-cat .imagebox a.post-categories{';
  $creative_blogger_color_scheme_css .='background: '.esc_attr($creative_blogger_sixth_color).'!important;';
$creative_blogger_color_scheme_css .='}';

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

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

  if($creative_blogger_logo_width != false){

    $creative_blogger_color_scheme_css .='.logo img{';

      $creative_blogger_color_scheme_css .='width: '.esc_html($creative_blogger_logo_width).'px;';

    $creative_blogger_color_scheme_css .='}';
  }

// by default header
$creative_blogger_slider = get_theme_mod('creative_blogger_slider');

if($creative_blogger_slider != true){

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

  $creative_blogger_color_scheme_css .='position: static; background-color: #111111;';

$creative_blogger_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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