<?php

    $recipe_maker_theme_css= "";

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

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

    /*--------------------------- Footer Widget Heading Alignment -------------------*/

    $recipe_maker_footer_widget_heading_alignment = get_theme_mod( 'recipe_maker_footer_widget_heading_alignment','Left');
    if($recipe_maker_footer_widget_heading_alignment == 'Left'){
        $recipe_maker_theme_css .='#colophon h5, h5.footer-column-widget-title{';
        $recipe_maker_theme_css .='text-align: left;';
        $recipe_maker_theme_css .='}';
    }else if($recipe_maker_footer_widget_heading_alignment == 'Center'){
        $recipe_maker_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $recipe_maker_theme_css .='text-align: center;';
        $recipe_maker_theme_css .='}';
    }else if($recipe_maker_footer_widget_heading_alignment == 'Right'){
        $recipe_maker_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $recipe_maker_theme_css .='text-align: right;';
        $recipe_maker_theme_css .='}';
    }

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

    $recipe_maker_nav_menu = get_theme_mod( 'recipe_maker_nav_menu_text_transform','Capitalize');
    if($recipe_maker_nav_menu == 'Capitalize'){
        $recipe_maker_theme_css .='.site-navigation .primary-menu > li a{';
            $recipe_maker_theme_css .='text-transform:Capitalize;';
        $recipe_maker_theme_css .='}';
    }
    if($recipe_maker_nav_menu == 'Lowercase'){
        $recipe_maker_theme_css .='.site-navigation .primary-menu > li a{';
            $recipe_maker_theme_css .='text-transform:Lowercase;';
        $recipe_maker_theme_css .='}';
    }
    if($recipe_maker_nav_menu == 'Uppercase'){
        $recipe_maker_theme_css .='.site-navigation .primary-menu > li a{';
            $recipe_maker_theme_css .='text-transform:Uppercase;';
        $recipe_maker_theme_css .='}';
    }

    $recipe_maker_menu_font_size = get_theme_mod( 'recipe_maker_menu_font_size');
    if($recipe_maker_menu_font_size != ''){
        $recipe_maker_theme_css .='.site-navigation .primary-menu > li a{';
            $recipe_maker_theme_css .='font-size: '.esc_attr($recipe_maker_menu_font_size).'px;';
        $recipe_maker_theme_css .='}';
    }

    $recipe_maker_nav_menu_font_weight = get_theme_mod( 'recipe_maker_nav_menu_font_weight',400);
    if($recipe_maker_menu_font_size != ''){
        $recipe_maker_theme_css .='.site-navigation .primary-menu > li a{';
            $recipe_maker_theme_css .='font-weight: '.esc_attr($recipe_maker_nav_menu_font_weight).';';
        $recipe_maker_theme_css .='}';
    }

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

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

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

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

    /*---------------------------Width Layout -------------------*/

    $recipe_maker_width_option = get_theme_mod( 'recipe_maker_width_option','Full Width');
    if($recipe_maker_width_option == 'Boxed Width'){
        $recipe_maker_theme_css .='body{';
            $recipe_maker_theme_css .='max-width: 1140px; width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;';
        $recipe_maker_theme_css .='}';
        $recipe_maker_theme_css .='.scrollup i{';
            $recipe_maker_theme_css .='right: 100px;';
        $recipe_maker_theme_css .='}';
        $recipe_maker_theme_css .='.page-template-custom-home-page .home-page-header{';
            $recipe_maker_theme_css .='padding: 0px 40px 0 10px;';
        $recipe_maker_theme_css .='}';
    }else if($recipe_maker_width_option == 'Wide Width'){
        $recipe_maker_theme_css .='body{';
            $recipe_maker_theme_css .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
        $recipe_maker_theme_css .='}';
        $recipe_maker_theme_css .='.scrollup i{';
            $recipe_maker_theme_css .='right: 30px;';
        $recipe_maker_theme_css .='}';
    }else if($recipe_maker_width_option == 'Full Width'){
        $recipe_maker_theme_css .='body{';
            $recipe_maker_theme_css .='max-width: 100%;';
        $recipe_maker_theme_css .='}';
    }

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

    $recipe_maker_first_color = get_theme_mod('recipe_maker_first_color');

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

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

    $recipe_maker_heading_color = get_theme_mod('recipe_maker_heading_color');
    $recipe_maker_heading_font_family = get_theme_mod('recipe_maker_heading_font_family');
    $recipe_maker_heading_font_size = get_theme_mod('recipe_maker_heading_font_size');
    if($recipe_maker_heading_color != false || $recipe_maker_heading_font_family != false || $recipe_maker_heading_font_size != false){
        $recipe_maker_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, #top-slider .slider-inner-box h3, .featured h3.main-heading, .article-box h3.entry-title, .featured h4.main-heading, #colophon h5, .sidebar h5{';
            $recipe_maker_theme_css .='color: '.esc_attr($recipe_maker_heading_color).'!important; 
            font-family: '.esc_attr($recipe_maker_heading_font_family).'!important;
            font-size: '.esc_attr($recipe_maker_heading_font_size).'px !important;';
        $recipe_maker_theme_css .='}';
    }

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

    /*---------------- Logo CSS ----------------------*/
    $recipe_maker_logo_title_font_size = get_theme_mod( 'recipe_maker_logo_title_font_size');
    $recipe_maker_logo_tagline_font_size = get_theme_mod( 'recipe_maker_logo_tagline_font_size');
    if( $recipe_maker_logo_title_font_size != '') {
        $recipe_maker_theme_css .='#masthead .navbar-brand a{';
            $recipe_maker_theme_css .='font-size: '. $recipe_maker_logo_title_font_size. 'px;';
        $recipe_maker_theme_css .='}';
    }
    if( $recipe_maker_logo_tagline_font_size != '') {
        $recipe_maker_theme_css .='#masthead .navbar-brand p{';
            $recipe_maker_theme_css .='font-size: '. $recipe_maker_logo_tagline_font_size. 'px;';
        $recipe_maker_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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