<?php
if (!defined('ABSPATH')) {
    exit;
}
?>
<div id="knsdd-messages-modal" class="knsdd-modal" style="display:none;">
    <div class="knsdd-modal-content">
        <span class="knsdd-modal-close">&times;</span>
        <h3><?php esc_html_e('Mesajları Yapılandır', 'kns-dynamic-discounts-for-woocommerce'); ?></h3>
        <div class="knsdd-messages-form">
            <div class="knsdd-tabs">
                <button type="button" class="button knsdd-tab is-active"
                    data-tab="product"><?php esc_html_e('Ürün', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
                <button type="button" class="button knsdd-tab"
                    data-tab="cart"><?php esc_html_e('Sepet & Ödeme', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
            </div>
            <div class="knsdd-message-group knsdd-tab-content is-active" data-tab="product">

                <!-- BOGO Alt Sekmeleri (JS ile göster/gizle) -->
                <div class="knsdd-bogo-tabs" style="display:none;">
                    <button type="button" class="button knsdd-bogo-tab is-active" data-bogo-tab="trigger">
                        <?php esc_html_e('Tetikleyici Ürün Mesajı', 'kns-dynamic-discounts-for-woocommerce'); ?>
                    </button>
                    <button type="button" class="button knsdd-bogo-tab" data-bogo-tab="target">
                        <?php esc_html_e('Hedef Ürün Mesajı', 'kns-dynamic-discounts-for-woocommerce'); ?>
                    </button>
                </div>

                <!-- Standart Mesaj Formu (BOGO değilse) -->
                <div class="knsdd-standard-message-form">
                    <h4><?php esc_html_e('Ürün Sayfası (Tanıtım)', 'kns-dynamic-discounts-for-woocommerce'); ?>
                        <span class="knsdd-info-tooltip"
                            title="<?php esc_attr_e('Ürün sayfasında fiyatın yanında gösterilecek kampanya/indirim mesajı', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
                                fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                stroke-linejoin="round">
                                <circle cx="12" cy="12" r="10"></circle>
                                <line x1="12" y1="16" x2="12" y2="12"></line>
                                <line x1="12" y1="8" x2="12.01" y2="8"></line>
                            </svg>
                        </span>
                    </h4>
                    <div class="knsdd-form-field knsdd-field-text">
                        <label for="knsdd-message-product"><?php esc_html_e('Mesaj Metni', 'kns-dynamic-discounts-for-woocommerce'); ?>
                            <span class="knsdd-info-tooltip"
                                title="<?php esc_attr_e('Müşteriye gösterilecek metin. Örn: 3 Al 2 Öde! veya %20 İndirim!', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
                                    fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                    stroke-linejoin="round">
                                    <circle cx="12" cy="12" r="10"></circle>
                                    <line x1="12" y1="16" x2="12" y2="12"></line>
                                    <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                </svg>
                            </span>
                        </label>
                        <textarea id="knsdd-message-product" rows="2"></textarea>
                    </div>
                    <div class="knsdd-form-field knsdd-field-color">
                        <div class="knsdd-color-grid">
                            <div class="knsdd-color-col">
                                <label><?php esc_html_e('Mesaj Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('Mesaj metninin rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-message-color-product">
                                    <input type="text" id="knsdd-message-color-hex-product"
                                        class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-show-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesajı Göster', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('İşaretlenirse mesaj ürün sayfasında görünür hale gelir', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <div class="knsdd-inline-show-group">
                                    <label class="knsdd-inline-show"><input type="checkbox" id="knsdd-show-product">
                                        <?php esc_html_e('Ürün Sayfasında Göster', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                            <div class="knsdd-highlight-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesaj Vurgusu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('Mesajı kalın yazı tipiyle vurgulu gösterir', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <div class="knsdd-highlight-group">
                                    <label><input type="checkbox" id="knsdd-highlight-product">
                                        <?php esc_html_e('Vurgulu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="knsdd-form-field">
                        <div class="knsdd-icon-settings">
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('Mesaj İkonu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('Mesajın yanında görsel bir ikon gösterir. Dikkat çekicilik için önerilir.', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <label class="knsdd-inline-check"><input type="checkbox"
                                        id="knsdd-icon-enabled-product">
                                    <?php esc_html_e('İkon kullan', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                            </div>
                            <div class="knsdd-form-field knsdd-icon-package-field">
                                <label><?php esc_html_e('İkon Paketi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('Gösterilecek ikonu seçin', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <div class="knsdd-inline-group">
                                    <button type="button" class="button knsdd-open-icon-picker"
                                        data-scope="product"><?php esc_html_e('Seç', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
                                    <span id="knsdd-icon-preview-product" class="knsdd-icon-preview"
                                        aria-hidden="true"></span>
                                </div>
                                <input type="hidden" id="knsdd-icon-value-product" value="">
                            </div>
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('İkon Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('İkonun rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-icon-color-product">
                                    <input type="text" id="knsdd-icon-color-hex-product" class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-form-field">
                                <label for="knsdd-icon-position-product"><?php esc_html_e('İkon Konumu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('İkonun metne göre konumu', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <select id="knsdd-icon-position-product">
                                    <option value="before"><?php esc_html_e('Metinden Önce', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="after"><?php esc_html_e('Metinden Sonra', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                            <div class="knsdd-form-field">
                                <label for="knsdd-icon-size-product"><?php esc_html_e('İkon Boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                    <span class="knsdd-info-tooltip"
                                        title="<?php esc_attr_e('İkonun ekranda görünecek boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"
                                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
                                            stroke-linecap="round" stroke-linejoin="round">
                                            <circle cx="12" cy="12" r="10"></circle>
                                            <line x1="12" y1="16" x2="12" y2="12"></line>
                                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                        </svg>
                                    </span>
                                </label>
                                <select id="knsdd-icon-size-product">
                                    <option value="sm"><?php esc_html_e('Küçük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="md" selected><?php esc_html_e('Orta', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="lg"><?php esc_html_e('Büyük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- BOGO Tetikleyici Mesaj Formu -->
                <div class="knsdd-bogo-message-form" data-bogo-tab="trigger" style="display:none;">
                    <h4><?php esc_html_e('Tetikleyici Ürün Sayfası', 'kns-dynamic-discounts-for-woocommerce'); ?></h4>
                    <p class="description">
                        <?php esc_html_e('Bu mesaj, kampanyayı tetikleyen ürünlerin sayfasında gösterilir.', 'kns-dynamic-discounts-for-woocommerce'); ?>
                    </p>

                    <div class="knsdd-form-field knsdd-field-text">
                        <label for="knsdd-message-product-trigger"><?php esc_html_e('Mesaj Metni', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                        <textarea id="knsdd-message-product-trigger" rows="2"></textarea>
                    </div>
                    <div class="knsdd-form-field knsdd-field-color">
                        <div class="knsdd-color-grid">
                            <div class="knsdd-color-col">
                                <label><?php esc_html_e('Mesaj Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-message-color-product-trigger">
                                    <input type="text" id="knsdd-message-color-hex-product-trigger"
                                        class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-show-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesajı Göster', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-inline-show-group">
                                    <label class="knsdd-inline-show"><input type="checkbox"
                                            id="knsdd-show-product-trigger">
                                        <?php esc_html_e('Ürün Sayfasında Göster', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                            <div class="knsdd-highlight-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesaj Vurgusu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-highlight-group">
                                    <label><input type="checkbox" id="knsdd-highlight-product-trigger">
                                        <?php esc_html_e('Vurgulu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="knsdd-form-field">
                        <div class="knsdd-icon-settings">
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('Mesaj İkonu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <label class="knsdd-inline-check"><input type="checkbox"
                                        id="knsdd-icon-enabled-product-trigger">
                                    <?php esc_html_e('İkon kullan', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                            </div>
                            <div class="knsdd-form-field knsdd-icon-package-field">
                                <label><?php esc_html_e('İkon Paketi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-inline-group">
                                    <button type="button" class="button knsdd-open-icon-picker"
                                        data-scope="product-trigger"><?php esc_html_e('Seç', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
                                    <span id="knsdd-icon-preview-product-trigger" class="knsdd-icon-preview"
                                        aria-hidden="true"></span>
                                </div>
                                <input type="hidden" id="knsdd-icon-value-product-trigger" value="">
                            </div>
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('İkon Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-icon-color-product-trigger">
                                    <input type="text" id="knsdd-icon-color-hex-product-trigger"
                                        class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-form-field">
                                <label
                                    for="knsdd-icon-position-product-trigger"><?php esc_html_e('İkon Konumu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <select id="knsdd-icon-position-product-trigger">
                                    <option value="before"><?php esc_html_e('Metinden Önce', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="after"><?php esc_html_e('Metinden Sonra', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                            <div class="knsdd-form-field">
                                <label
                                    for="knsdd-icon-size-product-trigger"><?php esc_html_e('İkon Boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <select id="knsdd-icon-size-product-trigger">
                                    <option value="sm"><?php esc_html_e('Küçük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="md" selected><?php esc_html_e('Orta', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="lg"><?php esc_html_e('Büyük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- BOGO Hedef Mesaj Formu -->
                <div class="knsdd-bogo-message-form" data-bogo-tab="target" style="display:none;">
                    <h4><?php esc_html_e('Hedef Ürün Sayfası', 'kns-dynamic-discounts-for-woocommerce'); ?></h4>
                    <p class="description">
                        <?php esc_html_e('Bu mesaj, indirim alan ürünlerin sayfasında gösterilir.', 'kns-dynamic-discounts-for-woocommerce'); ?>
                    </p>

                    <div class="knsdd-form-field knsdd-field-text">
                        <label for="knsdd-message-product-target"><?php esc_html_e('Mesaj Metni', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                        <textarea id="knsdd-message-product-target" rows="2"></textarea>
                    </div>
                    <div class="knsdd-form-field knsdd-field-color">
                        <div class="knsdd-color-grid">
                            <div class="knsdd-color-col">
                                <label><?php esc_html_e('Mesaj Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-message-color-product-target">
                                    <input type="text" id="knsdd-message-color-hex-product-target"
                                        class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-show-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesajı Göster', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-inline-show-group">
                                    <label class="knsdd-inline-show"><input type="checkbox"
                                            id="knsdd-show-product-target">
                                        <?php esc_html_e('Ürün Sayfasında Göster', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                            <div class="knsdd-highlight-col">
                                <label class="knsdd-inline-title"><?php esc_html_e('Mesaj Vurgusu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-highlight-group">
                                    <label><input type="checkbox" id="knsdd-highlight-product-target">
                                        <?php esc_html_e('Vurgulu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="knsdd-form-field">
                        <div class="knsdd-icon-settings">
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('Mesaj İkonu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <label class="knsdd-inline-check"><input type="checkbox"
                                        id="knsdd-icon-enabled-product-target">
                                    <?php esc_html_e('İkon kullan', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                            </div>
                            <div class="knsdd-form-field knsdd-icon-package-field">
                                <label><?php esc_html_e('İkon Paketi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-inline-group">
                                    <button type="button" class="button knsdd-open-icon-picker"
                                        data-scope="product-target"><?php esc_html_e('Seç', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
                                    <span id="knsdd-icon-preview-product-target" class="knsdd-icon-preview"
                                        aria-hidden="true"></span>
                                </div>
                                <input type="hidden" id="knsdd-icon-value-product-target" value="">
                            </div>
                            <div class="knsdd-form-field">
                                <label><?php esc_html_e('İkon Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <div class="knsdd-color-picker-wrapper">
                                    <input type="color" id="knsdd-icon-color-product-target">
                                    <input type="text" id="knsdd-icon-color-hex-product-target"
                                        class="knsdd-color-hex-input">
                                </div>
                            </div>
                            <div class="knsdd-form-field">
                                <label
                                    for="knsdd-icon-position-product-target"><?php esc_html_e('İkon Konumu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <select id="knsdd-icon-position-product-target">
                                    <option value="before"><?php esc_html_e('Metinden Önce', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="after"><?php esc_html_e('Metinden Sonra', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                            <div class="knsdd-form-field">
                                <label
                                    for="knsdd-icon-size-product-target"><?php esc_html_e('İkon Boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <select id="knsdd-icon-size-product-target">
                                    <option value="sm"><?php esc_html_e('Küçük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="md" selected><?php esc_html_e('Orta', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                    <option value="lg"><?php esc_html_e('Büyük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Çakışma Bilgilendirmesi -->
                <div class="knsdd-bogo-overlap-info" style="display:none;">
                    <div class="knsdd-info-box">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
                            stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <circle cx="12" cy="12" r="10"></circle>
                            <line x1="12" y1="16" x2="12" y2="12"></line>
                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                        </svg>
                        <p><strong><?php esc_html_e('Çakışma Durumunda:', 'kns-dynamic-discounts-for-woocommerce'); ?></strong>
                            <?php esc_html_e('Bir ürün hem tetikleyici hem hedefte ise, hedef mesajı öncelikli gösterilir.', 'kns-dynamic-discounts-for-woocommerce'); ?>
                        </p>
                    </div>
                </div>

            </div>
            <div class="knsdd-message-group knsdd-tab-content" data-tab="cart">
                <h4><?php esc_html_e('Sepet & Ödeme (Onay)', 'kns-dynamic-discounts-for-woocommerce'); ?>
                    <span class="knsdd-info-tooltip"
                        title="<?php esc_attr_e('Sepet ve ödeme sayfalarında uygulanan indirimi bildiren onay mesajı', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
                            stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <circle cx="12" cy="12" r="10"></circle>
                            <line x1="12" y1="16" x2="12" y2="12"></line>
                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                        </svg>
                    </span>
                </h4>
                <div class="knsdd-form-field knsdd-field-text">
                    <label for="knsdd-message-cart"><?php esc_html_e('Mesaj Metni', 'kns-dynamic-discounts-for-woocommerce'); ?>
                        <span class="knsdd-info-tooltip"
                            title="<?php esc_attr_e('Sepet/ödeme sayfasında gösterilecek indirim onay mesajı', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                            <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                stroke-linejoin="round">
                                <circle cx="12" cy="12" r="10"></circle>
                                <line x1="12" y1="16" x2="12" y2="12"></line>
                                <line x1="12" y1="8" x2="12.01" y2="8"></line>
                            </svg>
                        </span>
                    </label>
                    <textarea id="knsdd-message-cart" rows="2"></textarea>
                </div>
                <div class="knsdd-form-field knsdd-field-color">
                    <div class="knsdd-color-grid">
                        <div class="knsdd-color-col">
                            <label><?php esc_html_e('Mesaj Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('Mesaj metninin rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <div class="knsdd-color-picker-wrapper">
                                <input type="color" id="knsdd-message-color-cart">
                                <input type="text" id="knsdd-message-color-hex-cart" class="knsdd-color-hex-input">
                            </div>
                        </div>
                        <div class="knsdd-show-col">
                            <label class="knsdd-inline-title"><?php esc_html_e('Mesaj Gösterim Alanları', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('Mesajın hangi sayfalarda gösterileceğini seçin', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <div class="knsdd-inline-show-group">
                                <label class="knsdd-inline-show"><input type="checkbox" id="knsdd-show-mini">
                                    <?php esc_html_e('Mini Sepet', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <label class="knsdd-inline-show"><input type="checkbox" id="knsdd-show-cart">
                                    <?php esc_html_e('Sepet Sayfası', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                                <label class="knsdd-inline-show"><input type="checkbox" id="knsdd-show-checkout">
                                    <?php esc_html_e('Ödeme Sayfası', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                            </div>
                        </div>
                        <div class="knsdd-highlight-col">
                            <label class="knsdd-inline-title"><?php esc_html_e('Mesaj Vurgusu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('Mesajı kalın yazı tipiyle vurgulu gösterir', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <div class="knsdd-highlight-group">
                                <label><input type="checkbox" id="knsdd-highlight-cart">
                                    <?php esc_html_e('Vurgulu', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="knsdd-form-field">
                    <div class="knsdd-icon-settings">
                        <div class="knsdd-form-field">
                            <label><?php esc_html_e('Mesaj İkonu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('Mesajın yanında görsel bir ikon gösterir', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <label class="knsdd-inline-check"><input type="checkbox" id="knsdd-icon-enabled-cart">
                                <?php esc_html_e('İkon kullan', 'kns-dynamic-discounts-for-woocommerce'); ?></label>
                        </div>
                        <div class="knsdd-form-field knsdd-icon-package-field">
                            <label><?php esc_html_e('İkon Paketi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('Gösterilecek ikonu seçin', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <div class="knsdd-inline-group">
                                <button type="button" class="button knsdd-open-icon-picker"
                                    data-scope="cart"><?php esc_html_e('Seç', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
                                <span id="knsdd-icon-preview-cart" class="knsdd-icon-preview" aria-hidden="true"></span>
                            </div>
                            <input type="hidden" id="knsdd-icon-value-cart" value="">
                        </div>
                        <div class="knsdd-form-field">
                            <label><?php esc_html_e('İkon Rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip" title="<?php esc_attr_e('İkonun rengi', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <div class="knsdd-color-picker-wrapper">
                                <input type="color" id="knsdd-icon-color-cart">
                                <input type="text" id="knsdd-icon-color-hex-cart" class="knsdd-color-hex-input">
                            </div>
                        </div>
                        <div class="knsdd-form-field">
                            <label for="knsdd-icon-position-cart"><?php esc_html_e('İkon Konumu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('İkonun metne göre konumu', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <select id="knsdd-icon-position-cart">
                                <option value="before"><?php esc_html_e('Metinden Önce', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                <option value="after"><?php esc_html_e('Metinden Sonra', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                            </select>
                        </div>
                        <div class="knsdd-form-field">
                            <label for="knsdd-icon-size-cart"><?php esc_html_e('İkon Boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?>
                                <span class="knsdd-info-tooltip"
                                    title="<?php esc_attr_e('İkonun ekranda görünecek boyutu', 'kns-dynamic-discounts-for-woocommerce'); ?>">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="16" x2="12" y2="12"></line>
                                        <line x1="12" y1="8" x2="12.01" y2="8"></line>
                                    </svg>
                                </span>
                            </label>
                            <select id="knsdd-icon-size-cart">
                                <option value="sm"><?php esc_html_e('Küçük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                <option value="md" selected><?php esc_html_e('Orta', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                                <option value="lg"><?php esc_html_e('Büyük', 'kns-dynamic-discounts-for-woocommerce'); ?></option>
                            </select>
                        </div>
                    </div>
                </div>

                <!-- BOGO Sepet Bilgilendirmesi -->
                <div class="knsdd-bogo-cart-info" style="display:none;">
                    <div class="knsdd-info-box">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
                            stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <circle cx="12" cy="12" r="10"></circle>
                            <line x1="12" y1="16" x2="12" y2="12"></line>
                            <line x1="12" y1="8" x2="12.01" y2="8"></line>
                        </svg>
                        <p><strong><?php esc_html_e('BOGO Kampanyası:', 'kns-dynamic-discounts-for-woocommerce'); ?></strong>
                            <?php esc_html_e('Bu mesaj sadece hedef ürünler için gösterilir. Tetikleyici ürünler için sepet mesajı gösterilmez.', 'kns-dynamic-discounts-for-woocommerce'); ?>
                        </p>
                    </div>
                </div>

            </div>
        </div>
        <div class="knsdd-modal-actions">
            <button class="button button-primary"
                id="knsdd-save-messages"><?php esc_html_e('Mesajları Kaydet', 'kns-dynamic-discounts-for-woocommerce'); ?></button>
        </div>
    </div>
</div>
<!-- Ortak İkon Seçici (5x5) -->
<div id="knsdd-icon-picker" class="knsdd-icon-picker" style="display:none;">
    <div class="knsdd-icon-picker-header">
        <strong><?php esc_html_e('İkon Paketi', 'kns-dynamic-discounts-for-woocommerce'); ?></strong>
        <button type="button" class="button-link knsdd-icon-picker-close"
            aria-label="<?php esc_attr_e('Kapat', 'kns-dynamic-discounts-for-woocommerce'); ?>">&times;</button>
    </div>
    <div class="knsdd-icon-grid" aria-label="<?php esc_attr_e('İkon Seçimi', 'kns-dynamic-discounts-for-woocommerce'); ?>">
        <!-- JS ile 25 ikon doldurulacak -->
    </div>

</div>