<?php 

// Fetching theme mod settings
$classic_kindergarten_color_scheme_one = get_theme_mod('classic_kindergarten_color_scheme_one');
$classic_kindergarten_color_scheme_two = get_theme_mod('classic_kindergarten_color_scheme_two');
$classic_kindergarten_color_scheme_three = get_theme_mod('classic_kindergarten_color_scheme_three');
$classic_kindergarten_color_scheme_four = get_theme_mod('classic_kindergarten_color_scheme_four');
$classic_kindergarten_color_scheme_css = "";

/*------------------ Global First Color -----------*/

if ($classic_kindergarten_color_scheme_one) {
  $classic_kindergarten_color_scheme_css .= ':root {';
  $classic_kindergarten_color_scheme_css .= '--first-theme-color: ' . esc_attr($classic_kindergarten_color_scheme_one) . ' !important;';
  $classic_kindergarten_color_scheme_css .= '} ';
}

/*------------------ Global Second Color -----------*/

if ($classic_kindergarten_color_scheme_two) {
  $classic_kindergarten_color_scheme_css .= ':root {';
  $classic_kindergarten_color_scheme_css .= '--second-theme-color: ' . esc_attr($classic_kindergarten_color_scheme_two) . ' !important;';
  $classic_kindergarten_color_scheme_css .= '} ';
} 
  
/*------------------ Global Third Color -----------*/

if ($classic_kindergarten_color_scheme_three) {
  $classic_kindergarten_color_scheme_css .= ':root {';
  $classic_kindergarten_color_scheme_css .= '--third-theme-color: ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
  $classic_kindergarten_color_scheme_css .= '} ';
} 

/*------------------ Global Fourth Color -----------*/

if ($classic_kindergarten_color_scheme_four) {
  $classic_kindergarten_color_scheme_css .= ':root {';
  $classic_kindergarten_color_scheme_css .= '--fourth-theme-color: ' . esc_attr($classic_kindergarten_color_scheme_four) . ' !important;';
  $classic_kindergarten_color_scheme_css .= '} ';
} 

// Slider hide CSS
$kindergarten_school_slider_cat = get_theme_mod('kindergarten_school_slider_cat', false);
if ($kindergarten_school_slider_cat != true) {
    $classic_kindergarten_color_scheme_css .= '.page-template-template-home-page .header {';
    $classic_kindergarten_color_scheme_css .= 'position: static; background-color: var(--fourth-theme-color) !important;';
    $classic_kindergarten_color_scheme_css .= '}';
    
    $classic_kindergarten_color_scheme_css .= '#slider-cat {';
    $classic_kindergarten_color_scheme_css .= 'background-image: none;';
    $classic_kindergarten_color_scheme_css .= '}';
    
    $classic_kindergarten_color_scheme_css .= '.main-nav .current-menu-item a, .sidenav .close-button, .main-nav .sub-menu a, .page-template-template-home-page .main-nav ul li a, .page-template-template-home-page .logo a, .page-template-template-home-page .logo h1 a, .site-branding-text span, .page-template-template-home-page .top-header span, .top-header span i, .page-template-template-home-page .social-media-box a {';
    $classic_kindergarten_color_scheme_css .= 'color: #fff !important;';
    $classic_kindergarten_color_scheme_css .= '}';
}

// Borders and Hover Effects
$classic_kindergarten_color_scheme_css .= 'nav.woocommerce-MyAccount-navigation ul li, #sidebar .widget, #sidebar input[type="text"], #sidebar input[type="search"], #footer input[type="search"], .tagcloud a:hover {';
$classic_kindergarten_color_scheme_css .= 'border-color: ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
$classic_kindergarten_color_scheme_css .= '}';

$classic_kindergarten_color_scheme_css .= '.breadcrumb .current-breadcrumb, .breadcrumb a:hover, #commentform input#submit:hover, a.added_to_cart, .woocommerce span.onsale, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, nav.woocommerce-MyAccount-navigation ul li, .tagcloud a:hover, .widget_calendar caption, .widget_calendar #today, #sidebar input.search-submit, #footer input.search-submit, form.woocommerce-product-search button, #button, span.page-numbers.current, .nav-links .page-numbers:hover, button.wc-block-components-checkout-place-order-button:hover, a.wc-block-components-totals-coupon-link:hover, a.components-button.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained:hover, a.wc-block-components-checkout-return-to-cart-button:hover, .page-links a, .page-links span, .site-main .wp-block-button__link, .postsec-list .wp-block-button__link, .site-main .wp-block-button__link, .postsec-list .wp-block-button__link, input.search-submit  {';
$classic_kindergarten_color_scheme_css .= 'background-color: ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
$classic_kindergarten_color_scheme_css .= '}';

$classic_kindergarten_color_scheme_css .= '.main-nav li ul {';
$classic_kindergarten_color_scheme_css .= 'border-top-color: ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
$classic_kindergarten_color_scheme_css .= '}';

$classic_kindergarten_color_scheme_css .= '.site-main .wp-block-button.is-style-outline a, .postsec-list .wp-block-button.is-style-outline a {';
$classic_kindergarten_color_scheme_css .= 'border: 1px solid ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
$classic_kindergarten_color_scheme_css .= '}';

$classic_kindergarten_color_scheme_css .= 'span.page-numbers.current, .nav-links .page-numbers:hover, .site-main .wp-block-button__link {';
$classic_kindergarten_color_scheme_css .= 'border: 2px solid ' . esc_attr($classic_kindergarten_color_scheme_three) . ' !important;';
$classic_kindergarten_color_scheme_css .= '}';