/* --- Google Font & CSS Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;700&display=swap');
:root {
    --bg-color: #121212; --surface-color: #1E1E1E; --primary-color: #D4AF37;
    --primary-hover: #E6C565; --text-color: #E0E0E0; --text-muted: #888;
    --border-color: #333; --success-color: #2ecc71; --error-color: #e74c3c;
    --font-family: 'Prompt', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
	
	
	
	 /* --- โค้ดที่เพิ่มเข้ามา --- */
    background-image: url('https://ploenchitphuket.com/booking/img/bgred.webp'); /* << เปลี่ยนเป็นชื่อไฟล์รูปของคุณ */
    background-size: cover; /* ทำให้รูปภาพเต็มหน้าจอเสมอ */
    background-position: center center; /* จัดให้รูปอยู่กลางจอ */
    background-repeat: no-repeat; /* ไม่ให้รูปภาพซ้ำกัน */
    background-attachment: fixed; /* ทำให้พื้นหลังอยู่กับที่เมื่อเลื่อนหน้า */
    /* --- สิ้นสุดโค้ดที่เพิ่ม --- */
	
    font-family: var(--font-family); color: var(--text-color);
    line-height: 1.6; padding: 10px; overflow-x: hidden;
}
.container { max-width: 1200px; margin: auto; }
.main-header { text-align: center; margin-bottom: 30px; padding: 0 10px; }
.main-header h1 { font-size: 2.2rem; color: var(--primary-color); }
.card { background-color: var(--surface-color); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 20px; }
h2 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
h2 i { margin-right: 10px; }

/* --- Form Styles --- */
form label { display: block; margin-bottom: 8px; font-weight: 500; }
form input, form select { width: 100%; padding: 12px; background-color: #252525; border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color); font-family: var(--font-family); font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
form input:focus, form select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3); }
button { width: 100%; padding: 15px; border: none; border-radius: 8px; background-color: var(--primary-color); color: #121212; font-family: var(--font-family); font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background-color 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px;  margin-top: 20px; /* ปรับค่าตามต้องการ */}
button:hover:not(:disabled) { background-color: var(--primary-hover); }
button:disabled { background-color: #444; color: var(--text-muted); cursor: not-allowed; }

/*
===================================================
   VVVVVV --- ดีไซน์แผนผังใหม่ (Scaled Viewport) --- VVVVVV
===================================================
*/

.booking-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 1. Container: กรอบด้านนอกสุดที่จะปรับขนาดตามหน้าจอ */
/* กรอบนอกควบคุมสัดส่วนเป็นสี่เหลี่ยมจัตุรัส และไม่ล้นจอ */
#map-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1; /* คุมให้เป็น 1:1 */
}

/* ตัวแผนผังให้กินเต็มกรอบ ไม่ใช้ transform แล้ว */
#table_map {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  transform: none !important;
  transform-origin: 0 0;
}
/* 3. Table Styles: ดีไซน์โต๊ะให้คมชัด */
.table {
    position: absolute; display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; border: 1.5px solid; font-weight: 500; font-size: 0.8rem;
    user-select: none; color: var(--text-color); transition: all 0.2s ease-in-out;
    padding: 5px; text-align: center; line-height: 1;
}
@media (max-width: 768px) {
  .table {
    font-size: 0.4rem;
  }
}
.shape-circle { border-radius: 50%; } .shape-square { border-radius: 8px; }
.shape-rectangle { border-radius: 5px; } .shape-diamond { border-radius: 8px; transform: rotate(45deg); }
.shape-diamond span { display: inline-block; transform: rotate(-45deg); font-size: 0.9em; }

/* 4. Status Colors: กำหนดสีสถานะให้กลับมาทำงานถูกต้อง */
.table.available { 
	background-color: #f3dfc7;
	border-color: #978876;
	color: #231300; }
.table.available:hover {
    border-color: var(--primary-color);
    color: black; /* ฟอนต์เปลี่ยนเป็นสีดำเมื่อ hover */
    background-color: goldenrod;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    cursor: pointer;
}
.table.booked {
  background: #a00302;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.95;
  border-color: #a30000;
}
.table.selected { 
	background-color: var(--primary-color); 
	color: var(--bg-color); 
	border-color: var(--primary-hover); 
	transform: scale(1.1); 
	box-shadow: 0 0 15px rgba(212, 175, 55, 0.5); 
	/* เพิ่ม animation ให้กระพริบเบาๆ เพื่อให้โดดเด่น */
    animation: pulse-yellow 2s infinite;
}
.non-bookable { 
	background-color: #987d70; 
	border-color: #987d70; 
	color: #FFDBBA; 
	cursor: default !important; }

/* --- ทำให้โต๊ะ T1-T7 ที่ปิดจองเป็นสีแดง --- */
.table.non-bookable[data-name="T1"],
.table.non-bookable[data-name="T2"],
.table.non-bookable[data-name="T3"],
.table.non-bookable[data-name="T4"],
.table.non-bookable[data-name="T5"],
.table.non-bookable[data-name="T6"],
.table.non-bookable[data-name="T7"] {
    background-color: #a00302; /* สีแดง */
    border-color: #a30000;   /* สีขอบแดง */
    color: #fff;             /* ตัวอักษรสีขาว */
}

/*
===================================================
   VVVVVV --- Responsive Design --- VVVVVV
===================================================
*/
@media (max-width: 992px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    body { padding: 10px; }
    .card { padding: 20px; }
    .main-header h1 { font-size: 2rem; }
}

#customer_email,
label[for="customer_email"],
#customer_email ~ label {
  display: none !important;
}

.form-group label[for="customer_email"],
.form-group #customer_email {
  display: none !important;
}


    .booking-conditions {
        margin-top: 30px;
        padding: 20px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background-color: #2a2a2a; /* Slightly different background to stand out */
    }
    .booking-conditions h3 {
        color: var(--primary-color);
        margin-top: 0;
        margin-bottom: 15px;
        text-align: center;
        font-size: 1.2rem;
    }
    .booking-conditions h3 i {
        margin-right: 8px;
    }
    .booking-conditions ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .booking-conditions ul li {
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border-color);
    }
    .booking-conditions ul li:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
    .booking-conditions ul li strong {
        font-size: 1rem;
        color: #ffd545;
    }
    .booking-conditions ul li strong i {
        color: var(--primary-color);
        width: 20px;
        text-align: center;
        margin-right: 5px;
    }
    .booking-conditions ul li p {
        margin: 8px 0 0 30px; /* Indent sub-text */
        color: #ffffff;
        font-size: 0.95rem;
    }
    .booking-conditions ul li p i {
        margin-right: 5px;
        width: 15px;
    }
    .booking-conditions ul li p strong {
        color: var(--success-color); /* Highlight the price */
    }
    .conditions-footer {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }
    .conditions-footer p {
        margin: 8px 0;
        color: #ffffff);
        font-size: 0.7rem;
        text-align: center;
    }
    .conditions-footer p i {
        margin-right: 8px;
    }
    .conditions-footer p:first-child i {
        color: var(--primary-color);
    }
    .conditions-footer p:last-child i {
        color: var(--error-color);
    }

/* Styling for Payment Page Notes */
.payment-notes {
    margin-top: 25px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.payment-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-notes ul li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.payment-notes ul li i {
    font-size: 1.1rem;
    width: 30px; /* Give icons a fixed width for alignment */
    text-align: center;
    margin-right: 10px;
}

/* Icon Colors */
.payment-notes .icon-warning {
    color: var(--error-color);
}

.payment-notes .icon-timer {
    color: var(--pending-color);
}

.payment-notes .icon-success {
    color: var(--success-color);
}


/* success*/

/*
=================================
Success Page (Booking Confirmation) Styles
=================================
*/
.success-container {
    max-width: 450px;
    margin: 40px auto;
    font-family: var(--font-family);
}

.confirmation-card {
    background-color: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    text-align: center;
}

.confirmation-header {
    padding: 25px;
    background-color: var(--success-color);
    color: #fff;
}

.confirmation-header .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1;
}

.confirmation-header h1 {
    color: #fff;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.confirmation-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.confirmation-body {
    padding: 30px;
}

.qr-code-wrapper {
    margin-bottom: 25px;
}

.qr-code-wrapper img {
    border: 10px solid #fff;
    border-radius: 10px;
    max-width: 100%;
    height: auto;
}

.booking-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 25px;
    text-align: left;
    margin-bottom: 30px;
}

.detail-item {
    font-size: 1rem;
}

.detail-item .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.detail-item .value {
    font-weight: 500;
    color: var(--text-color);
}

.detail-item .value i {
    color: var(--primary-color);
    margin-right: 8px;
    width: 15px;
}


.confirmation-footer {
    padding: 20px 30px;
    border-top: 1px dashed var(--border-color);
}

.confirmation-footer .btn-home {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #121212;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    transition: background-color 0.2s;
}

.confirmation-footer .btn-home:hover {
    background-color: #e0bb41;
}

.confirmation-footer .btn-home i {
    margin-right: 8px;
}

/* Error State */
.confirmation-header.error {
    background-color: var(--error-color);
}

/*
=================================
Site Logo Styling
=================================
*/
.site-logo {
    text-align: center; /* จัดโลโก้ไว้ตรงกลาง */
    padding: 20px 0 10px 0; /* เพิ่มระยะห่างบน-ล่าง */
}

.site-logo img {
    max-width:100%;    /* ทำให้รูปภาพปรับขนาดตามความกว้างของพื้นที่ */
    height: auto;       /* รักษาสัดส่วนของรูปภาพ */
    max-height: 120px;  /* กำหนดความสูงสูงสุดไม่ให้ใหญ่เกินไปบนจอคอม */
}

/*
=================================
Selected Table Details Styling
=================================
*/
#table-details {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: #2a2a2a;
    padding: 20px;
    margin-top: 25px !important;
}

#table-details h2 {
    text-align: center;
    font-size: 1.2rem;
    color: #2ecd71;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

#table-details .details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create a 2-column grid */
    gap: 15px 20px; /* Spacing between items */
}

#table-details .details-grid .detail-item.total-price {
  grid-column: 1 / -1; /* กินเต็มทุกคอลัมน์ใน grid */
	align-items: center; 
  	justify-content: center; 
	text-align: center;
}

#table-details .details-grid .detail-item.total-capacity {
  grid-column: 1 / -1; /* กินเต็มทุกคอลัมน์ใน grid */
	align-items: center; 
  	justify-content: center; 
	text-align: center;
}



#table-details .detail-item {
    font-size: 1rem;
    background-color: #333; /* Slightly lighter background for each item */
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#table-details .detail-item i {
    color: #2ece71;
    font-size: 1.1rem;
    width: 25px;
    text-align: center;
    margin-right: 12px;
}

#table-details .detail-item .value {
    font-weight: 500;
    color: var(--text-color);
}

#table-details .detail-item .label {
    color: var(--text-muted);
    margin-right: 8px;
}

/* --- สถานะโต๊ะ --- */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px;
    background-color: var(--surface-1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.status-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.status-dot.available { background-color: #f4dec6; }
.status-dot.unavailable { background-color: #a00302; }
.status-dot.selected { background-color: #d2b038; }


/* --- Floor Selection Buttons --- */
#floor-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

#floor-selection .floor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    padding: 12px;
}

/* --- Floor Selection Button Active State --- */
#floor-selection .floor-btn.active {
    background-color: #ffde6c;
    color: #7d681f;
    border-color: #877125;
}

/* --- Table Shapes --- */
.table.shape-square, .table.shape-rectangle {
    border-radius: 4px;
}

.table.shape-circle {
    border-radius: 50%;
}

.table.shape-triangle {
    /* ใช้ clip-path เพื่อสร้างรูปทรงสามเหลี่ยม */
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    /* สีพื้นหลังของโต๊ะจะถูกตัดเป็นรูปสามเหลี่ยม */
    border-radius: 0; /* ล้างค่า border-radius อื่นๆ */
}

/* ปรับตำแหน่งข้อความให้อยู่ในสามเหลี่ยมได้ดีขึ้น */
.table.shape-triangle span {
    margin-top: 25%;
    display: inline-block; /* ทำให้ margin-top ทำงาน */
}

/* --- Stepper (แถบสถานะการจอง) --- */
.stepper-container {
    display: flex;
    align-items: flex-start; /* จัดให้อยู่แนวเดียวกัน */
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 20px auto 40px auto;
    padding: 0 20px;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    width: 80px; /* กำหนดความกว้างให้แต่ละขั้นตอน */
}
.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    background-color: var(--surface-color);
}
.step-label {
    margin-top: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}
.step-connector {
    flex-grow: 1;
    height: 3px;
    background-color: var(--border-color);
    margin-top: 23.5px; /* จัดให้อยู่กึ่งกลางไอคอน */
}

/* --- สถานะ Active (ขั้นตอนปัจจุบัน) --- */
.step-item.active .step-icon {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: var(--bg-color);
}
.step-item.active .step-label {
    color: var(--primary-color);
}

/* --- สถานะ Completed (ขั้นตอนที่ผ่านไปแล้ว) --- */
.step-item.completed .step-icon {
    border-color: var(--success-color);
    background-color: var(--success-color);
    color: #fff;
}
.step-item.completed .step-label {
    color: var(--text-color);
}
.step-item.completed + .step-connector {
    background-color: var(--success-color);
}

/* --- Alert Message Styles --- */
.alert-container {
    background-color: #222222;
    border-radius: 12px;
    padding: 30px;
    margin: 50px auto;
    max-width: 500px;
    text-align: center;
    border-left: 5px solid var(--error-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--error-color);
}

.alert-message h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.alert-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.alert-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.alert-button:hover {
    background-color: #a04f55; /* Darker shade of primary color */
    transform: translateY(-2px);
}

.alert-button i {
    margin-right: 8px;
}

/* --- Date Input Fix for iOS --- */
input[type="date"] {
    width: 100%;
    box-sizing: border-box; /* สำคัญมาก: ทำให้ padding และ border ถูกนับรวมใน width */
    -webkit-appearance: none; /* ปรับการแสดงผลเริ่มต้นของ iOS */
    appearance: none;
    background-color: var(--input-bg); /* ใช้สีพื้นหลังจากตัวแปร */
    border: 1px solid var(--border-color); /* ใช้สีขอบจากตัวแปร */
    padding: 12px;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
    min-height: 48px; /* กำหนดความสูงขั้นต่ำให้ดูดีบนมือถือ */
}

/* ทำให้มีลูกศร dropdown บนบราวเซอร์อื่นที่ไม่ใช่ iOS */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    filter: invert(0.5); /* ทำให้ไอคอนปฏิทินมองเห็นชัดขึ้นในธีมมืด */
}

/* --- Info Box Styles --- */
.info-box {
    display: flex;
    align-items: center; /* <--- แก้จาก flex-start เป็น center */
    background-color: rgba(0, 0, 0, 0.2); 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px; 
    transition: all 0.3s ease;
}

.info-icon {
    font-size: 20px; 
    color: var(--primary-color);
    margin-right: 15px;
    /* ไม่ต้องใช้ padding-top แล้ว */
}

/*
=================================
Payment Page Warning Box
=================================
*/
.payment-warning-box {
    display: flex;
    align-items: center;
    background-color: rgba(231, 76, 60, 0.1); /* พื้นหลังสีแดงโปร่งแสง */
    border: 1px solid var(--error-color); /* ขอบสีแดง */
    border-left: 5px solid var(--error-color); /* ขอบซ้ายหนาสีแดง */
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0; /* ระยะห่างบนล่าง */
}

.payment-warning-box .warning-icon {
    font-size: 2.2rem;
    color: var(--error-color);
    margin-right: 20px;
}

.payment-warning-box .warning-text strong {
    display: block;
    color: var(--error-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.payment-warning-box .warning-text p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
}

/*ตกแต่งหน้าจ่ายเงิน*/
 .payment-container {
            max-width: 500px;
            margin: 50px auto;
            animation: fadeIn 0.5s ease-out;
        }
        .payment-card {
            background-color: #242424;
            border-radius: 16px;
            padding: 30px;
            border: 1px solid #333;
            box-shadow: 0 8px 25px rgba(0,0,0,0.4);
        }
        .header {
            text-align: center;
            margin-bottom: 25px;
        }
        .header h1 {
            margin: 0 0 5px 0;
            color: #D4AF37; /* Gold color */
        }
        .header p {
            color: #aaa;
            margin: 0;
        }
        
        /* ดีไซน์ใหม่สำหรับสรุปข้อมูลการจอง */
        .booking-summary {
            background-color: #2c2c2c;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 25px;
        }
        .booking-summary h2 {
            margin: 0 0 15px 0;
            font-size: 1.1rem;
            color: #f0f0f0;
            border-bottom: 1px solid #444;
            padding-bottom: 10px;
        }
        .summary-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .summary-list li {
       
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            font-size: 0.95rem;
        }
        .summary-list li:not(:last-child) {
            border-bottom: 1px solid #3a3a3a;
        }
        .summary-list .label {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #ccc;
        }
        .summary-list .label i {
            color: #D4AF37;
            width: 20px;
            text-align: center;
        }
        .summary-list .value {
            font-weight: 500;
            color: #fff;
        }

        /* ดีไซน์ใหม่สำหรับราคารวม */
        .total-price {
            text-align: center;
  
        }
        .total-price p {
            margin: 0;
            color: #aaa;
            font-size: 1rem;
        }
        .total-price h3 {
            margin: 5px 0;
            font-size: 2.8rem;
            color: #D4AF37;
            font-weight: 700;
        }
        .total-price h3 span {
            font-size: 1.2rem;
            font-weight: 400;
            color: #ccc;
            margin-left: 5px;
        }
        
        .payment-actions { text-align: center; }
        .error-message { color: #ff6b6b; margin-bottom: 15px; }
        .countdown { margin-top: 15px; color: #aaa; }
        /* END: CSS ที่ปรับปรุงดีไซน์ใหม่ */
/* สไตล์สำหรับบัตรสถานะ Not Coming */
.booking-card.status-notcoming-card {
    background-color: #2c1d1d; /* พื้นหลังสีแดงเข้ม */
    border: 1px solid #dc3545; /* เส้นขอบสีแดง */
    border-left: 5px solid #dc3545; /* แถบด้านซ้ายสีแดงเข้ม */
}

.status-notcoming-card .card-header .table-name {
    color: #f8d7da; /* สีข้อความ header */
}

.status-notcoming-card .card-footer .status-text {
    color: #dc3545; /* สีข้อความสถานะ */
    font-weight: bold;
}

/* --- สถานะรอชำระเงิน (Pending) --- */
.table.pending {
    background-color: #2d23b6;
    color: #fff;
    cursor: not-allowed;
    border: 1px solid #685fec;
}

/* สำหรับจุดสีในคำอธิบายสถานะ */
.map-legend .pending-legend {
    background-color: #2d23b6;
}

/* Keyframe animation สำหรับการกระพริบ */
@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(240, 173, 78, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0);
    }
}

/* --- [เพิ่ม] สไตล์สำหรับโต๊ะที่เลือกไม่ได้ (Disabled) --- */
.table.available.disabled {
    background-color: #f3dfc7;
    color: #231300;
    cursor: not-allowed;
    border: 1px solid #444;
    opacity: 0.5;
}

/* ========== Language Switcher (Updated) ========== */
.language-switcher {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    gap: 0.4rem;
    background-color: rgba(28, 28, 28, 0.6);
    padding: 0.4rem; /* ลด padding กรอบ */
    border-radius: 10px; /* ลดความโค้ง */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lang-btn {
    text-decoration: none;
    color: #c0c0c0;
    font-weight: 500;
    font-size: 0.9rem; /* ลดขนาดตัวอักษร */
    padding: 0.4rem 0.8rem; /* ลด padding ปุ่ม */
    border-radius: 7px; /* ลดความโค้ง */
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    color: #000;
    background-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* --- Responsive สำหรับมือถือ --- */
@media (max-width: 600px) {
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }
    /* ทำให้กล่องหลักขยับลงมาในมือถือด้วย */
    .welcome-container {
        margin-top: 5rem;
    }
}

/* ========== [START] ทำให้ Legend ตัด 2 บรรทัดบนมือถือ ========== */
@media (max-width: 600px) {
    .map-legend {
        flex-wrap: wrap; /* สั่งให้รายการตัดขึ้นบรรทัดใหม่ได้ */
        justify-content: center; /* จัดให้อยู่ตรงกลางเมื่อขึ้นบรรทัดใหม่ */
        gap: 0.5rem 1rem; /*ปรับระยะห่างเล็กน้อย*/
    }
}
/* ========== [END] ทำให้ Legend ตัด 2 บรรทัดบนมือถือ ========== */
.holiday-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.holiday-modal-content { background-color: #1E1E1E; border: 1px solid #333; padding: 30px; border-radius: 16px; text-align: center; max-width: 400px; width: 90%; color: #fff; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.holiday-modal-icon { font-size: 3rem; color: #e74c3c; margin-bottom: 15px; }
.holiday-modal h3 { margin: 0 0 10px 0; font-size: 1.5rem; color: #e74c3c; }
.holiday-modal p { color: #ccc; font-size: 1.1rem; margin-bottom: 25px; line-height: 1.6; }
.holiday-modal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background-color: #D4AF37; color: #000; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: transform 0.2s; border: none; width: 100%; box-sizing: border-box; }
.holiday-modal-btn:hover { transform: scale(1.05); background-color: #f1c40f; }
.holiday-close { position: absolute; top: 15px; right: 15px; color: #888; cursor: pointer; font-size: 1.5rem; }