<!-- ./views/customer/bookingSummary.ejs -->
<!DOCTYPE html>
<html lang="th">
<head>
  <meta charset="UTF-8">
  <title>สรุปรายการจอง</title>
  <link rel="stylesheet" href="/css/style.css">
  <style>
    /* ตั้งค่าพื้นฐาน */
    body {
      margin: 0;
      font-family: 'Helvetica Neue', sans-serif;
      background-color: #f9f9f9;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .container {
      max-width: 800px;
      width: 100%;
      padding: 0 20px;
    }
    h1 {
      text-align: center;
      color: #ff66a3; /* สีชมพูสำหรับหัวข้อ */
    }
    .booking-summary {
      background-color: #fff;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .booking-summary p {
      font-size: 16px;
      color: #555;
      margin: 10px 0;
    }
    .booking-summary strong {
      color: #333;
    }
    .alert-info {
      background-color: #e9f7ff;
      padding: 10px;
      border-radius: 5px;
      color: #007bff;
      font-weight: bold;
      margin-top: 20px;
    }
    /* ปุ่ม */
    .actions {
      display: flex;
      justify-content: space-between;
    }
    .btn {
      padding: 15px 30px;
      border-radius: 30px;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s ease;
      text-align: center;
      width: 48%;
    }
    .btn-primary {
      background-color: #ff66a3;
      color: white;
      border: none;
    }
    .btn-primary:hover {
      background-color: #e6007f; /* เมื่อ hover สีชมพูเข้ม */
    }
    .btn-secondary {
      background-color: #ccc;
      color: #333;
      border: none;
    }
    .btn-secondary:hover {
      background-color: #b0b0b0; /* เมื่อ hover ปุ่มกลับสีเทาเข้ม */
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>สรุปรายการจอง</h1>
    <div class="booking-summary">
      <p><strong>หมายเลขการจอง:</strong> <%= appointment.appointment_id %></p>
      <p><strong>ชื่อผู้จอง:</strong> <%= user.first_name %> <%= user.last_name %></p>
      <p><strong>บริการ:</strong> <%= service.service_name %></p>
      <p><strong>วันที่เข้ารับบริการ:</strong> <%= new Date(slot.date).toLocaleDateString('th-TH') %></p> <!-- Display only date -->
      <p><strong>เวลาเข้ารับบริการ:</strong> <%= slot.start_time %></p>
      <p><strong>สถานะการจอง:</strong> <%= appointment.appointment_status %></p> <!-- Display appointment status -->
      <p class="alert-info">กรุณามาก่อนเวลา 10 นาที</p>
    </div>
    <div class="actions">
      <!-- ปุ่มไปยังหน้าชำระมัดจำ -->
      <a href="#" class="btn btn-primary">ชำระมัดจำทันที</a>
      <!-- ปุ่มกลับสู่หน้าจองครั้งแรก -->
      <a href="/customer/appointment" class="btn btn-secondary">กลับสู่หน้าหลัก</a>
    </div>
  </div>
</body>
</html>