<?php

    $crowdfunding_donation_theme_css= "";

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

    $charity_zone_global_color = get_theme_mod('charity_zone_global_color');

    if ($charity_zone_global_color) {
        $crowdfunding_donation_theme_css .= ':root {';
        $crowdfunding_donation_theme_css .= '--first-color: ' . esc_attr($charity_zone_global_color) . ' !important;';
        $crowdfunding_donation_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'){
        $crowdfunding_donation_theme_css .='#button{';
            $crowdfunding_donation_theme_css .='right: 20px;';
        $crowdfunding_donation_theme_css .='}';
    }else if($charity_zone_scroll_position == 'Left'){
        $crowdfunding_donation_theme_css .='#button{';
            $crowdfunding_donation_theme_css .='left: 20px;right: auto;';
        $crowdfunding_donation_theme_css .='}';
    }else if($charity_zone_scroll_position == 'Center'){
        $crowdfunding_donation_theme_css .='#button{';
            $crowdfunding_donation_theme_css .='right: auto;left: 50%; transform:translateX(-50%);';
        $crowdfunding_donation_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){
        $crowdfunding_donation_theme_css .='#colophon #button{';
            $crowdfunding_donation_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;';
        $crowdfunding_donation_theme_css .='}';
    }