<?php
function menda_custom_css(){

// wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/css/custom_script.css' );
wp_enqueue_style( 'custom-style', get_template_directory_uri() );

$style  ='';

// button 
$style .='.button{color: '.of_get_option('btn_txt_col').'!important;}';
$style .='.button{background: '.of_get_option('btn_bg_col').'!important;}';
$style .='.button{border: 1px solid '.of_get_option('btn_txt_col').'!important;}';
$style .='.button:hover{color: '.of_get_option('btn_hov_txt_col').'!important;}';
$style .='.button:hover{background: '.of_get_option('btn_hov_bg_col').'!important;}';
$style .='.button:hover{box-shadow: 0px 0px 3px 1px '.of_get_option('btn_hov_bg_col').' !important;}';

// .form-submit button 
$style .='.form-submit .submit{color: '.of_get_option('btn_txt_col').'!important;}';
$style .='.form-submit .submit{background: '.of_get_option('btn_bg_col').'!important;}';
$style .='.form-submit .submit{border: 1px solid '.of_get_option('btn_txt_col').'!important;}';
$style .='.form-submit .submit:hover{color: '.of_get_option('btn_hov_txt_col').'!important;}';
$style .='.form-submit .submit:hover{background: '.of_get_option('btn_hov_bg_col').'!important;}';
$style .='.form-submit .submit:hover{box-shadow: 0px 0px 3px 1px '.of_get_option('btn_hov_bg_col').' !important;}';

// button primary
$style .='.button-primary{color: '.of_get_option('primary_btn_txt_col').'!important;}';
$style .='.button-primary{background: '.of_get_option('primary_btn_bg_col').'!important;}';
$style .='.button-primary{border: 1px solid '.of_get_option('primary_btn_hov_txt_col').'!important;}';
$style .='.button-primary:hover{color: '.of_get_option('primary_btn_hov_txt_col').'!important;}';
$style .='.button-primary:hover{background: '.of_get_option('primary_btn_hov_bg_col').'!important;}';
$style .='.button-primary:hover{box-shadow: 0px 0px 3px 1px '.of_get_option('primary_btn_hov_bg_col').' !important;}';

//button secondry
$style .='.button-secondary{color: '.of_get_option('secondary_btn_txt_col').'!important;}';
$style .='.button-secondary{background: '.of_get_option('secondary_btn_bg_col').'!important; border: 1px solid '.of_get_option('secondary_btn_bg_col').'!important;}';
$style .='.button-secondary:hover{color: '.of_get_option('secondary_btn_hov_txt_col').'!important;}';
$style .='.button-secondary:hover{background: '.of_get_option('secondary_btn_hov_bg_col').'!important;}';
$style .='.button-secondary:hover{box-shadow: 0px 0px 3px 1px '.of_get_option('secondary_btn_hov_txt_col').' !important;}';
  
// top header css
$style .='.top-header {background:'.of_get_option('top_header_bg').'!important;}'; 
$style .='.top-header ul li a{color:'.of_get_option('top_header_color').';}';
$style .='.top-header ul li a:hover{color:'.of_get_option('top_header_hover').';}';


// header menu background color One
$style .='#header-default .header-menu-one, .main-navigation ul ul li,.woocommerce div.product .woocommerce-tabs ul.tabs li{background:'.of_get_option('menu_back').'!important;}';
$style .='#header-menu-one .main-navigation a{color:'.of_get_option('menu_color').'!important;}';
$style .='#header-menu-one .main-navigation li:hover > a{color:'.of_get_option('menu_active_color').'!important;}';
$style .='#header-menu-one .main-navigation .current-menu-item > a, .main-navigation .current-menu-ancestor > a, #header-menu-one .main-navigation li:hover > a, .woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:'.of_get_option('menu_active').'!important;}';

// mobile header 
$style .='.menu-toggle .icon-bar{background:'.of_get_option('menu_back').'!important;}';
$style .='.site-header-menu{background:'.of_get_option('menu_back').'!important;}';

// footer
$style .='#footer-main{background:'.of_get_option('footer_bg').'!important}';
$style .='#footer-main h2{color:'.of_get_option('footer_heading').'!important}';
$style .='#footer-main p, .social-icon a, footer ul li a{color:'.of_get_option('footer_text').'!important}';
$style .='.social-icon {border: 1px solid '.of_get_option('footer_text').'!important}';
$style .='.social-icon:hover {border: 1px solid '.of_get_option('footer_text_hover').'!important; background:'.of_get_option('footer_text_hover').'!important;}';
$style .='footer ul li a:hover{color:'.of_get_option('footer_text_hover').'!important}';
$style .='.copyright-section-main{border-top: 2px solid '.of_get_option('footer_text').'!important}';
$style .='footer #footer-main{color:'.of_get_option('footer_text').'!important}';

//woocomerce css
$style .='.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price{color:'.of_get_option('woo_price').'!important}';
$style .='.woocommerce-MyAccount-navigation ul li{background:'.of_get_option('menu_back').'!important}';
$style .='.woocommerce-MyAccount-navigation ul > .is-active{background:'.of_get_option('menu_active').'!important}';
$style .='.woocommerce-MyAccount-navigation ul > .is-active{background:'.of_get_option('menu_active').'!important}';

$style.='.woocommerce nav.woocommerce-pagination ul li span.current{background-color:'.of_get_option('woo_btnbg').'!important; color:'.of_get_option('woo_btntextcolor').'!important}';

$style .='.woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li a:focus{background-color:'.of_get_option('woo_btnhoverbg').'!important; color:'.of_get_option('woo_btntextcolorhover').'!important}';



$style .='.button, button{color:'.of_get_option('woo_btntextcolor').'!important; background:'.of_get_option('woo_btnbg').'!important; }';
$style .='.button:hover, .button:focus, button:hover, button:focus{color:'.of_get_option('woo_btntextcolor').'!important; background:'.of_get_option('woo_btnhoverbg').'!important; }';



$style .='.woocommerce .woocommerce-pagination ul.page-numbers li, .woocommerce-page .woocommerce-pagination ul.page-numbers li{background:'.of_get_option('woo_btnbg').'!important}';
$style .='.woocommerce .woocommerce-pagination ul.page-numbers li, .woocommerce-page .woocommerce-pagination ul.page-numbers li:hover{color:'.of_get_option('woo_btnhoverbg').'!important}';

$style .='.bidding-icon{background:'.of_get_option('woo_btnbg').'!important; color:'.of_get_option('woo_btntextcolor').'!important}';
$style .='.bidding-icon-div .bidding-icon:hover{color:'.of_get_option('woo_btntextcolor').'!important; background:'.of_get_option('woo_btnhoverbg').'!important}';
/*side bar heading*/

// a href link 
 $style .='.sidebar .widget_block ul li a{color:'.of_get_option('hreflinkcolor').'!important;}';
 $style .='.sidebar .widget_block ul li a:hover{color:'.of_get_option('hreflinkcolorhover').'!important;}';

$style .='.sidebar .widget_block .wp-block-heading{background:'.of_get_option('menu_back').'!important}';

// blog title
$style .='.blog-title a{color:'.of_get_option('page_title').'!important}';
$style .='.blog-listing p{color:'.of_get_option('page_content').'!important}';
$style .='.blog-listing p:hover{color:'.of_get_option('hover_content').'!important}';


wp_add_inline_style( 'custom-style', $style );

}
add_action( 'wp_enqueue_scripts', 'menda_custom_css' );