<?php

    $charity_zone_theme_css= "";

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

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

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

    $charity_zone_scroll_to_top_border_radius = get_theme_mod('charity_zone_scroll_to_top_border_radius');
    $charity_zone_scroll_bg_color = get_theme_mod('charity_zone_scroll_bg_color');
    $charity_zone_scroll_color = get_theme_mod('charity_zone_scroll_color');
    $charity_zone_scroll_font_size = get_theme_mod('charity_zone_scroll_font_size');
    if($charity_zone_scroll_to_top_border_radius != false || $charity_zone_scroll_bg_color != false || $charity_zone_scroll_color != false || $charity_zone_scroll_font_size != false){
        $charity_zone_theme_css .='#colophon #button{';
            $charity_zone_theme_css .='border-radius: '.esc_attr($charity_zone_scroll_to_top_border_radius).'px; background-color: '.esc_attr($charity_zone_scroll_bg_color).'; color: '.esc_attr($charity_zone_scroll_color).' !important; font-size: '.esc_attr($charity_zone_scroll_font_size).'px;';
        $charity_zone_theme_css .='}';
    }

    /*------------------ Slider CSS -------------------*/
    $charity_zone_slider_opacity_setting = get_theme_mod( 'charity_zone_slider_opacity_setting',true);
    $charity_zone_image_opacity_color = get_theme_mod( 'charity_zone_image_opacity_color');
    $charity_zone_slider_opacity = get_theme_mod( 'charity_zone_slider_opacity');
    if( $charity_zone_slider_opacity_setting != false) {
        $charity_zone_theme_css .='#top-slider .slider-box img{';
            $charity_zone_theme_css .='opacity: '. $charity_zone_slider_opacity. ' !important;';
        $charity_zone_theme_css .='}';
        if( $charity_zone_image_opacity_color != '') {
            $charity_zone_theme_css .='.slider-box{';
                $charity_zone_theme_css .='background-color: '. $charity_zone_image_opacity_color. ';';
            $charity_zone_theme_css .='}';
        }
    } else {
        $charity_zone_theme_css .='#top-slider .slider-box img{';
            $charity_zone_theme_css .='opacity: 1 !important;';
        $charity_zone_theme_css .='}';
    }