<?php

    $pet_care_zone_theme_css= "";

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

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

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

    $pet_care_zone_scroll_to_top_border_radius = get_theme_mod('pet_care_zone_scroll_to_top_border_radius');
    $pet_care_zone_scroll_bg_color = get_theme_mod('pet_care_zone_scroll_bg_color');
    $pet_care_zone_scroll_color = get_theme_mod('pet_care_zone_scroll_color');
    $pet_care_zone_scroll_font_size = get_theme_mod('pet_care_zone_scroll_font_size');
    if($pet_care_zone_scroll_to_top_border_radius != false || $pet_care_zone_scroll_bg_color != false || $pet_care_zone_scroll_color != false || $pet_care_zone_scroll_font_size != false){
        $pet_care_zone_theme_css .='#colophon a#button{';
            $pet_care_zone_theme_css .='border-radius: '.esc_attr($pet_care_zone_scroll_to_top_border_radius).'px; background-color: '.esc_attr($pet_care_zone_scroll_bg_color).'; color: '.esc_attr($pet_care_zone_scroll_color).' !important; font-size: '.esc_attr($pet_care_zone_scroll_font_size).'px;';
        $pet_care_zone_theme_css .='}';
    }

    /*--------------------------- Slider Image Opacity -------------------*/
    $pet_care_zone_slider_opacity_setting = get_theme_mod( 'pet_care_zone_slider_opacity_setting',false);
    $pet_care_zone_slider_opacity = get_theme_mod( 'pet_care_zone_slider_opacity');
    if( $pet_care_zone_slider_opacity_setting != false) {
        $pet_care_zone_theme_css .='#top-slider .slider-box img{';
            $pet_care_zone_theme_css .='opacity: '. $pet_care_zone_slider_opacity. ';';
        $pet_care_zone_theme_css .='}';
    } else {
        $pet_care_zone_theme_css .='#top-slider .slider-box img{';
            $pet_care_zone_theme_css .='opacity: 1;';
        $pet_care_zone_theme_css .='}';
    }

    /*--------------------------- Woocommerce Product Sale Positions -------------------*/

    $pet_care_zone_product_sale = get_theme_mod( 'pet_care_zone_woocommerce_product_sale','Right');
    if($pet_care_zone_product_sale == 'Right'){
        $pet_care_zone_theme_css .='.woocommerce ul.products li.product .onsale{';
            $pet_care_zone_theme_css .='left: auto; right: 15px;';
        $pet_care_zone_theme_css .='}';
    }else if($pet_care_zone_product_sale == 'Left'){
        $pet_care_zone_theme_css .='.woocommerce ul.products li.product .onsale{';
            $pet_care_zone_theme_css .='left: 15px; right: auto;';
        $pet_care_zone_theme_css .='}';
    }else if($pet_care_zone_product_sale == 'Center'){
        $pet_care_zone_theme_css .='.woocommerce ul.products li.product .onsale{';
            $pet_care_zone_theme_css .='right: 50%;left: 50%;';
        $pet_care_zone_theme_css .='}';
    }

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

    $pet_care_zone_woo_product_sale_border_radius = get_theme_mod('pet_care_zone_woo_product_sale_border_radius');
    if($pet_care_zone_woo_product_sale_border_radius != false){
        $pet_care_zone_theme_css .='.woocommerce ul.products li.product .onsale{';
            $pet_care_zone_theme_css .='border-radius: '.esc_attr($pet_care_zone_woo_product_sale_border_radius).'px;';
        $pet_care_zone_theme_css .='}';
    }

    /*--------------------------- Woocommerce Related Products -------------------*/

    $pet_care_zone_woocommerce_related_product_show_hide = get_theme_mod('pet_care_zone_woocommerce_related_product_show_hide',true);
    if($pet_care_zone_woocommerce_related_product_show_hide != true){
        $pet_care_zone_theme_css .='.related.products{';
            $pet_care_zone_theme_css .='display: none;';
        $pet_care_zone_theme_css .='}';
    }

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

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

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

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

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

    $pet_care_zone_footer_bg_image = get_theme_mod('pet_care_zone_footer_bg_image');
    if($pet_care_zone_footer_bg_image != false){
        $pet_care_zone_theme_css .='#colophon{';
            $pet_care_zone_theme_css .='background: url('.esc_attr($pet_care_zone_footer_bg_image).')!important;';
        $pet_care_zone_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    $pet_care_zone_first_color = get_theme_mod('pet_care_zone_first_color');
    $pet_care_zone_second_color = get_theme_mod('pet_care_zone_second_color');

    if ($pet_care_zone_first_color) {
        $pet_care_zone_theme_css .= ':root {';
        $pet_care_zone_theme_css .= '--first-color: ' . esc_attr($pet_care_zone_first_color) . ' !important;';
        $pet_care_zone_theme_css .= '} ';
    }
    
    if ($pet_care_zone_second_color) {
        $pet_care_zone_theme_css .= ':root {';
        $pet_care_zone_theme_css .= '--second-color: ' . esc_attr($pet_care_zone_second_color) . ' !important;';
        $pet_care_zone_theme_css .= '} ';
    }

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

    $pet_care_zone_heading_color = get_theme_mod('pet_care_zone_heading_color');
    $pet_care_zone_heading_font_family = get_theme_mod('pet_care_zone_heading_font_family');
    $pet_care_zone_heading_font_size = get_theme_mod('pet_care_zone_heading_font_size');
    if($pet_care_zone_heading_color != false || $pet_care_zone_heading_font_family != false || $pet_care_zone_heading_font_size != false){
        $pet_care_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, #top-slider .slider-inner-box h3, .featured h3.main-heading, .article-box h3.entry-title, .featured h4.main-heading, #colophon h5, .sidebar h5{';
            $pet_care_zone_theme_css .='color: '.esc_attr($pet_care_zone_heading_color).'!important; 
            font-family: '.esc_attr($pet_care_zone_heading_font_family).'!important;
            font-size: '.esc_attr($pet_care_zone_heading_font_size).'px !important;';
        $pet_care_zone_theme_css .='}';
    }

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

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

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

    /*--------------------------- Product Image Box Shadow -------------------*/

    $pet_care_zone_woo_product_image_box_shadow = get_theme_mod('pet_care_zone_woo_product_image_box_shadow',0);
    if($pet_care_zone_woo_product_image_box_shadow != false){
        $pet_care_zone_theme_css .='.woocommerce ul.products li.product a img{';
            $pet_care_zone_theme_css .='box-shadow: '.esc_attr($pet_care_zone_woo_product_image_box_shadow).'px '.esc_attr($pet_care_zone_woo_product_image_box_shadow).'px '.esc_attr($pet_care_zone_woo_product_image_box_shadow).'px #cccccc;';
        $pet_care_zone_theme_css .='}';
    }

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

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

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

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

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

    $pet_care_zone_nav_menu_font_weight = get_theme_mod( 'pet_care_zone_nav_menu_font_weight',600);
    if($pet_care_zone_menu_font_size != ''){
        $pet_care_zone_theme_css .='.site-navigation .primary-menu > li a{';
            $pet_care_zone_theme_css .='font-weight: '.esc_attr($pet_care_zone_nav_menu_font_weight).';';
        $pet_care_zone_theme_css .='}';
    }