<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Booking Status Changed - Admin Notification</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            color: white;
            padding: 30px;
            text-align: center;
            border-radius: 10px 10px 0 0;
        }
        .header h1 {
            margin: 0;
            font-size: 28px;
        }
        .content {
            background: #f9f9f9;
            padding: 30px;
            border-radius: 0 0 10px 10px;
        }
        .status-change {
            text-align: center;
            padding: 20px;
            margin: 20px 0;
            background: white;
            border-radius: 8px;
            border: 2px solid #e5e7eb;
        }
        .status-badge {
            display: inline-block;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 14px;
            margin: 0 10px;
        }
        .status-confirmed {
            background: #22c55e;
            color: white;
        }
        .status-cancelled {
            background: #dc2626;
            color: white;
        }
        .status-pending {
            background: #ffc107;
            color: #000;
        }
        .info-box {
            background: white;
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
            border-left: 4px solid #3b82f6;
        }
        .info-row {
            display: flex;
            padding: 10px 0;
            border-bottom: 1px solid #eee;
        }
        .info-row:last-child {
            border-bottom: none;
        }
        .info-label {
            font-weight: bold;
            width: 180px;
            color: #666;
        }
        .info-value {
            color: #333;
        }
        .footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid #eee;
            color: #666;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>📊 Booking Status Updated</h1>
        <p style="margin: 10px 0 0 0; font-size: 16px;">Admin Notification - Hotel Bardan Boutique</p>
    </div>

    <div class="content">
        <p><strong>Hello Admin,</strong></p>
        
        <p>This is a confirmation that a booking status has been updated in the system.</p>

        <div class="status-change">
            <p style="margin: 0 0 15px 0; color: #666; font-size: 14px;">Status Changed By: <strong><?php echo e($adminName); ?></strong></p>
            <div style="display: flex; align-items: center; justify-content: center; gap: 10px;">
                <span class="status-badge status-<?php echo e($oldStatus); ?>"><?php echo e(strtoupper($oldStatus)); ?></span>
                <span style="font-size: 24px;">→</span>
                <span class="status-badge status-<?php echo e($booking->status); ?>"><?php echo e(strtoupper($booking->status)); ?></span>
            </div>
            <p style="margin: 15px 0 0 0; color: #666; font-size: 14px;">Updated: <?php echo e(now()->format('F j, Y H:i')); ?></p>
        </div>

        <div class="info-box">
            <h3 style="margin-top: 0; color: #3b82f6;">📋 Booking Information</h3>
            
            <div class="info-row">
                <span class="info-label">Booking ID:</span>
                <span class="info-value"><strong>#<?php echo e($booking->id); ?></strong></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Current Status:</span>
                <span class="info-value">
                    <strong style="
                        <?php if($booking->status === 'confirmed'): ?> color: #22c55e;
                        <?php elseif($booking->status === 'cancelled'): ?> color: #dc2626;
                        <?php else: ?> color: #ffc107;
                        <?php endif; ?>
                    "><?php echo e(strtoupper($booking->status)); ?></strong>
                </span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Previous Status:</span>
                <span class="info-value"><?php echo e(ucfirst($oldStatus)); ?></span>
            </div>
        </div>

        <div class="info-box" style="border-left-color: #f59e0b;">
            <h3 style="margin-top: 0; color: #f59e0b;">👤 Guest Details</h3>
            
            <div class="info-row">
                <span class="info-label">Name:</span>
                <span class="info-value"><strong><?php echo e($booking->guest_name); ?></strong></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Email:</span>
                <span class="info-value"><?php echo e($booking->guest_email); ?></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Phone:</span>
                <span class="info-value"><?php echo e($booking->guest_phone); ?></span>
            </div>
        </div>

        <div class="info-box" style="border-left-color: #22c55e;">
            <h3 style="margin-top: 0; color: #22c55e;">🏨 Stay Information</h3>
            
            <div class="info-row">
                <span class="info-label">Room:</span>
                <span class="info-value"><?php echo e($booking->room->name); ?></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Check-in:</span>
                <span class="info-value"><?php echo e($booking->check_in->format('M j, Y')); ?></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Check-out:</span>
                <span class="info-value"><?php echo e($booking->check_out->format('M j, Y')); ?></span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Duration:</span>
                <span class="info-value"><?php echo e($booking->check_in->diffInDays($booking->check_out)); ?> nights</span>
            </div>
            
            <div class="info-row">
                <span class="info-label">Total Amount:</span>
                <span class="info-value"><strong>NPR <?php echo e(number_format($booking->room->price_per_night * $booking->check_in->diffInDays($booking->check_out))); ?></strong></span>
            </div>
        </div>

        <div style="background: #e0f2fe; padding: 15px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #3b82f6;">
            <p style="margin: 0;">
                <strong>📧 Email Notification:</strong> The guest has been automatically notified about this status change via email at <strong><?php echo e($booking->guest_email); ?></strong>
            </p>
        </div>

        <?php if($booking->status === 'confirmed'): ?>
        <div style="background: #dcfce7; padding: 15px; border-radius: 8px; margin: 20px 0;">
            <h4 style="margin-top: 0; color: #22c55e;">✅ Booking Confirmed</h4>
            <p style="margin: 0; color: #166534;">
                The guest has been sent a confirmation email with all check-in details and hotel information. Please ensure the room is prepared for their arrival.
            </p>
        </div>
        <?php elseif($booking->status === 'cancelled'): ?>
        <div style="background: #fee2e2; padding: 15px; border-radius: 8px; margin: 20px 0;">
            <h4 style="margin-top: 0; color: #dc2626;">❌ Booking Cancelled</h4>
            <p style="margin: 0; color: #991b1b;">
                The guest has been notified about the cancellation. If there was an advance payment, ensure refund is processed as per hotel policy.
            </p>
        </div>
        <?php endif; ?>

        <p style="margin-top: 30px; color: #666; font-size: 14px;">
            This is an automated notification to keep you informed of all booking status changes in the system.
        </p>
    </div>

    <div class="footer">
        <p><strong>Hotel Bardan Boutique - Admin System</strong></p>
        <p>Battisputali, Gaushala, Kathmandu, Nepal</p>
        <p style="margin-top: 15px; font-size: 12px; color: #999;">
            This email was sent to: kcsuman1415@gmail.com
        </p>
    </div>
</body>
</html>

<?php /**PATH /Users/sumankc/Desktop/Hotel Bardan Boutique/resources/views/emails/admin-booking-status-changed.blade.php ENDPATH**/ ?>