<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Survey Invitation - {{ hotelName() }}</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f8f9fa;
            padding: 20px;
        }
        
        .email-container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        
        .email-header {
            background: linear-gradient(135deg, #114b5f 0%, #1a936f 100%);
            color: white;
            padding: 40px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .email-header::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 150px;
            height: 150px;
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
            border-radius: 0 0 0 150px;
        }
        
        .hotel-logo {
            font-size: 2.5rem;
            margin-bottom: 15px;
            display: inline-block;
        }
        
        .email-header h1 {
            font-size: 1.8rem;
            margin-bottom: 10px;
            font-weight: 700;
        }
        
        .email-header p {
            opacity: 0.9;
            font-size: 1.1rem;
        }
        
        .email-content {
            padding: 40px 30px;
        }
        
        .greeting {
            font-size: 1.3rem;
            color: #114b5f;
            margin-bottom: 20px;
            font-weight: 600;
        }
        
        .message-box {
            background: linear-gradient(135deg, rgba(134, 212, 152, 0.1) 0%, rgba(26, 147, 111, 0.1) 100%);
            border-left: 4px solid #1a936f;
            padding: 20px;
            border-radius: 8px;
            margin: 25px 0;
        }
        
        .survey-preview {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin: 25px 0;
            text-align: center;
            border: 2px dashed #dee2e6;
        }
        
        .survey-preview h3 {
            color: #114b5f;
            margin-bottom: 15px;
        }
        
        .survey-preview p {
            color: #6c757d;
            margin-bottom: 20px;
        }
        
        .cta-button {
            display: inline-block;
            background: linear-gradient(135deg, #1a936f 0%, #88d498 100%);
            color: white;
            text-decoration: none;
            padding: 15px 40px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 1.1rem;
            margin: 20px 0;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(26, 147, 111, 0.3);
        }
        
        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(26, 147, 111, 0.4);
        }
        
        .survey-details {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 25px 0;
            border: 2px solid #e9ecef;
        }
        
        .details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 15px;
        }
        
        .detail-item {
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            text-align: center;
        }
        
        .detail-label {
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 5px;
        }
        
        .detail-value {
            font-weight: 600;
            color: #114b5f;
        }
        
        .media-gallery {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin: 25px 0;
        }
        
        .media-item {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }
        
        .media-item img {
            width: 100%;
            height: 150px;
            object-fit: cover;
        }
        
        .benefits {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 10px;
            padding: 25px;
            margin: 25px 0;
        }
        
        .benefits h4 {
            color: #114b5f;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .benefits ul {
            list-style: none;
            padding: 0;
        }
        
        .benefits li {
            padding: 8px 0;
            padding-left: 30px;
            position: relative;
        }
        
        .benefits li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #1a936f;
            font-weight: bold;
        }
        
        .testimonial {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 25px 0;
            border-left: 4px solid #88d498;
            font-style: italic;
        }
        
        .testimonial-author {
            text-align: right;
            margin-top: 10px;
            color: #6c757d;
            font-style: normal;
        }
        
        .email-footer {
            background: linear-gradient(135deg, #114b5f 0%, #1a936f 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }
        
        .footer-logo {
            font-size: 2rem;
            margin-bottom: 15px;
        }
        
        .contact-info {
            margin: 15px 0;
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        .social-links {
            margin: 20px 0;
        }
        
        .social-links a {
            color: white;
            margin: 0 10px;
            font-size: 1.2rem;
            text-decoration: none;
            opacity: 0.9;
            transition: opacity 0.3s ease;
        }
        
        .social-links a:hover {
            opacity: 1;
        }
        
        .disclaimer {
            font-size: 0.8rem;
            opacity: 0.7;
            margin-top: 20px;
            line-height: 1.4;
        }
        
        @media (max-width: 600px) {
            .details-grid {
                grid-template-columns: 1fr;
            }
            
            .media-gallery {
                grid-template-columns: 1fr;
            }
            
            .email-content {
                padding: 30px 20px;
            }
            
            .email-header {
                padding: 30px 20px;
            }
        }
        
        .urgency-badge {
            display: inline-block;
            background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            margin-left: 10px;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        .progress-bar {
            height: 8px;
            background: #e9ecef;
            border-radius: 4px;
            margin: 20px 0;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(135deg, #1a936f 0%, #88d498 100%);
            border-radius: 4px;
            width: 65%;
            transition: width 2s ease;
        }
        
        .progress-text {
            text-align: center;
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div class="email-container">
        <!-- Header -->
        <div class="email-header">
            <div class="hotel-logo">🏨</div>
            <h1>{{ hotelName() }}</h1>
            <p>Guest Experience Survey</p>
        </div>
        
        <!-- Content -->
        <div class="email-content">
            <div class="greeting">Dear {{ $recipientName }},</div>
            
            <p>Thank you for choosing {{ hotelName() }} for your stay. Your experience matters to us, and we're committed to providing exceptional service to every guest.</p>
            
            <!-- Personalized Message -->
            @if(!empty($personalMessage))
                <div class="message-box">
                    <p><strong>Personal Message from our Management:</strong></p>
                    <p>{{ $personalMessage }}</p>
                </div>
            @endif
            
            <!-- Survey Preview -->
            <div class="survey-preview">
                <h3>{{ $surveyTitle }}</h3>
                <p>We'd love to hear about your experience to help us improve our services for future guests.</p>
                
                <div class="progress-bar">
                    <div class="progress-fill"></div>
                </div>
                <div class="progress-text">65% of invited guests have completed this survey</div>
                
                <a href="{{ $surveyUrl }}" class="cta-button">
                    Take Survey Now
                </a>
                
                <p style="font-size: 0.9rem; color: #6c757d; margin-top: 15px;">
                    <i class="fas fa-clock"></i> Takes only 3-5 minutes
                </p>
            </div>
            
            <!-- Survey Details -->
            <div class="survey-details">
                <h4 style="color: #114b5f; margin-bottom: 15px;">Survey Details</h4>
                <div class="details-grid">
                    <div class="detail-item">
                        <div class="detail-label">Survey Title</div>
                        <div class="detail-value">{{ $surveyTitle }}</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">Time Required</div>
                        <div class="detail-value">3-5 minutes</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">Deadline</div>
                        <div class="detail-value">{{ $expiryDate }} <span class="urgency-badge">Hurry!</span></div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">Confidential</div>
                        <div class="detail-value">✓ Guaranteed</div>
                    </div>
                </div>
            </div>
            
            <!-- Media Gallery -->
            @if(isset($surveyMedia) && count($surveyMedia) > 0)
            <h4 style="color: #114b5f; margin: 25px 0 15px 0;">Memories from Your Stay</h4>
            <div class="media-gallery">
                @foreach($surveyMedia as $media)
                <div class="media-item">
                    <img src="{{ $media->type == 'image' ? asset($media->path) : asset($media->thumbnail) }}" 
                         alt="{{ $media->caption ?? 'Hotel Experience' }}">
                </div>
                @endforeach
            </div>
            @endif
            
            <!-- Benefits -->
            <div class="benefits">
                <h4>Why Your Feedback Matters</h4>
                <ul>
                    <li>Help us improve guest experiences</li>
                    <li>Influence future hotel improvements</li>
                    <li>Make a difference for future guests</li>
                    <li>Chance to win special offers</li>
                    <li>Your opinion is valued and confidential</li>
                </ul>
            </div>
            
            <!-- Testimonial -->
            <div class="testimonial">
                "Completing the survey was quick and easy. It felt great knowing my feedback was taken seriously and led to real improvements!"
                <div class="testimonial-author">— Sarah M., Returning Guest</div>
            </div>
            
            <!-- Final CTA -->
            <div style="text-align: center; margin: 30px 0;">
                <a href="{{ $surveyUrl }}" class="cta-button" style="background: linear-gradient(135deg, #114b5f 0%, #1a936f 100%);">
                    <i class="fas fa-pencil-alt" style="margin-right: 10px;"></i>
                    Share Your Experience Now
                </a>
                <p style="margin-top: 15px; color: #6c757d;">
                    Your feedback helps us maintain our 5-star standards
                </p>
            </div>
            
            <p>Thank you for your time and for choosing {{ hotelName() }}. We look forward to welcoming you back soon!</p>
            
            <p style="margin-top: 20px;">
                <strong>Warm regards,</strong><br>
                The {{ hotelName() }} Management Team
            </p>
        </div>
        
        <!-- Footer -->
        <div class="email-footer">
            <div class="footer-logo">🏨</div>
            <h3 style="margin-bottom: 10px;">{{ hotelName() }}</h3>
            <p style="opacity: 0.9;">{{ setting('hotel_tagline', 'Luxury Redefined') }}</p>
            
            <div class="contact-info">
                <p>{{ hotelAddress() }}</p>
                <p>Phone: {{ hotelPhone() }} | Email: {{ hotelEmail() }}</p>
            </div>
            
            <div class="social-links">
                <a href="#"><i class="fab fa-facebook"></i></a>
                <a href="#"><i class="fab fa-twitter"></i></a>
                <a href="#"><i class="fab fa-instagram"></i></a>
                <a href="#"><i class="fab fa-linkedin"></i></a>
            </div>
            
            <div class="disclaimer">
                <p>This email was sent to {{ $recipientEmail }} as part of our guest feedback program.</p>
                <p>If you no longer wish to receive these emails, please <a href="#" style="color: #88d498;">unsubscribe here</a>.</p>
                <p>© {{ date('Y') }} {{ hotelName() }}. All rights reserved.</p>
            </div>
        </div>
    </div>
    
    <script>
        // Animate progress bar
        document.addEventListener('DOMContentLoaded', function() {
            const progressFill = document.querySelector('.progress-fill');
            setTimeout(() => {
                progressFill.style.width = '65%';
            }, 500);
        });
    </script>
</body>
</html>
