<?php
$daysRemaining = $this->getDaysRemaining();
$message = "Your trial expires in {$daysRemaining} days. Upgrade now!";

if ($daysRemaining === 0) {
    $message = "Your trial expires today! Upgrade to continue.";
} elseif ($daysRemaining === 1) {
    $message = "Your trial expires tomorrow! Don't lose access.";
}
?>

<div class="trial-nag-banner trial-nag-<?= $urgency ?>">
    <div class="trial-nag-content">
        <div class="trial-nag-icon">⏰</div>
        <div class="trial-nag-text">
            <strong><?= $message ?></strong>
            <p>Don't lose access to your data and features.</p>
        </div>
        <div class="trial-nag-action">
            <a href="/activate_license.php" class="btn-upgrade">🚀 Upgrade Now</a>
        </div>
    </div>
</div>

<style>
.trial-nag-banner { position: sticky; top: 0; z-index: 9999; padding: 15px 20px; border-bottom: 3px solid; }
.trial-nag-warning { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.trial-nag-danger { background: #fee2e2; border-color: #ef4444; color: #991b1b; animation: pulse 2s infinite; }
.trial-nag-content { display: flex; align-items: center; gap: 15px; max-width: 1200px; margin: 0 auto; }
.trial-nag-icon { font-size: 2rem; }
.trial-nag-text { flex: 1; }
.trial-nag-text strong { display: block; font-size: 1.1rem; }
.btn-upgrade { padding: 10px 20px; background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%); color: white; text-decoration: none; border-radius: 8px; font-weight: 600; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.9; } }
</style>
