<?php
// Customizer CSS
add_action( 'wp_head', 'marlin_lite_customizer_css' );
function marlin_lite_customizer_css() {

	// Color Scheme
	$color_scheme = esc_html(get_theme_mod('marlin_lite_color_scheme'));
	$top_bar_bg_color = esc_html(get_theme_mod('marlin_lite_topbar_bg_color')); //Top Bar Background Color
	$top_bar_menu_color = esc_html(get_theme_mod('marlin_lite_topbar_menu_color')); //Top Bar Menu Color
	$nav_bg_color = esc_html(get_theme_mod('marlin_lite_nav_bg_color')); //Nav Background Color
	$menu_link_color = esc_html(get_theme_mod('marlin_lite_nav_link_color')); //Menu Link Color
	$menu_link_hover_color = esc_html(get_theme_mod('marlin_lite_nav_link_hover_color')); // Menu Nav Color
	
?>
    <style type="text/css">
        <?php if ( get_theme_mod('marlin_lite_color_scheme') ) : ?>
            a {
                color: <?php echo $color_scheme; ?>;
            }
            a:hover, a:focus {
                color: <?php echo $color_scheme; ?>;
            }
			.topbar-menu li a:hover, .topbar .social a:hover {
                color: <?php echo $color_scheme; ?>;
            }
            .marlin-thumbnail .marlin-categories:hover {
                color: <?php echo $color_scheme; ?>;
            }
            .post a:hover {
                color: <?php echo $color_scheme; ?>;
            }
            .post .entry-meta .socials li a:hover {
                color: <?php echo $color_scheme; ?>;
            }
            .post .link-more:hover {
                color: <?php echo $color_scheme; ?>;
            }
			#content article .link-more:hover {
                color: <?php echo $color_scheme; ?>;
            }
            .widget a:hover, .latest-post .post-item-text h4 a:hover,
			.widget_categories ul li a:hover {
                color: <?php echo $color_scheme; ?>;
            }
			button:hover, input[type="button"]:hover,
			input[type="reset"]:hover,
			input[type="submit"]:hover {
				color: <?php echo $color_scheme; ?>;
            }
            .single-post-footer .social-share a:hover,
			.about-social a:hover {
				background-color: <?php echo $color_scheme; ?>;
				color: #fff !important;
            }
			.pagination .nav-links span {
				background:  <?php echo $color_scheme; ?>;
			}
        <?php endif; ?>

		<?php if ( get_theme_mod('marlin_lite_topbar_bg_color') ) : ?>
			.topbar { 
				background: <?php echo $top_bar_bg_color; ?>;
			}
		<?php endif; ?>
		
		<?php if ( get_theme_mod('marlin_lite_topbar_menu_color') ) : ?>
			.topbar-menu li a, .topbar .social a { 
				color: <?php echo $top_bar_menu_color; ?>;
			}
		<?php endif; ?>
		
		<?php if ( get_theme_mod('marlin_lite_nav_bg_color') ) : ?>
			#nav-wrapper, #nav-wrapper .sub-menu { 
				background: <?php echo $nav_bg_color; ?>;
			}
		<?php endif; ?>
			
		<?php if ( get_theme_mod('marlin_lite_nav_bg_color') ) : ?>
			.main-navigation ul ul, .main-navigation li {
				background-color: <?php echo $nav_bg_color; ?>;
			}
			@media (max-width: 985px) {
				#nav-wrapper .vtmenu li a:hover {
					background: <?php echo $nav_bg_color; ?>;
				}
			}
		<?php endif; ?>
	
		<?php if ( get_theme_mod('marlin_lite_nav_link_color') ) : ?>
			@media (min-width: 985px) {
				#nav-wrapper .vtmenu a,
				#nav-wrapper .vtmenu .current-menu-item > a { 
					color: <?php echo $menu_link_color; ?>;
				}
			}	
		<?php endif; ?>
		
		<?php if ( get_theme_mod('marlin_lite_nav_link_hover_color') ) : ?>
			#nav-wrapper .vtmenu a:hover { 
				color: <?php echo $menu_link_hover_color; ?>;
			}
			#nav-wrapper .sub-menu li:hover{ 
				background: <?php echo $menu_link_hover_bg; ?>;
			}
			@media (max-width: 985px) {
				#nav-wrapper .vtmenu .dropdown-toggle:hover .caret::after  {
					color: <?php echo $menu_link_hover_color; ?>;
				}
			}
		<?php endif; ?>
	
    </style>
	
    <?php
}