<?php

    $vlog_channel_theme_css= "";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    $vlog_channel_global_color = get_theme_mod('vlog_channel_global_color');

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

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

    $vlog_channel_heading_color = get_theme_mod('vlog_channel_heading_color');
    $vlog_channel_heading_font_family = get_theme_mod('vlog_channel_heading_font_family');
    $vlog_channel_heading_font_size = get_theme_mod('vlog_channel_heading_font_size');
    if($vlog_channel_heading_color != false || $vlog_channel_heading_font_family != false || $vlog_channel_heading_font_size != false){
        $vlog_channel_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{';
            $vlog_channel_theme_css .='color: '.esc_attr($vlog_channel_heading_color).'!important; 
            font-family: '.esc_attr($vlog_channel_heading_font_family).'!important;
            font-size: '.esc_attr($vlog_channel_heading_font_size).'px !important;';
        $vlog_channel_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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