<?php

    $royal_jewellery_theme_css= "";


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

    $royal_jewellery_global_color = get_theme_mod('royal_jewellery_global_color');

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

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

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

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

    $royal_jewellery_scroll_to_top_border_radius = get_theme_mod('royal_jewellery_scroll_to_top_border_radius');
    $royal_jewellery_scroll_bg_color = get_theme_mod('royal_jewellery_scroll_bg_color');
    $royal_jewellery_scroll_color = get_theme_mod('royal_jewellery_scroll_color');
    $royal_jewellery_scroll_font_size = get_theme_mod('royal_jewellery_scroll_font_size');
    if($royal_jewellery_scroll_to_top_border_radius != false || $royal_jewellery_scroll_bg_color != false || $royal_jewellery_scroll_color != false || $royal_jewellery_scroll_font_size != false){
        $royal_jewellery_theme_css .='#colophon a#button{';
            $royal_jewellery_theme_css .='border-radius: '.esc_attr($royal_jewellery_scroll_to_top_border_radius).'px; background-color: '.esc_attr($royal_jewellery_scroll_bg_color).'; color: '.esc_attr($royal_jewellery_scroll_color).' !important; font-size: '.esc_attr($royal_jewellery_scroll_font_size).'px;';
        $royal_jewellery_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /*------------------ Slider CSS -------------------*/
    $royal_jewellery_slider_opacity_setting = get_theme_mod( 'royal_jewellery_slider_opacity_setting',true);
    $royal_jewellery_image_opacity_color = get_theme_mod( 'royal_jewellery_image_opacity_color');
    $royal_jewellery_slider_opacity = get_theme_mod( 'royal_jewellery_slider_opacity');
    if( $royal_jewellery_slider_opacity_setting != false) {
        $royal_jewellery_theme_css .='#top-slider .slider-box img{';
            $royal_jewellery_theme_css .='opacity: '. $royal_jewellery_slider_opacity. ';';
        $royal_jewellery_theme_css .='}';
        if( $royal_jewellery_image_opacity_color != '') {
            $royal_jewellery_theme_css .='#top-slider .slider-box {';
                $royal_jewellery_theme_css .='background-color: '. $royal_jewellery_image_opacity_color. ';';
            $royal_jewellery_theme_css .='}';
        }
    } else {
        $royal_jewellery_theme_css .='#top-slider .slider-box img{';
            $royal_jewellery_theme_css .='opacity: 1;';
        $royal_jewellery_theme_css .='}';
    }

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

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

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

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

    $royal_jewellery_heading_color = get_theme_mod('royal_jewellery_heading_color');
    $royal_jewellery_heading_font_family = get_theme_mod('royal_jewellery_heading_font_family');
    $royal_jewellery_heading_font_size = get_theme_mod('royal_jewellery_heading_font_size');
    if($royal_jewellery_heading_color != false || $royal_jewellery_heading_font_family != false || $royal_jewellery_heading_font_size != false){
        $royal_jewellery_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, h2.wp-block-heading a, .featured h3.main-heading, .featured h4.main-heading, h5.slider-short, h5.box-title, h5.main-title, h5.class-title, h5.service-title, h6.box-short{';
            $royal_jewellery_theme_css .='color: '.esc_attr($royal_jewellery_heading_color).'!important; 
            font-family: '.esc_attr($royal_jewellery_heading_font_family).'!important;
            font-size: '.esc_attr($royal_jewellery_heading_font_size).'px !important;';
        $royal_jewellery_theme_css .='}';
    }

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