<?php
/**
 * Common modals: logout + delete account.
 * Include at end of dashboard pages, before scripts.
 */
?>
<!-- Logout -->
<div class="modal fade" id="logoutModal" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content text-center p-4">
            <div style="font-size:80px;margin-bottom:12px">🔐</div>
            <h4 style="color:var(--primary);font-weight:700">Logout Account?</h4>
            <p class="text-muted small mb-4">Do you really want to logout from your account?</p>
            <div class="d-flex gap-2 justify-content-center">
                <button id="confirmLogout" class="btn-primary-custom">Logout Account</button>
                <button class="btn-dark-custom" data-bs-dismiss="modal">No, Cancel</button>
            </div>
        </div>
    </div>
</div>

<!-- Delete Account -->
<div class="modal fade" id="deleteAccountModal" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content text-center p-4">
            <div style="font-size:80px;margin-bottom:12px">🗑️</div>
            <h4 style="color:var(--danger);font-weight:700">Delete Account?</h4>
            <p class="text-muted small mb-4">
                This action is permanent. All your campaigns and data will be hidden.
                Please enter your password to confirm.
            </p>
            <input type="password" id="deletePasswordConfirm" class="form-control mb-3"
                   placeholder="Your password" style="max-width:280px;margin:0 auto;border-radius:25px;text-align:center">
            <div class="d-flex gap-2 justify-content-center">
                <button id="confirmDeleteAccount" class="btn-primary-custom" style="background:var(--danger)">Delete Account</button>
                <button class="btn-dark-custom" data-bs-dismiss="modal">No, Cancel</button>
            </div>
        </div>
    </div>
</div>

<!-- Insufficient Credits (used on add campaign / checkout) -->
<div class="modal fade" id="insufficientCreditsModal" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content text-center p-4">
            <div style="font-size:80px;margin-bottom:12px">💰</div>
            <h4 style="color:var(--primary);font-weight:700">Insufficient Credits</h4>
            <p class="text-muted small mb-4">You need to purchase a plan to publish this campaign.</p>
            <button class="btn-primary-custom w-100" data-bs-dismiss="modal">Okay</button>
        </div>
    </div>
</div>
