<?php
/**
 * ParcelSelector legal content — Terms of Service and Privacy Policy.
 * Full legal texts are maintained at parcelselector.com (always up to date).
 *
 * @package ParcelSelector
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Returns Terms of Service summary with link to full text.
 */
if ( ! function_exists( 'parcselect_get_terms_of_service_html' ) ) {
function parcselect_get_terms_of_service_html() {
	ob_start();
	?>
	<div class="ps-legal-content" style="font-size:13px;line-height:1.7;color:#374151;padding:12px 16px;background:#f9fafb;border-radius:6px;border:1px solid #e5e7eb;">
		<h4 style="margin:0 0 8px;font-size:14px;color:#111827;"><?php esc_html_e( 'Terms of Service — ParcelSelector.com', 'parcel-selector' ); ?></h4>
		<p style="margin:0 0 8px;"><?php esc_html_e( 'By activating this plugin you agree to the ParcelSelector Terms of Service and Privacy Policy.', 'parcel-selector' ); ?></p>
		<ul style="padding-left:18px;margin:0 0 10px;">
			<li><?php esc_html_e( 'The plugin code is licensed under GPL-2.0-or-later.', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'The parcelselector.com API and license infrastructure are proprietary services.', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'Free plan: 52 orders / 3 months (without activation) or 100 orders / 6 months (after free registration).', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'No customer personal data is transmitted to parcelselector.com servers.', 'parcel-selector' ); ?></li>
		</ul>
		<p style="margin:0;">
			<a href="https://parcelselector.com/en/terms/" target="_blank" rel="noopener noreferrer" style="color:#f97316;font-weight:600;">
				<?php esc_html_e( 'Read full Terms of Service →', 'parcel-selector' ); ?>
			</a>
		</p>
	</div>
	<?php
	return ob_get_clean();
}
}

/**
 * Returns Privacy Policy summary with link to full text.
 */
if ( ! function_exists( 'parcselect_get_privacy_policy_html' ) ) {
function parcselect_get_privacy_policy_html() {
	ob_start();
	?>
	<div class="ps-legal-content" style="font-size:13px;line-height:1.7;color:#374151;padding:12px 16px;background:#f9fafb;border-radius:6px;border:1px solid #e5e7eb;">
		<h4 style="margin:0 0 8px;font-size:14px;color:#111827;"><?php esc_html_e( 'Privacy Policy — ParcelSelector.com', 'parcel-selector' ); ?></h4>
		<p style="margin:0 0 8px;"><?php esc_html_e( 'Data collected during activation and license sync:', 'parcel-selector' ); ?></p>
		<ul style="padding-left:18px;margin:0 0 10px;">
			<li><?php esc_html_e( 'Installation ID (anonymous UUID generated locally)', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'Site URL, WordPress / WooCommerce / PHP version', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'Order counter — used only to enforce plan limits', 'parcel-selector' ); ?></li>
			<li><?php esc_html_e( 'Admin first name and email (only if provided during registration)', 'parcel-selector' ); ?></li>
		</ul>
		<p style="margin:0 0 6px;"><?php esc_html_e( 'We never collect: customer names, email addresses, payment data, or order contents.', 'parcel-selector' ); ?></p>
		<p style="margin:0;">
			<a href="https://parcelselector.com/en/privacy/" target="_blank" rel="noopener noreferrer" style="color:#f97316;font-weight:600;">
				<?php esc_html_e( 'Read full Privacy Policy →', 'parcel-selector' ); ?>
			</a>
		</p>
	</div>
	<?php
	return ob_get_clean();
}
}
