<?php
function aump_add_popup_html() {
    // Get button text and colors from settings
    $next_text = get_option("aump_next_text", __("Next", "advanced-universal-modern-portfolio-and-gallery"));
    $next_bg = get_option("aump_next_prev_bg", "#000");
    $next_text_color = get_option("aump_next_prev_text_color", "#fff");
    $prev_text = get_option("aump_prev_text", __("Previous", "advanced-universal-modern-portfolio-and-gallery"));
    $prev_bg = get_option("aump_next_prev_bg", "#000");
    $prev_text_color = get_option("aump_next_prev_text_color", "#fff");
    $close_bg = get_option("aump_close_bg", "#000");
    $close_text_color = get_option("aump_close_text_color", "#000");
    ?>

    <div id="aump_project-popup" class="aump_popup" style="display:none;">
        <div class="aump_popup-content">
            <div class="aump_popup-header">
                <button class="aump_prev-project" style="background: <?php echo esc_attr($prev_bg); ?>; color: <?php echo esc_attr($prev_text_color); ?>;">
                    <span class="aump_previous-button-circle">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M5.093 13.031c.285.3.747.3 1.031 0a.8.8 0 0 0 0-1.09l-2.803-2.96h10.21c.402 0 .728-.345.728-.77s-.326-.77-.729-.77H3.173l2.951-3.118a.8.8 0 0 0 0-1.09.7.7 0 0 0-1.031 0L.97 7.589a.8.8 0 0 0 0 1.09l.07.072.01.01z"></path>
                        </svg>
                    </span> 
                    <?php echo esc_html($prev_text); ?>
                </button>

                <button class="aump_next-project" style="background: <?php echo esc_attr($next_bg); ?>; color: <?php echo esc_attr($next_text_color); ?>;">
                    <?php echo esc_html($next_text); ?>
                    <span class="aump_next-button-circle">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 15 11">
                            <path d="M9.923.969a.7.7 0 0 0-1.031 0 .8.8 0 0 0 0 1.089l2.804 2.961H1.486c-.403 0-.73.345-.73.77s.327.77.73.77h10.358L8.892 9.678a.8.8 0 0 0 0 1.09c.285.3.746.3 1.031 0l4.123-4.355a.8.8 0 0 0 0-1.09l-.07-.072-.009-.01z"></path>
                        </svg>
                    </span>
                </button>

                <div class="aump_close-popup" style="background: <?php echo esc_attr($close_bg); ?>; color: <?php echo esc_attr($close_text_color); ?>;">
                    ×
                </div>
            </div>  
            
            <div id="aump_popup-content-area">
                <!-- Project content will be loaded here -->
            </div> 
        </div>
    </div>
    <?php
}
add_action('wp_footer', 'aump_add_popup_html');