<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Interview Invitation</title>
    <style>
        /* Basic reset and typography */
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333333;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        /* Container for the main content */
        .container {
            max-width: 600px;
            margin: 20px auto;
            background-color: #ffffff;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        /* Header styling */
        .header {
            text-align: center;
            border-bottom: 2px solid #007bff;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }
        .header h1 {
            color: #007bff;
            font-size: 24px;
            margin: 0;
        }
        /* Section headings */
        .section-header {
            color: #007bff;
            font-size: 18px;
            margin-top: 25px;
            margin-bottom: 10px;
            border-left: 4px solid #007bff;
            padding-left: 10px;
        }
        /* Key detail rows */
        .detail-row {
            margin-bottom: 10px;
        }
        .detail-row strong {
            display: inline-block;
            width: 120px;
            color: #555555;
        }
        /* Button style for the Join URL */
        .button {
            display: block;
            width: 80%;
            margin: 25px auto;
            padding: 12px 0;
            background-color: #28a745; /* Success/Go color */
            color: #ffffff;
            text-align: center;
            text-decoration: none;
            border-radius: 5px;
            font-weight: bold;
            font-size: 16px;
        }
        /* Footer/closing section */
        .footer {
            margin-top: 30px;
            padding-top: 15px;
            border-top: 1px dashed #cccccc;
            text-align: center;
            font-size: 14px;
            color: #777777;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>Interview Confirmation</h1>
        </div>

        <p>Dear <strong>{{ candidate_name }}</strong>,</p>
        <p>Thank you for your interest in the position. We are pleased to invite you to a virtual interview. Please find the details below.</p>

        <h2 class="section-header">Interview Details</h2>
        <div class="detail-row">
            <strong>Topic:</strong> {{ meeting_topic }}
        </div>
        <div class="detail-row">
            <strong>Date & Time:</strong> <strong>{{ meeting_date_time }}</strong>
        </div>
        <div class="detail-row">
            <strong>Duration:</strong> {{ meeting_duration }}
        </div>

        {% if join_url %}
        <a href="{{ join_url }}" class="button" target="_blank">
            Join Interview Now
        </a>
        <p style="text-align: center; font-size: 14px; color: #777;">Please click the button above to join the meeting at the scheduled time.</p>
        {% endif %}

        <h2 class="section-header">Your Information</h2>
        <div class="detail-row">
            <strong>Name:</strong> {{ candidate_name }}
        </div>
        <div class="detail-row">
            <strong>Email:</strong> {{ candidate_email }}
        </div>
        {% if candidate_phone %}
        <div class="detail-row">
            <strong>Phone:</strong> {{ candidate_phone }}
        </div>
        {% endif %}

        {% if job_title %}
        <h2 class="section-header">Position Details</h2>
        <div class="detail-row">
            <strong>Position:</strong> {{ job_title }}
        </div>
        {% if department %}
        <div class="detail-row">
            <strong>Department:</strong> {{ department }}
        </div>
        {% endif %}
        {% endif %}

        <div class="footer">
            <p>We look forward to speaking with you.</p>
            <p>If you have any questions, please reply to this email.</p>
            <p>Best regards,<br>The {{ company_name|default:"Norah University" }} Team</p>
        </div>
    </div>
</body>
</html>
