<?php

if (! defined('ABSPATH')) exit; // Exit if accessed directly

?>
<div class="ipb-section ipb-closing-settings">
 <div class="ipb-section-header">
    <h3>Closing Options</h3>
</div>
<div class="ipb-section-content" data-section="display">
<div class="closing_option">
    <div class="inner_wrapper">
        <div class="form_wrapper">
            <div class="input_fields">
                <input type="hidden" name="ipb_close_opts_version" value="1" />
                <div class="ipb-closing-row">
                    <div class="ipb-closing-label"><label>Close behavior</label></div>
                    <div class="ipb-closing-control ipb-closing-inline">
                        <label class="ipb-closing-check"><input type="checkbox" name="ipb_close_escape" id="ipb_closing_escape" value="yes"> Close by pressing ESC</label>
                        <label class="ipb-closing-check"><input type="checkbox" name="ipb_close_outside" id="ipb_closing_outside" value="yes"> Close by clicking outside</label>
                    </div>
                </div>
                <div class="ipb-closing-row">
                    <div class="ipb-closing-label"><label>Hide close button</label></div>
                    <div class="ipb-closing-control">
                        <label class="ipb-closing-check"><input type="checkbox" name="ipb_close_hide" id="ipb_closing_hide" value="yes"> Hide the X close button</label>
                    </div>
                </div>
            </div>
            <div class="ipb-closing-row ipb-close-position-row">
                <div class="ipb-closing-label"><label for="close_position"><?php esc_html_e( 'Close button position', 'instant-popup-builder' ); ?></label></div>
                <div class="ipb-closing-control">
                    <select name="close_position" id="close_position">
                        <option value="top-right" selected>Top Right</option>
                        <option value="top-left">Top Left</option>
                        <option value="bottom-left">Bottom Left</option>
                        <option value="bottom-right">Bottom Right</option>
                    </select>
                </div>
            </div>
        </div>
        <?php if (!class_exists('Instant_Popup_Advanced_Closing_Addon')): ?>
        <div class="ipb-upsell-card">
            <div class="ipb-upsell-card__title"><?php esc_html_e( 'Advanced Closing', 'instant-popup-builder' ); ?></div>
            <p class="ipb-upsell-card__desc">
                <?php esc_html_e( 'Unlock advanced closing controls (custom icon, label, auto-close, and more) for a polished popup experience.', 'instant-popup-builder' ); ?>
            </p>
            <div class="ipb-upsell-card__actions">
                <a href="https://instantpopupbuilder.com/extensions/advanced-closing/" target="_blank" class="button button-primary">
                    <?php esc_html_e( 'Upgrade to Pro', 'instant-popup-builder' ); ?>
                </a>
            </div>
        </div>
        <?php endif; ?>
    </div>
</div>
</div>
</div>
