<?php

    $camping_zone_theme_css= "";

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

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

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

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

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

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

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

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

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

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

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

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

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

    $camping_zone_first_color = get_theme_mod('camping_zone_first_color');

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

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

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

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

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

    $camping_zone_slider_content_layout = get_theme_mod( 'camping_zone_slider_content_layout','Left');
    if($camping_zone_slider_content_layout == 'Left'){
        $camping_zone_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $camping_zone_theme_css .='text-align : left;';
        $camping_zone_theme_css .='}';
    }
    if($camping_zone_slider_content_layout == 'Center'){
        $camping_zone_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $camping_zone_theme_css .='text-align : center;';
        $camping_zone_theme_css .='}';
        $camping_zone_theme_css .='.slider-inner-box{';
            $camping_zone_theme_css .='width : 100%;';
        $camping_zone_theme_css .='}';
    }
    if($camping_zone_slider_content_layout == 'Right'){
        $camping_zone_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $camping_zone_theme_css .='text-align : right;';
        $camping_zone_theme_css .='}';
        $camping_zone_theme_css .='.slider-inner-box{';
            $camping_zone_theme_css .='margin-left : auto;';
        $camping_zone_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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