<?php
session_start();

require_once __DIR__ . '/../../includes/helpers.php';
require_once __DIR__ . '/../../includes/layout.php';
require_once __DIR__ . '/../../includes/expense_shell.php';

if (!isset($_SESSION['authenticated'])) {
    redirect(page_url('signin'));
}

render_expense_shell_start('Cards | Expense', 'dashboard-page cards-connect-page', 'cards');
?>
<div class="page-surface page-surface--dimmed">
    <section class="bank-modal bank-modal--terms">
        <header class="bank-modal-header">
            <h2>Connect your card to Zoho Expense!</h2>
            <a class="page-close-button" href="<?= e(page_url('cards')) ?>" aria-label="Close">
                <i class="fa-solid fa-xmark" aria-hidden="true"></i>
            </a>
        </header>

        <p class="bank-modal-copy">Kindly read and agree to the End User License Agreement (EULA) to proceed.</p>

        <div class="bank-terms-box">
            <div class="bank-terms-sheet">
                <h3>Terms and Conditions for Bank and Card Feed Services</h3>
                <p>
                    This demo flow mirrors the structure of the Zoho screen shown in your screenshots.
                    It contains a long scrollable agreement area, a consent checkbox, and the proceed / cancel actions.
                </p>
                <h4>1. Data Collection</h4>
                <p>Your selected card or account data is shared only for connecting feeds and matching transactions inside the app.</p>
                <h4>2. Accurate Information</h4>
                <p>You agree to provide truthful and current details and to keep those details updated when anything changes.</p>
                <h4>3. Credentials</h4>
                <p>Connection credentials are used only for the import process and are not shown to other users in the workspace.</p>
                <h4>4. Proprietary Rights</h4>
                <p>All third-party brands and logos belong to their respective owners and are used here only as UI references.</p>
                <h4>5. Content You Provide</h4>
                <p>Uploaded content may be processed to extract information required for feed setup and statement matching.</p>
                <h4>6. Third Party Accounts</h4>
                <p>By continuing, you authorize the application to connect to supported providers on your behalf.</p>
                <h4>7. Disclaimer of Warranties</h4>
                <p>The service is offered as-is for demonstration purposes and may not be uninterrupted or error-free.</p>
                <h4>8. Limitation of Liability</h4>
                <p>Neither the service nor its providers are liable for incidental or consequential damages caused by use.</p>
                <h4>9. Indemnification</h4>
                <p>You agree to hold the service harmless from claims arising from misuse, account access issues, or violations.</p>
            </div>
        </div>

        <label class="bank-terms-check">
            <input type="checkbox">
            <span>I agree to the End User Terms for Automatic Bank Feeds</span>
        </label>

        <footer class="bank-modal-footer">
            <a class="expense-primary" href="<?= e(route_url('cards/connect-card/banks/')) ?>">Proceed</a>
            <a class="expense-ghost" href="<?= e(page_url('cards')) ?>">Cancel</a>
        </footer>
    </section>
</div>
<?php render_expense_shell_end(); ?>
