<?php

    $medical_appointment_theme_css= "";

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

    $medical_appointment_global_color = get_theme_mod('medical_appointment_global_color');

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

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

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

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

    $medical_appointment_scroll_to_top_border_radius = get_theme_mod('medical_appointment_scroll_to_top_border_radius');
    $medical_appointment_scroll_bg_color = get_theme_mod('medical_appointment_scroll_bg_color');
    $medical_appointment_scroll_color = get_theme_mod('medical_appointment_scroll_color');
    $medical_appointment_scroll_font_size = get_theme_mod('medical_appointment_scroll_font_size');
    if($medical_appointment_scroll_to_top_border_radius != false || $medical_appointment_scroll_bg_color != false || $medical_appointment_scroll_color != false || $medical_appointment_scroll_font_size != false){
        $medical_appointment_theme_css .='#colophon a#button{';
            $medical_appointment_theme_css .='border-radius: '.esc_attr($medical_appointment_scroll_to_top_border_radius).'px; background-color: '.esc_attr($medical_appointment_scroll_bg_color).'; color: '.esc_attr($medical_appointment_scroll_color).' !important; font-size: '.esc_attr($medical_appointment_scroll_font_size).'px;';
        $medical_appointment_theme_css .='}';
    }

    /*--------------------------- Slider Opacity -------------------*/
    $medical_appointment_slider_opacity_setting = get_theme_mod( 'medical_appointment_slider_opacity_setting',true);
    $medical_appointment_image_opacity_color = get_theme_mod( 'medical_appointment_image_opacity_color');
    $medical_appointment_slider_opacity = get_theme_mod( 'medical_appointment_slider_opacity');
    if( $medical_appointment_slider_opacity_setting != false) {
        $medical_appointment_theme_css .='#top-slider .slider-box img{';
            $medical_appointment_theme_css .='opacity: '. $medical_appointment_slider_opacity. ';';
        $medical_appointment_theme_css .='}';
        if( $medical_appointment_image_opacity_color != '') {
            $medical_appointment_theme_css .='#top-slider .slider-box {';
                $medical_appointment_theme_css .='background-color: '. $medical_appointment_image_opacity_color. ';';
            $medical_appointment_theme_css .='}';
        }
    } else {
        $medical_appointment_theme_css .='#top-slider .slider-box img{';
            $medical_appointment_theme_css .='opacity: 1;';
        $medical_appointment_theme_css .='}';
    }

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

    $medical_appointment_slider_img_height = get_theme_mod('medical_appointment_slider_img_height');
    if($medical_appointment_slider_img_height != false){
        $medical_appointment_theme_css .='.slider-box img{';
            $medical_appointment_theme_css .='height: '.esc_attr($medical_appointment_slider_img_height).';';
        $medical_appointment_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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