<?php

    $diet_consultant_theme_css= "";

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

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

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

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

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

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

    /*--------------------------- Footer background image -------------------*/

    $diet_consultant_footer_bg_image = get_theme_mod('diet_consultant_footer_bg_image');
    if($diet_consultant_footer_bg_image != false){
        $diet_consultant_theme_css .='#colophon{';
            $diet_consultant_theme_css .='background: url('.esc_attr($diet_consultant_footer_bg_image).')!important;';
        $diet_consultant_theme_css .='}';
    }

    /*--------------------------- Footer Background Image Position -------------------*/

    $diet_consultant_footer_bg_image_position = get_theme_mod( 'diet_consultant_footer_bg_image_position','scroll');
    if($diet_consultant_footer_bg_image_position == 'fixed'){
        $diet_consultant_theme_css .='#colophon{';
            $diet_consultant_theme_css .='background-attachment: fixed !important; background-position: center !important;';
        $diet_consultant_theme_css .='}';
    }elseif ($diet_consultant_footer_bg_image_position == 'scroll'){
        $diet_consultant_theme_css .='#colophon{';
            $diet_consultant_theme_css .='background-attachment: scroll !important; background-position: center !important;';
        $diet_consultant_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

    $diet_consultant_nav_menu_font_weight = get_theme_mod( 'diet_consultant_nav_menu_font_weight',700);
    if($diet_consultant_menu_font_size != ''){
        $diet_consultant_theme_css .='.main-navigation .menu > li > a{';
            $diet_consultant_theme_css .='font-weight: '.esc_attr($diet_consultant_nav_menu_font_weight).';';
        $diet_consultant_theme_css .='}';
    }

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

    
    $diet_consultant_global_color = get_theme_mod('diet_consultant_global_color');

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

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

    $diet_consultant_heading_color = get_theme_mod('diet_consultant_heading_color');
    $diet_consultant_heading_font_family = get_theme_mod('diet_consultant_heading_font_family');
    $diet_consultant_heading_font_size = get_theme_mod('diet_consultant_heading_font_size');
    if($diet_consultant_heading_color != false || $diet_consultant_heading_font_family != false || $diet_consultant_heading_font_size != false){
        $diet_consultant_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, #top-slider h2.main-heading, #top-slider h3.main-text, .ser-heading h3.main-heading, .about-image h4.image-heading, h5.about-text-heading{';
            $diet_consultant_theme_css .='color: '.esc_attr($diet_consultant_heading_color).'!important; 
            font-family: '.esc_attr($diet_consultant_heading_font_family).'!important;
            font-size: '.esc_attr($diet_consultant_heading_font_size).'px !important;';
        $diet_consultant_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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