<?php

    $wooden_furniture_theme_css= "";

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

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

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

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

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

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

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

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

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

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

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

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

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

    $wooden_furniture_first_color = get_theme_mod('wooden_furniture_first_color');

    if ($wooden_furniture_first_color) {
        $wooden_furniture_theme_css .= ':root {';
        $wooden_furniture_theme_css .= '--first-color: ' . esc_attr($wooden_furniture_first_color) . ' !important;';
        $wooden_furniture_theme_css .= '} ';
    }
    
     /*-------------------- Heading typography -------------------*/

    $wooden_furniture_heading_color = get_theme_mod('wooden_furniture_heading_color');
    $wooden_furniture_heading_font_family = get_theme_mod('wooden_furniture_heading_font_family');
    $wooden_furniture_heading_font_size = get_theme_mod('wooden_furniture_heading_font_size');
    if($wooden_furniture_heading_color != false || $wooden_furniture_heading_font_family != false || $wooden_furniture_heading_font_size != false){
        $wooden_furniture_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, .slider-inner-box h2, #top-slider .slider-inner-box h3, .featured h3.main-heading, .contact h3.main-heading, .service-sec h3.main-heading, .ser-content h4 a{';
            $wooden_furniture_theme_css .='color: '.esc_attr($wooden_furniture_heading_color).'!important; 
            font-family: '.esc_attr($wooden_furniture_heading_font_family).'!important;
            font-size: '.esc_attr($wooden_furniture_heading_font_size).'px !important;';
        $wooden_furniture_theme_css .='}';
    }

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

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

    $wooden_furniture_slider_content_layout = get_theme_mod( 'wooden_furniture_slider_content_layout','Left');
    if($wooden_furniture_slider_content_layout == 'Left'){
        $wooden_furniture_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $wooden_furniture_theme_css .='text-align : left;';
        $wooden_furniture_theme_css .='}';
    }
    if($wooden_furniture_slider_content_layout == 'Center'){
        $wooden_furniture_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $wooden_furniture_theme_css .='text-align : center;';
        $wooden_furniture_theme_css .='}';
        $wooden_furniture_theme_css .='.slider-inner-box {';
            $wooden_furniture_theme_css .='right: 50%;';
        $wooden_furniture_theme_css .='}';
        $wooden_furniture_theme_css .='.slider-inner-box:before {';
            $wooden_furniture_theme_css .='left: 50%; transform:rotate(45deg) translateX(-50%);';
        $wooden_furniture_theme_css .='}';
    }
    if($wooden_furniture_slider_content_layout == 'Right'){
        $wooden_furniture_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $wooden_furniture_theme_css .='text-align : right;';
        $wooden_furniture_theme_css .='}';
        $wooden_furniture_theme_css .='.slider-inner-box:before {';
            $wooden_furniture_theme_css .='left: auto; right: -27px;';
        $wooden_furniture_theme_css .='}';
    }

    /*------------------ Slider CSS -------------------*/
    $wooden_furniture_slider_opacity_setting = get_theme_mod( 'wooden_furniture_slider_opacity_setting',true);
    $wooden_furniture_image_opacity_color = get_theme_mod( 'wooden_furniture_image_opacity_color');
    $wooden_furniture_slider_opacity = get_theme_mod( 'wooden_furniture_slider_opacity', '0.7');
    if( $wooden_furniture_slider_opacity_setting != false) {
        $wooden_furniture_theme_css .='#top-slider .slider-image img{';
            $wooden_furniture_theme_css .='opacity: '. $wooden_furniture_slider_opacity. ';';
        $wooden_furniture_theme_css .='}';
        if( $wooden_furniture_image_opacity_color != '') {
            $wooden_furniture_theme_css .='#top-slider .slider-image {';
                $wooden_furniture_theme_css .='background-color: '. $wooden_furniture_image_opacity_color. ';';
            $wooden_furniture_theme_css .='}';
        }
    } else {
        $wooden_furniture_theme_css .='#top-slider .slider-image img{';
            $wooden_furniture_theme_css .='opacity: 1;';
        $wooden_furniture_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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