<?php

    $warehouse_cargo_theme_css= "";

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

    $warehouse_cargo_theme_color = get_theme_mod('warehouse_cargo_theme_color');
    $warehouse_cargo_theme_color_2 = get_theme_mod('warehouse_cargo_theme_color_2');

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


    if ($warehouse_cargo_theme_color_2) {
        $warehouse_cargo_theme_css .= ':root {';
        $warehouse_cargo_theme_css .= '--second-color: ' . esc_attr($warehouse_cargo_theme_color_2) . ' !important;';
        $warehouse_cargo_theme_css .= '} ';
    }


    /*--------------------------- Scroll To Top Positions -------------------*/

    $warehouse_cargo_scroll_position = get_theme_mod( 'warehouse_cargo_scroll_top_position','Right');
    if($warehouse_cargo_scroll_position == 'Right'){
        $warehouse_cargo_theme_css .='#button{';
            $warehouse_cargo_theme_css .='right: 20px;';
        $warehouse_cargo_theme_css .='}';
    }else if($warehouse_cargo_scroll_position == 'Left'){
        $warehouse_cargo_theme_css .='#button{';
            $warehouse_cargo_theme_css .='left: 20px;right: auto;';
        $warehouse_cargo_theme_css .='}';
    }else if($warehouse_cargo_scroll_position == 'Center'){
        $warehouse_cargo_theme_css .='#button{';
            $warehouse_cargo_theme_css .='right: auto;left: 50%; transform:translateX(-50%);';
        $warehouse_cargo_theme_css .='}';
    }

    /*--------------------------- Scroll To Top Border Radius -------------------*/

    $warehouse_cargo_scroll_to_top_border_radius = get_theme_mod('warehouse_cargo_scroll_to_top_border_radius');
    $warehouse_cargo_scroll_bg_color = get_theme_mod('warehouse_cargo_scroll_bg_color');
    $warehouse_cargo_scroll_color = get_theme_mod('warehouse_cargo_scroll_color');
    $warehouse_cargo_scroll_font_size = get_theme_mod('warehouse_cargo_scroll_font_size');
    if($warehouse_cargo_scroll_to_top_border_radius != false || $warehouse_cargo_scroll_bg_color != false || $warehouse_cargo_scroll_color != false || $warehouse_cargo_scroll_font_size != false){
        $warehouse_cargo_theme_css .='#colophon a#button{';
            $warehouse_cargo_theme_css .='border-radius: '.esc_attr($warehouse_cargo_scroll_to_top_border_radius).'px; background-color: '.esc_attr($warehouse_cargo_scroll_bg_color).'; color: '.esc_attr($warehouse_cargo_scroll_color).' !important; font-size: '.esc_attr($warehouse_cargo_scroll_font_size).'px;';
        $warehouse_cargo_theme_css .='}';
    }

    /*--------------------------- Slider Image Opacity -------------------*/
    $warehouse_cargo_slider_opacity_setting = get_theme_mod( 'warehouse_cargo_slider_opacity_setting',true);
    $warehouse_cargo_image_opacity_color = get_theme_mod( 'warehouse_cargo_image_opacity_color');
    $warehouse_cargo_slider_opacity = get_theme_mod( 'warehouse_cargo_slider_opacity');
    if( $warehouse_cargo_slider_opacity_setting != false) {
        $warehouse_cargo_theme_css .='#top-slider .slider-box img{';
            $warehouse_cargo_theme_css .='opacity: '. $warehouse_cargo_slider_opacity. ';';
        $warehouse_cargo_theme_css .='}';
        if( $warehouse_cargo_image_opacity_color != '') {
            $warehouse_cargo_theme_css .='#top-slider .slider-box {';
                $warehouse_cargo_theme_css .='background-color: '. $warehouse_cargo_image_opacity_color. ';';
            $warehouse_cargo_theme_css .='}';
        }
    } else {
        $warehouse_cargo_theme_css .='#top-slider .slider-box img{';
            $warehouse_cargo_theme_css .='opacity: 1;';
        $warehouse_cargo_theme_css .='}';
    }

    /*---------------------------Slider Height ------------*/

    $warehouse_cargo_slider_img_height = get_theme_mod('warehouse_cargo_slider_img_height');
    if($warehouse_cargo_slider_img_height != false){
        $warehouse_cargo_theme_css .='#top-slider .owl-carousel .owl-item img{';
            $warehouse_cargo_theme_css .='height: '.esc_attr($warehouse_cargo_slider_img_height).';';
        $warehouse_cargo_theme_css .='}';
    }

    /*--------------------------- Woocommerce Product Border Radius -------------------*/

    $warehouse_cargo_woo_product_border_radius = get_theme_mod('warehouse_cargo_woo_product_border_radius', 0);
    if($warehouse_cargo_woo_product_border_radius != false){
        $warehouse_cargo_theme_css .='.woocommerce ul.products li.product a img{';
            $warehouse_cargo_theme_css .='border-radius: '.esc_attr($warehouse_cargo_woo_product_border_radius).'px;';
        $warehouse_cargo_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

    $warehouse_cargo_footer_bg_image = get_theme_mod('warehouse_cargo_footer_bg_image');
    if($warehouse_cargo_footer_bg_image != false){
        $warehouse_cargo_theme_css .='#colophon{';
            $warehouse_cargo_theme_css .='background: url('.esc_attr($warehouse_cargo_footer_bg_image).');';
        $warehouse_cargo_theme_css .='}';
    }

    /*--------------------------- Copyright Background Color -------------------*/

    $warehouse_cargo_copyright_background_color = get_theme_mod('warehouse_cargo_copyright_background_color');
    if($warehouse_cargo_copyright_background_color != false){
        $warehouse_cargo_theme_css .='.footer_info{';
            $warehouse_cargo_theme_css .='background-color: '.esc_attr($warehouse_cargo_copyright_background_color).' !important;';
        $warehouse_cargo_theme_css .='}';
    }

    /*--------------------------- Site Title And Tagline Color -------------------*/

    $warehouse_cargo_logo_title_color = get_theme_mod('warehouse_cargo_logo_title_color');
    if($warehouse_cargo_logo_title_color != false){
        $warehouse_cargo_theme_css .='p.site-title a, .navbar-brand a{';
            $warehouse_cargo_theme_css .='color: '.esc_attr($warehouse_cargo_logo_title_color).' !important;';
        $warehouse_cargo_theme_css .='}';
    }

    $warehouse_cargo_logo_tagline_color = get_theme_mod('warehouse_cargo_logo_tagline_color');
    if($warehouse_cargo_logo_tagline_color != false){
        $warehouse_cargo_theme_css .='.logo p.site-description, .navbar-brand p{';
            $warehouse_cargo_theme_css .='color: '.esc_attr($warehouse_cargo_logo_tagline_color).'  !important;';
        $warehouse_cargo_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

    $warehouse_cargo_slider_content_layout = get_theme_mod( 'warehouse_cargo_slider_content_layout','Center');
    if($warehouse_cargo_slider_content_layout == 'Left'){
        $warehouse_cargo_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $warehouse_cargo_theme_css .='text-align : left;';
        $warehouse_cargo_theme_css .='}';
    }
    if($warehouse_cargo_slider_content_layout == 'Center'){
        $warehouse_cargo_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $warehouse_cargo_theme_css .='text-align : center;';
        $warehouse_cargo_theme_css .='}';
    }
    if($warehouse_cargo_slider_content_layout == 'Right'){
        $warehouse_cargo_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $warehouse_cargo_theme_css .='text-align : right;';
        $warehouse_cargo_theme_css .='}';
    }