
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
declare(strict_types=1);
date_default_timezone_set('Asia/Riyadh');

function h(string $s): string {
  return htmlspecialchars($s, ENT_QUOTES, 'UTF-8');
}

$status = $_GET['status'] ?? '';
$status = in_array($status, ['yes','no'], true) ? $status : '';

$heading = ($status === 'yes')
  ? 'Thank you. Your attendance has been confirmed.'
  : 'Thank you. We have recorded that you will not attend.';

// ✅ Google Maps (recommended: use a place link or coordinates)
$googleMapsUrl = 'https://maps.app.goo.gl/dmM1nE4ZfSnMPNWJ6';
$icsUrl = 'https://inv.balubaid.com/calendar/ceremony.ics';
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>RSVP Confirmation</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <style>
    body { background:#f5f6f8; }
    .card { border-radius:16px; border:0; }
    .btn-lg { border-radius:14px; }
    .bginv{
  background-image: url("bgcinv.png");
  background-size: cover;      /* cover | contain */
  background-repeat: no-repeat;
  background-position: center center;
}
  </style>
</head>
<body>
  <div class="container py-5">
    <div class="row justify-content-center">
      <div class="col-lg-7 col-xl-6">
        <div class="card shadow-sm">

<img src="Pattern.png" class="img-responsive" alt="" style="    position: absolute;
    height: 115px;
    right: 1px;
    "> 
    
            
          <div class="card-body p-4 p-md-5 bginv">
              
               <img src="Logo.png" class="img-responsive" alt="" style="height:42px;"> 
       
       <div style="height:32px;"></div>

            <h4 class="mb-3"><?= h($heading) ?></h4>

            <?php if ($status === 'yes'): ?>
              <p class="text-muted mb-4">
                We look forward to welcoming you on <strong>Saturday, December 20 2025</strong> at <strong>8:00 PM</strong>.
              </p>

              <div class="d-grid gap-2">
                <a class="btn btn-primary btn-lg" style="background:#004275 !important;border:#004275;"
                   href="<?= h($icsUrl) ?>">
                  Add to your calendar
                </a>

                <a class="btn btn-primary btn-lg" style="background:#ba8751 !important;#ba8751 !important"
                   href="<?= h($googleMapsUrl) ?>" target="_blank" rel="noopener">
                  Open location in Google Maps
                </a>
              </div>
              
               <div class="d-grid gap-2">
                <div style="height:10px;"></div>   
               <strong> Location Entry Point </strong>
                
                <img src="entrance.jpeg" class="img-responsive" alt="" style="width:100%"> 
                
              </div>
            <?php else: ?>
              <p class="text-muted mb-4">
                Thank you for letting us know. If your plans change, please contact the organizer.
              </p>

              <div class="d-grid gap-2">
                <a class="btn btn-outline-primary btn-lg"
                   href="<?= h($googleMapsUrl) ?>" target="_blank" rel="noopener">
                  View location in Google Maps
                </a>
              </div>
              
              
             
            <?php endif; ?>

            <hr class="my-4">

            <p class="mb-0 text-muted small">
             For any inquiries, please contact <br> <strong>Mr. Esam</strong> at
            <strong>0555137832</strong>
            
            <br>
            
            <strong>Mr. Faiz</strong> at
            <strong>0500654254</strong>.
            </p>

          </div>
        </div>
      </div>
    </div>
  </div>
</body>
</html>