<?php

    $kindergarten_playschool_theme_css= "";

    /*--------------------------- Scroll to top positions -------------------*/

    $kindergarten_playschool_scroll_position = get_theme_mod( 'kindergarten_playschool_scroll_top_position','Right');
    if($kindergarten_playschool_scroll_position == 'Right'){
        $kindergarten_playschool_theme_css .='#button{';
            $kindergarten_playschool_theme_css .='right: 20px;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_scroll_position == 'Left'){
        $kindergarten_playschool_theme_css .='#button{';
            $kindergarten_playschool_theme_css .='left: 20px;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_scroll_position == 'Center'){
        $kindergarten_playschool_theme_css .='#button{';
            $kindergarten_playschool_theme_css .='right: 50%;left: 50%;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*--------------------------- Footer Widget Content Alignment -------------------*/

    $kindergarten_playschool_footer_widget_content_alignment = get_theme_mod( 'kindergarten_playschool_footer_widget_content_alignment','Left');
    if($kindergarten_playschool_footer_widget_content_alignment == 'Left'){
        $kindergarten_playschool_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
        $kindergarten_playschool_theme_css .='text-align: left;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_footer_widget_content_alignment == 'Center'){
        $kindergarten_playschool_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $kindergarten_playschool_theme_css .='text-align: center;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_footer_widget_content_alignment == 'Right'){
        $kindergarten_playschool_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $kindergarten_playschool_theme_css .='text-align: right;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*--------------------------- Copyright Content Alignment -------------------*/

    $kindergarten_playschool_copyright_content_alignment = get_theme_mod( 'kindergarten_playschool_copyright_content_alignment','Center');
    if($kindergarten_playschool_copyright_content_alignment == 'Left'){
        $kindergarten_playschool_theme_css .='.footer-menu-left{';
        $kindergarten_playschool_theme_css .='text-align: left !important;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_copyright_content_alignment == 'Center'){
        $kindergarten_playschool_theme_css .='.footer-menu-left{';
            $kindergarten_playschool_theme_css .='text-align: center !important;';
        $kindergarten_playschool_theme_css .='}';
    }else if($kindergarten_playschool_copyright_content_alignment == 'Right'){
        $kindergarten_playschool_theme_css .='.footer-menu-left{';
            $kindergarten_playschool_theme_css .='text-align: right !important;';
        $kindergarten_playschool_theme_css .='}';
    }

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

    $kindergarten_playschool_first_color = get_theme_mod('kindergarten_playschool_first_color');
    $kindergarten_playschool_second_color = get_theme_mod('kindergarten_playschool_second_color');

    if ($kindergarten_playschool_first_color) {
        $kindergarten_playschool_theme_css .= ':root {';
        $kindergarten_playschool_theme_css .= '--first-color: ' . esc_attr($kindergarten_playschool_first_color) . ' !important;';
        $kindergarten_playschool_theme_css .= '} ';
    }

    if ($kindergarten_playschool_second_color) {
        $kindergarten_playschool_theme_css .= ':root {';
        $kindergarten_playschool_theme_css .= '--second-color: ' . esc_attr($kindergarten_playschool_second_color) . ' !important;';
        $kindergarten_playschool_theme_css .= '} ';
    }

     /*-------------------- Heading typography -------------------*/

    $kindergarten_playschool_heading_color = get_theme_mod('kindergarten_playschool_heading_color');
    $kindergarten_playschool_heading_font_family = get_theme_mod('kindergarten_playschool_heading_font_family');
    $kindergarten_playschool_heading_font_size = get_theme_mod('kindergarten_playschool_heading_font_size');
    if($kindergarten_playschool_heading_color != false || $kindergarten_playschool_heading_font_family != false || $kindergarten_playschool_heading_font_size != false){
        $kindergarten_playschool_theme_css .='h1, h2, h3, h4, h5, h6, .navbar-brand h1.site-title, h2.entry-title, h1.entry-title, h2.page-title, #latest_post h2, h2.woocommerce-loop-product__title, #colophon h5, .sidebar h5, .article-box h3.entry-title, .slider-inner-box h2, #top-slider .slider-inner-box h2, #top-slider .slider-inner-box h3, h2.wp-block-heading a, .featured h3.main-heading, .featured h4.main-heading, h5.slider-short, h5.box-title, h5.main-title, h5.class-title, h5.service-title, h6.box-short{';
            $kindergarten_playschool_theme_css .='color: '.esc_attr($kindergarten_playschool_heading_color).'!important; 
            font-family: '.esc_attr($kindergarten_playschool_heading_font_family).'!important;
            font-size: '.esc_attr($kindergarten_playschool_heading_font_size).'px !important;';
        $kindergarten_playschool_theme_css .='}';
    }

    $kindergarten_playschool_paragraph_color = get_theme_mod('kindergarten_playschool_paragraph_color');
    $kindergarten_playschool_paragraph_font_family = get_theme_mod('kindergarten_playschool_paragraph_font_family');
    $kindergarten_playschool_paragraph_font_size = get_theme_mod('kindergarten_playschool_paragraph_font_size');
    if($kindergarten_playschool_paragraph_color != false || $kindergarten_playschool_paragraph_font_family != false || $kindergarten_playschool_paragraph_font_size != false){
        $kindergarten_playschool_theme_css .='p, p.site-title, span, .article-box p, ul, li{';
            $kindergarten_playschool_theme_css .='color: '.esc_attr($kindergarten_playschool_paragraph_color).'!important; 
            font-family: '.esc_attr($kindergarten_playschool_paragraph_font_family).'!important;
            font-size: '.esc_attr($kindergarten_playschool_paragraph_font_size).'px !important;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*------------------ Nav Menus -------------------*/

    $kindergarten_playschool_nav_menu = get_theme_mod( 'kindergarten_playschool_nav_menu_text_transform','Capitalize');
    if($kindergarten_playschool_nav_menu == 'Capitalize'){
        $kindergarten_playschool_theme_css .='.main-navigation .menu > li > a{';
            $kindergarten_playschool_theme_css .='text-transform:Capitalize;';
        $kindergarten_playschool_theme_css .='}';
    }
    if($kindergarten_playschool_nav_menu == 'Lowercase'){
        $kindergarten_playschool_theme_css .='.main-navigation .menu > li > a{';
            $kindergarten_playschool_theme_css .='text-transform:Lowercase;';
        $kindergarten_playschool_theme_css .='}';
    }
    if($kindergarten_playschool_nav_menu == 'Uppercase'){
        $kindergarten_playschool_theme_css .='.main-navigation .menu > li > a{';
            $kindergarten_playschool_theme_css .='text-transform:Uppercase;';
        $kindergarten_playschool_theme_css .='}';
    }

    $kindergarten_playschool_menu_font_size = get_theme_mod( 'kindergarten_playschool_menu_font_size');
    if($kindergarten_playschool_menu_font_size != ''){
        $kindergarten_playschool_theme_css .='.main-navigation .menu > li > a{';
            $kindergarten_playschool_theme_css .='font-size: '.esc_attr($kindergarten_playschool_menu_font_size).'px;';
        $kindergarten_playschool_theme_css .='}';
    }

    $kindergarten_playschool_nav_menu_font_weight = get_theme_mod( 'kindergarten_playschool_nav_menu_font_weight',500);
    if($kindergarten_playschool_menu_font_size != ''){
        $kindergarten_playschool_theme_css .='.main-navigation .menu > li > a{';
            $kindergarten_playschool_theme_css .='font-weight: '.esc_attr($kindergarten_playschool_nav_menu_font_weight).';';
        $kindergarten_playschool_theme_css .='}';
    }

    /*------------------ Slider CSS -------------------*/

    $kindergarten_playschool_slider_content_layout = get_theme_mod( 'kindergarten_playschool_slider_content_layout','Left');
    if($kindergarten_playschool_slider_content_layout == 'Left'){
        $kindergarten_playschool_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kindergarten_playschool_theme_css .='text-align : left;';
        $kindergarten_playschool_theme_css .='}';
    }
    if($kindergarten_playschool_slider_content_layout == 'Center'){
        $kindergarten_playschool_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kindergarten_playschool_theme_css .='text-align : center;';
        $kindergarten_playschool_theme_css .='}';
    }
    if($kindergarten_playschool_slider_content_layout == 'Right'){
        $kindergarten_playschool_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kindergarten_playschool_theme_css .='text-align : right;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*------------------ Footer CSS -------------------*/
    $kindergarten_playschool_footer_bg_color = get_theme_mod( 'kindergarten_playschool_footer_bg_color');
    if($kindergarten_playschool_footer_bg_color != '' ){
        $kindergarten_playschool_theme_css .='#colophon {';
            $kindergarten_playschool_theme_css .='background-color: '.esc_attr($kindergarten_playschool_footer_bg_color).'; ';
        $kindergarten_playschool_theme_css .='}';
    }

    $kindergarten_playschool_footer_content_color = get_theme_mod( 'kindergarten_playschool_footer_content_color');
    if($kindergarten_playschool_footer_content_color != ''){
        $kindergarten_playschool_theme_css .='#colophon, #colophon a, #colophon h5, #colophon .widget #wp-calendar caption {';
            $kindergarten_playschool_theme_css .='color: '.esc_attr($kindergarten_playschool_footer_content_color).';';
        $kindergarten_playschool_theme_css .='}';
    }

    /*------------------ Copyright CSS -------------------*/
    $kindergarten_playschool_copyright_text_color = get_theme_mod( 'kindergarten_playschool_copyright_text_color');
    if($kindergarten_playschool_copyright_text_color != ''){
        $kindergarten_playschool_theme_css .='#colophon .site-info a, #colophon .site-info span {';
            $kindergarten_playschool_theme_css .='color: '.esc_attr($kindergarten_playschool_copyright_text_color).';';
        $kindergarten_playschool_theme_css .='}';
    }

    /*--------------------------- Featured Image Border Radius -------------------*/

    $kindergarten_playschool_post_page_image_border_radius = get_theme_mod('kindergarten_playschool_post_page_image_border_radius', 0);
    if($kindergarten_playschool_post_page_image_border_radius != false){
        $kindergarten_playschool_theme_css .='.article-box img{';
            $kindergarten_playschool_theme_css .='border-radius: '.esc_attr($kindergarten_playschool_post_page_image_border_radius).'px;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*--------------------------- Post Page Image Box Shadow -------------------*/

    $kindergarten_playschool_post_page_image_box_shadow = get_theme_mod('kindergarten_playschool_post_page_image_box_shadow',0);
    if($kindergarten_playschool_post_page_image_box_shadow != false){
        $kindergarten_playschool_theme_css .='.article-box img{';
            $kindergarten_playschool_theme_css .='box-shadow: '.esc_attr($kindergarten_playschool_post_page_image_box_shadow).'px '.esc_attr($kindergarten_playschool_post_page_image_box_shadow).'px '.esc_attr($kindergarten_playschool_post_page_image_box_shadow).'px #cccccc;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*---------------- Single post Settings ------------------*/

    $kindergarten_playschool_single_post_navigation_show_hide = get_theme_mod('kindergarten_playschool_single_post_navigation_show_hide',true);
    if($kindergarten_playschool_single_post_navigation_show_hide != true){
        $kindergarten_playschool_theme_css .='.nav-links{';
            $kindergarten_playschool_theme_css .='display: none;';
        $kindergarten_playschool_theme_css .='}';
    }

    /*--------------------------- Single Post Page Image Box Shadow -------------------*/

    $kindergarten_playschool_single_post_page_image_box_shadow = get_theme_mod('kindergarten_playschool_single_post_page_image_box_shadow',0);
    if($kindergarten_playschool_single_post_page_image_box_shadow != false){
        $kindergarten_playschool_theme_css .='.single-post .entry-header img{';
            $kindergarten_playschool_theme_css .='box-shadow: '.esc_attr($kindergarten_playschool_single_post_page_image_box_shadow).'px '.esc_attr($kindergarten_playschool_single_post_page_image_box_shadow).'px '.esc_attr($kindergarten_playschool_single_post_page_image_box_shadow).'px #cccccc;';
        $kindergarten_playschool_theme_css .='}';
    }

     /*--------------------------- Single Post Page Image Border Radius -------------------*/

    $kindergarten_playschool_single_post_page_image_border_radius = get_theme_mod('kindergarten_playschool_single_post_page_image_border_radius', 0);
    if($kindergarten_playschool_single_post_page_image_border_radius != false){
        $kindergarten_playschool_theme_css .='.single-post .entry-header img{';
            $kindergarten_playschool_theme_css .='border-radius: '.esc_attr($kindergarten_playschool_single_post_page_image_border_radius).'px;';
        $kindergarten_playschool_theme_css .='}';
    }