<?php
/**
 * enlightme Pro: Color Patterns
 *
 * @package WordPress
 * @subpackage enlightme Pro
 * @since 1.0
 */

/**
 * Generate the CSS for the current custom color scheme.
 */
function enlightme_pro_custom_colors_css() {
  	$options= enlightme_pro_get_theme_options();

	$color_value = $options['colorscheme_hue'];
	
	$css = '
	.backtotop,
	#top-bar,
	.pagination .page-numbers.dots:hover,
	.pagination .page-numbers.dots:focus,
	form.search-form button.search-submit,
	input[type="submit"],
	.reply a,
	.main-navigation ul ul a:hover, 
	.main-navigation ul ul a:focus,
	.btn,
	.slick-dots li.slick-active button, 
	.slick-dots li button:hover, 
	.slick-dots li button:focus,
	.slick-prev:hover, 
	.slick-next:hover, 
	.slick-prev:focus, 
	.slick-next:focus,
	#testimonial-section article:hover .testimonial-item,
	#testimonial-section article:focus .testimonial-item,
	#subscribe-now #subscribe-submit button[type="submit"]:hover, 
	#subscribe-now #subscribe-submit button[type="submit"]:focus,
	.team-item-wrapper .read-more .btn:hover, 
	.team-item-wrapper .read-more .btn:focus,
	#feature .btn:hover, #feature .btn:focus,
	.pagination .page-numbers.current, 
	.pagination .page-numbers:hover, 
	.pagination .page-numbers:focus,
	.woocommerce ul.products li.product .onsale, 
	.woocommerce span.onsale,
	.woocommerce #respond input#submit, 
	.woocommerce a.button, 
	.woocommerce button.button, 
	.woocommerce input.button,
	#blog-popular-posts .cat-links a,
	#blog-latest-posts .cat-links a,
	#service-section .icon-container a,
	ul.filter-tabs li.active a, 
	ul.filter-tabs li a:hover, 
	ul.filter-tabs li a:focus,
	.team-item-wrapper .overlay { 
			background-color: ' . esc_attr($color_value) . '; 
		}';

	$css .= '
	button:hover,
	input[type="button"]:hover,
	input[type="reset"]:hover,
	input[type="submit"]:hover,
	button:focus,
	input[type="button"]:focus,
	input[type="reset"]:focus,
	input[type="submit"]:focus,
	button:active,
	input[type="button"]:active,
	input[type="reset"]:active,
	input[type="submit"]:active,
	a,
	.site-title a:hover,
	.site-title a:focus,
	.site-description,
	.main-navigation a:hover, 
	.main-navigation a:focus, 
	.main-navigation ul.nav-menu > li > a:hover, 
	.main-navigation ul.nav-menu > li > a:focus,
	.navigation.post-navigation a:hover,
	.navigation.posts-navigation a:hover,
	.navigation.post-navigation a:focus,
	.navigation.posts-navigation a:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	#secondary .cat-links a,
	#secondary a:hover,
	#secondary a:focus,
	.reply a:hover,
	.reply a:focus,
	.comment-meta .url:hover,
	.comment-meta .url:focus,
	.comment-metadata a:hover time,
	.comment-metadata a:focus time,
	.single-wrapper .entry-meta span a:hover, 
	.single-wrapper .entry-meta span a:focus,
	.single-wrapper .cat-links a,
	.single-wrapper .entry-meta span.byline a.fn:hover,
	.single-wrapper .entry-meta span.byline a.fn:focus,
	.single-wrapper .entry-meta > span a:hover,
	.single-wrapper .entry-meta > span a:focus,
	.featured-content-wrapper .entry-title a:hover, 
	.featured-content-wrapper .entry-title a:focus,
	#services article .entry-title a,
	#services article .entry-container span,
	.section-title a:hover, 
	.section-title a:focus,
	.filtering-posts .entry-title a:hover, 
	.filtering-posts .entry-title a:focus,
	.featured-content-wrapper span,
	.section-subtitle,
	.filtering-posts  .courses a:hover span,
	.filtering-posts .courses a:focus span,
	#testimonial-section .testimonial-position,
	ul.post-categories li a,
	.entry-title a:hover,
	.entry-title a:focus,
	.posted-on a:hover, 
	.posted-on a:focus, 
	#secondary .posted-on a:hover, 
	#secondary .posted-on a:focus,
	.post-wrapper .entry-meta .cat-links a,
	.team-item-wrapper .read-more .btn,
	#team-section .team-position,
	#colophon a:hover, 
	#colophon a:focus,
	#secondary .cat-links a, 
	#secondary ul li a:hover, 
	#secondary ul li a:focus,
	#colophon .site-info a:hover, 
	#colophon .site-info a:focus,
	.woocommerce ul.products li.product .price,
	#blog-latest-posts .entry-title a:hover, 
	#blog-latest-posts .entry-title a:focus,
	#blog-featured-posts .entry-title a:hover,
	#blog-featured-posts .entry-title a:focus {
		color: ' . esc_attr($color_value) . '; 
	}

	#subscribe-now #subscribe-submit button[type="submit"]:hover,
	#subscribe-now #subscribe-submit button[type="submit"]:focus,
	#respond input#submit,
	ul.filter-tabs li.active a,
	 ul.filter-tabs li a:hover, 
	 ul.filter-tabs li a:focus {
	    color: #fff;
	}

	.post-wrapper .entry-meta ul.post-categories li a:hover, 
	.post-wrapper .entry-meta ul.post-categories li a:focus {
	    color: #111;
	}';

	$css .= '
	.main-navigation ul#primary-menu li:hover > svg,
	.main-navigation ul#primary-menu li:focus > svg,
	.main-navigation li.menu-item-has-children:hover > a > svg,
	.main-navigation li.menu-item-has-children > a:hover > svg,
	.main-navigation li.menu-item-has-children > a:focus > svg,
	.main-navigation ul#primary-menu > li.current-menu-item > a > svg,
	.main-navigation li.search-menu a:hover svg,
	.main-navigation li.search-menu a.search-active:hover svg,
	.main-navigation ul#primary-menu li.search-menu:hover > a.search-active svg,
	.navigation.post-navigation a:hover svg,
	.navigation.posts-navigation a:hover svg,
	.navigation.post-navigation a:focus svg,
	.navigation.posts-navigation a:focus svg,
	.loader-container svg,
	.filtering-posts  .courses a:hover svg,
	.filtering-posts .courses a:focus svg { 
		fill: ' . esc_attr($color_value) . '; 
	}';

	$css .= '
	.btn,
	.btn:hover, 
	.btn:focus,
	#services article .entry-container span,
	.slick-prev:hover, 
	.slick-next:hover, 
	.slick-prev:focus, 
	.slick-next:focus,
	button, 
	input[type="button"], 
	input[type="reset"], 
	input[type="submit"],
	#subscribe-now #subscribe-submit button[type="submit"]:hover, 
	#subscribe-now #subscribe-submit button[type="submit"]:focus,
	#feature .btn,
	#feature .btn:hover, 
	#feature .btn:focus,
	.pagination .page-numbers.current, 
	.pagination .page-numbers:hover, 
	.pagination .page-numbers:focus,
	.medical-featured-item .entry-header,
	ul.filter-tabs li.active a, 
	ul.filter-tabs li a:hover,
	ul.filter-tabs li a:focus { 
		border-color: ' . esc_attr($color_value) . '; 
	}

	@media screen and (min-width: 1024px) {
	   .main-navigation ul.nav-menu > li.current-menu-item > a, 
	   .main-navigation ul.nav-menu > li:hover > a, 
	   .main-navigation ul.nav-menu > li:focus > a {
	        color: ' . esc_attr($color_value) . ';
	    }
	    .main-navigation ul ul li.menu-item-has-children:hover > a > svg, 
	    .main-navigation ul ul li.menu-item-has-children > a:hover > svg {
	        fill: ' . esc_attr($color_value) . ';
	    }
	}';

	$css .= '
	@keyframes preloader {
	    0% {height:5px;transform:translateY(0px);background: ' . esc_attr($color_value) . ';}
	    25% {height:30px;transform:translateY(15px);background: ' . esc_attr($color_value) . ';}
	    50% {height:5px;transform:translateY(0px);background: ' . esc_attr($color_value) . ';}
	    100% {height:5px;transform:translateY(0px);background: ' . esc_attr($color_value) . ';}
	}';

	/**
	 * Filters enlightme Pro custom colors CSS.
	 *
	 * @since enlightme Pro 1.0.0
	 *
	 * @param string $css        Base theme colors CSS.
	 */
	return apply_filters( 'enlightme_pro_custom_colors_css', $css );
}
