<?php
/**
 * HR Press Lite — Upgrade to Pro page.
 *
 * Rendered inside the WP admin when the user clicks "Upgrade to Pro".
 * Guideline 11: content is scoped to the plugin's own admin page.
 * Guideline 9:  framing is "what Pro offers", NOT "what is locked in Lite".
 *
 * @package HR_Press_Lite
 */

defined( 'ABSPATH' ) || exit;

$upgrade_url = 'https://CodeClove.com/hr-press';
?>
<div class="hrp-upgrade-page wrap">

	<div class="hrp-upgrade-hero">
		<div class="hrp-upgrade-hero-inner">
			<span class="hrp-pro-badge">PRO</span>
			<h1 class="hrp-upgrade-title">
				<?php esc_html_e( 'Unlock the Full Power of HR Press', 'hr-press-lite' ); ?>
			</h1>
			<p class="hrp-upgrade-subtitle">
				<?php esc_html_e( 'HR Press Pro gives your team everything Lite has, plus powerful modules built for growing businesses.', 'hr-press-lite' ); ?>
			</p>
			<a id="hrp-upgrade-hero-cta"
				href="<?php echo esc_url( $upgrade_url ); ?>"
				target="_blank"
				rel="noopener noreferrer"
				class="hrp-btn-upgrade">
				<?php esc_html_e( 'Get HR Press Pro', 'hr-press-lite' ); ?>
				<span class="hrp-btn-arrow">&#8594;</span>
			</a>
		</div>
	</div>

	<div class="hrp-upgrade-features">
		<h2 class="hrp-upgrade-section-title">
			<?php esc_html_e( 'What You Get with HR Press Pro', 'hr-press-lite' ); ?>
		</h2>
		<div class="hrp-upgrade-cards">

			<div class="hrp-upgrade-card" id="hrp-pro-feature-leaves">
				<div class="hrp-upgrade-card-icon">
					<span class="dashicons dashicons-airplane"></span>
				</div>
				<h3><?php esc_html_e( 'Leave Management', 'hr-press-lite' ); ?></h3>
				<p><?php esc_html_e( 'Full leave request and approval workflows. Employees submit leave directly from their dashboard; HR approves or declines in one click.', 'hr-press-lite' ); ?></p>
				<ul class="hrp-feature-list">
					<li><?php esc_html_e( 'Multiple leave types', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Employee self-service leave portal', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Leave balance tracking', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Approval / rejection workflow', 'hr-press-lite' ); ?></li>
				</ul>
			</div>

			<div class="hrp-upgrade-card" id="hrp-pro-feature-payroll">
				<div class="hrp-upgrade-card-icon">
					<span class="dashicons dashicons-money-alt"></span>
				</div>
				<h3><?php esc_html_e( 'Payroll', 'hr-press-lite' ); ?></h3>
				<p><?php esc_html_e( 'Automate salary calculations and generate payslips without leaving WordPress. Save hours every pay cycle.', 'hr-press-lite' ); ?></p>
				<ul class="hrp-feature-list">
					<li><?php esc_html_e( 'Salary computation engine', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Deductions & allowances', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Payslip generation', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Pay-period management', 'hr-press-lite' ); ?></li>
				</ul>
			</div>

			<div class="hrp-upgrade-card" id="hrp-pro-feature-reports">
				<div class="hrp-upgrade-card-icon">
					<span class="dashicons dashicons-chart-bar"></span>
				</div>
				<h3><?php esc_html_e( 'Advanced Reports', 'hr-press-lite' ); ?></h3>
				<p><?php esc_html_e( 'Deep-dive analytics across attendance, leaves, and payroll. Make data-driven HR decisions with confidence.', 'hr-press-lite' ); ?></p>
				<ul class="hrp-feature-list">
					<li><?php esc_html_e( 'Attendance reports', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Leave usage reports', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Payroll summaries', 'hr-press-lite' ); ?></li>
					<li><?php esc_html_e( 'Export to CSV', 'hr-press-lite' ); ?></li>
				</ul>
			</div>

		</div>
	</div>

	<div class="hrp-upgrade-compare">
		<h2 class="hrp-upgrade-section-title">
			<?php esc_html_e( 'Lite vs Pro — Feature Comparison', 'hr-press-lite' ); ?>
		</h2>
		<table class="hrp-compare-table" id="hrp-feature-compare-table">
			<thead>
				<tr>
					<th><?php esc_html_e( 'Feature', 'hr-press-lite' ); ?></th>
					<th class="hrp-col-lite"><?php esc_html_e( 'Lite (Free)', 'hr-press-lite' ); ?></th>
					<th class="hrp-col-pro"><?php esc_html_e( 'Pro', 'hr-press-lite' ); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php
				$features = array(
					array( esc_html__( 'Employee Management', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Department & Designations', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Attendance Tracking', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Shift Management', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Holiday Management', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Announcements', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Email Notifications', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Employee Self-Service Portal', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Basic Reports', 'hr-press-lite' ), true, true ),
					array( esc_html__( 'Leave Management & Approvals', 'hr-press-lite' ), false, true ),
					array( esc_html__( 'Employee Leave Portal', 'hr-press-lite' ), false, true ),
					array( esc_html__( 'Payroll Management', 'hr-press-lite' ), false, true ),
					array( esc_html__( 'Payslip Generation', 'hr-press-lite' ), false, true ),
					array( esc_html__( 'Advanced Analytics & Reports', 'hr-press-lite' ), false, true ),
					array( esc_html__( 'Priority Support', 'hr-press-lite' ), false, true ),
				);
				foreach ( $features as $feature ) :
					$name      = $feature[0];
					$has_lite  = $feature[1];
					$has_pro   = $feature[2];
					$row_class = ! $has_lite ? 'hrp-row-pro-only' : '';
					?>
					<tr class="<?php echo esc_attr( $row_class ); ?>">
						<td><?php echo esc_html( $name ); ?></td>
						<td class="hrp-col-lite">
							<?php if ( $has_lite ) : ?>
								<span class="hrp-check" aria-label="<?php esc_attr_e( 'Included', 'hr-press-lite' ); ?>">&#10003;</span>
							<?php else : ?>
								<span class="hrp-cross" aria-label="<?php esc_attr_e( 'Not included', 'hr-press-lite' ); ?>">&#8212;</span>
							<?php endif; ?>
						</td>
						<td class="hrp-col-pro">
							<span class="hrp-check" aria-label="<?php esc_attr_e( 'Included', 'hr-press-lite' ); ?>">&#10003;</span>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>

	<div class="hrp-upgrade-cta-bottom">
		<h2><?php esc_html_e( 'Ready to upgrade your HR workflow?', 'hr-press-lite' ); ?></h2>
		<p><?php esc_html_e( 'Join teams that rely on HR Press Pro for seamless HR management inside WordPress.', 'hr-press-lite' ); ?></p>
		<a id="hrp-upgrade-bottom-cta"
			href="<?php echo esc_url( $upgrade_url ); ?>"
			target="_blank"
			rel="noopener noreferrer"
			class="hrp-btn-upgrade hrp-btn-large">
			<?php esc_html_e( 'Get HR Press Pro', 'hr-press-lite' ); ?>
			<span class="hrp-btn-arrow">&#8594;</span>
		</a>
	</div>

</div><!-- .hrp-upgrade-page -->
