<?php

    $roofing_flooring_theme_css= "";

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

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

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

    $roofing_flooring_first_color = get_theme_mod('roofing_flooring_first_color');

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

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

    $roofing_flooring_heading_color = get_theme_mod('roofing_flooring_heading_color');
    $roofing_flooring_heading_font_family = get_theme_mod('roofing_flooring_heading_font_family');
    $roofing_flooring_heading_font_size = get_theme_mod('roofing_flooring_heading_font_size');
    if($roofing_flooring_heading_color != false || $roofing_flooring_heading_font_family != false || $roofing_flooring_heading_font_size != false){
        $roofing_flooring_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, .service-sec h3.main-heading, #top-slider h4.main-text, .ser-content h4, .featured h4.main-heading{';
            $roofing_flooring_theme_css .='color: '.esc_attr($roofing_flooring_heading_color).'!important; 
            font-family: '.esc_attr($roofing_flooring_heading_font_family).'!important;
            font-size: '.esc_attr($roofing_flooring_heading_font_size).'px !important;';
        $roofing_flooring_theme_css .='}';
    }

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

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

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

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

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

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

    $roofing_flooring_banner_content_layout = get_theme_mod( 'roofing_flooring_banner_content_layout','Left');
    if($roofing_flooring_banner_content_layout == 'Left'){
        $roofing_flooring_theme_css .='#top-slider .banner-content{';
            $roofing_flooring_theme_css .='text-align : left;';
        $roofing_flooring_theme_css .='}';
    }
    if($roofing_flooring_banner_content_layout == 'Center'){
        $roofing_flooring_theme_css .='#top-slider .banner-content{';
            $roofing_flooring_theme_css .='text-align : center; width : 100%;';
        $roofing_flooring_theme_css .='}';
        $roofing_flooring_theme_css .='#top-slider h4.main-text{';
            $roofing_flooring_theme_css .='margin: 0 auto;';
        $roofing_flooring_theme_css .='}';
    }
    if($roofing_flooring_banner_content_layout == 'Right'){
        $roofing_flooring_theme_css .='#top-slider .banner-content{';
            $roofing_flooring_theme_css .='text-align : right; margin-left: auto;';
        $roofing_flooring_theme_css .='}';
        $roofing_flooring_theme_css .='#top-slider h4.main-text{';
            $roofing_flooring_theme_css .='margin: 0 0 0 auto;';
        $roofing_flooring_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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