<?php 

/**
 * Customizer Display
 *
 * @package specter
 */

  function specter_apply_color() {

    if( get_theme_mod('specter_color_settings') ){
      $primary  =   esc_html( get_theme_mod('specter_color_settings') );
    }else{
      $primary  =  '#282e3f';
    }

    if( get_theme_mod('specter_color_settings_2') ){
      $secondary  =   esc_html( get_theme_mod('specter_color_settings_2') );
    }else{
      $secondary  =  '#e0a85d';
    }

    $custom_css = "
        
        #main-navigation ul.navbar-nav > li.active > a,
        .dropdown-menu > .active > a, .dropdown-menu > .active > a:focus, .dropdown-menu > .active > a:hover{
            color: {$secondary};
        }
        .widget #wp-calendar caption,
        footer.footer{
            background: {$primary};
        }
        .nav-desktop{
            background-color: {$primary};
        }
        .comment .comment-reply-link,
        input[type='submit'], button[type='submit'], .btn, .comment .comment-reply-link{
            border: 1px solid {$secondary};
        }
        .page-title-area,#site-header .navbar-default .navbar-toggle,
        .comment .comment-reply-link,
        input[type='submit'], button[type='submit'], .btn, .comment .comment-reply-link,#section-5{
            background: {$secondary};
        }
        #site-header .site-desc,
        a,
        a:hover,
        .tmm .tmm_job{
            color: {$secondary};
        }
        
      ";

    wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '', 'all' );
    wp_enqueue_style( 'specter-main-stylesheet', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all' );
    wp_add_inline_style( 'specter-main-stylesheet', $custom_css );
}

add_action( 'wp_enqueue_scripts', 'specter_apply_color', 999 );