<?php
/**
 * Use internal css for theme
 * @since 1.0
 * @package evaWp
 */

function evawp_dynamic_css(){ 
	$header_text_color = get_header_textcolor();
	$primary_color = evawp_customizer_get( 'primary_color', '#ed906f' );
	$secondary_color = evawp_customizer_get( 'secondary_color', '#f40909' );
	?>
	<style type="text/css">
		<?php if(! display_header_text() ): ?>
			.site-title, .site-description,{
				position: absolute;
				clip: rect(1px, 1px, 1px, 1px);
			}
		<?php endif; ?>

		.site-title, .site-title a, .site-description,
		.evawp-site-branding .site-title a{
			color: #<?php echo esc_html( $header_text_color ); ?>;
		}


		i.fas.fa-shopping-cart:hover,
		aside#secondary ul li a:hover,
		.evawp-widget-wrapper ul li a:hover,
		.evawp-footer-area-wrapper .evawp-copyright-area-wrapper .evawp-copyright-area .site-title a,
		.evawp-site-branding .site-title a:hover,
		.evawp-top-wrapper nav > ul > li a:hover,
		.evawp-slider-init .evawp-slider-inner .evawp-slider-content h2 a:hover,
		.evawp-slider-init .evawp-slider-inner .evawp-slider-content span.posted-on a:hover,
		.calendar_wrap span.wp-calendar-nav-prev a,
		#evawp-main-content .evawp-post-meta ul li a:hover,
		#evawp-main-content .evawp-post-meta .posted-on a:hover,
		#evawp-main-content span.evawp-comments a:hover,
		.evawp-slider-init .evawp-slider-inner .evawp-slider-content ul li a:hover,
		.evawp-breadcrumb-wrapper ul li a:hover,
		.evawp-menu-wrapper nav > ul > li .sub-menu li a:hover,
		#evawp-main-content .evawp-post-title a:hover,
		.evawp-menu-wrapper nav > ul > li.current-menu-item a {
			color: <?php echo $primary_color; ?>
		}
		.evawp-search-wrapper .evawp-search-form button.search-submit,
		.evawp-scroll-top,
		#evawp-main-content .evawp-post-title:after,
		#evawp-main-content .evawp-readmore,
		.widget-area .search-form button.search-submit,
		.evawp-archive-pagination-wrapper a, .evawp-archive-pagination-wrapper span,
		.evawp-slider-init ul.slick-dots li.slick-active button, 
		.woocommerce ul.products li.product .button, .woocommerce ul.products li.product .added_to_cart.wc-forward, 
		.evawp_cart-icon span:hover,.widget .tagcloud a,.calendar_wrap tbody tr td#today,
		.evawp-single-page-header .evawp-page-title:after,
		.woocommerce-cart .woocommerce form.woocommerce-cart-form table button.button,
		.woocommerce-cart .woocommerce .cart-collaterals .cart_totals a.checkout-button.button.alt.wc-forward,
		form.woocommerce-checkout div#order_review #payment button#place_order,
		.single-product .product .entry-summary button.button,
		.single-product .product .onsale,
		.woocommerce ul.products li.product .onsale,
		.evawp-comment-wrapper form#commentform input#submit,
		.blog article:after{
			background-color: <?php echo $primary_color; ?>
		}


		.evawp-loader-wrapper .loader {
			border-top-color: <?php echo $primary_color; ?>
		}

		.home #evawp-main-content > .col-12:first-child article {
			border-bottom-color: <?php echo $primary_color; ?>
		}

		#evawp-main-content .evawp-readmore:hover,
		.evawp-scroll-top:hover,
		.evawp-archive-pagination-wrapper a:hover,
		.evawp-archive-pagination-wrapper span:hover,
		.evawp-search-wrapper .evawp-search-form button.search-submit:hover,
		.widget-area .search-form button.search-submit:hover,
		.evawp-archive-pagination-wrapper a:hover, 
		.evawp-archive-pagination-wrapper a.current, 
		.evawp-archive-pagination-wrapper span:hover, 
		.evawp-archive-pagination-wrapper span.current,
		.widget .tagcloud a:hover,
		.woocommerce-cart .woocommerce form.woocommerce-cart-form table button.button:hover,
		.woocommerce-cart .woocommerce .cart-collaterals .cart_totals a.checkout-button.button.alt.wc-forward:hover,
		.single-product .product .entry-summary button.button:hover,
		.woocommerce ul.products li.product .button:hover, .woocommerce ul.products li.product .added_to_cart.wc-forward:hover,
		.evawp-comment-wrapper form#commentform input#submit:hover{
			background-color: <?php echo $secondary_color; ?> 
		}
	</style>
<?php }
add_action( 'wp_head', 'evawp_dynamic_css' );