/* --- BIẾN HỆ THỐNG --- */
:root {
    --gold: #c5a059;
    --gold-dark: #8c6d39;
    --bg-dark: #0d0d0d;
    --form-bg: #111;
    --input-bg: #1a1a1a;
    --text-gray: #888;
    --transition: all 0.3s ease;
    --font-luxury: 'Cormorant Garamond', serif; 
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- LAYOUT CHUNG --- */

/* Navbar */
.split-container {
    display: flex;
    height: 100vh;
    padding-top: 90px; /* Khớp đúng chiều cao nav ở Bước 1 */
    background-color: #0d0d0d;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--gold);
}
.booking-visual {
    flex: 1.2;
    position: relative;
    padding: 20px; 
}

.visual-inner {
    position: relative;
    height: 100%;
    border: 1px solid rgba(197, 160, 89, 0.2); 
}

.main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
    transition: transform 8s ease;
}

.visual-inner:hover .main-img {
    transform: scale(1.15);
}

.visual-text {
    position: absolute;
    bottom: 60px;
    left: 40px;
    z-index: 2;
    max-width: 500px;
}

/* FONT CHỮ TRẢI NGHIỆM ĐẲNG CẤP ĐÃ ĐỔI */
.visual-text h2 {
    font-family: var(--font-luxury);
    font-size: 56px; /* Tăng kích thước cho bề thế */
    color: #fff;
    margin-bottom: 15px;
    font-weight: 600;
    font-style: italic; /* Chữ nghiêng tạo cảm giác nghệ thuật */
    line-height: 1.1;
    letter-spacing: 1px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
    background: linear-gradient(to bottom, #fff, var(--gold)); /* Hiệu ứng màu chữ loang nhẹ */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-line {
    width: 80px;
    height: 1px; /* Mảnh hơn cho tinh tế */
    background: var(--gold);
    margin-bottom: 25px;
}

.visual-text p {
    color: #ccc;
    line-height: 1.8;
    letter-spacing: 1px;
    font-size: 15px;
    font-weight: 300;
}

.corner-pattern {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-left: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    opacity: 0.3;
    background-image: linear-gradient(45deg, transparent 45%, var(--gold) 50%, transparent 55%);
    background-size: 12px 12px;
}

/* --- PHẦN BÊN PHẢI (FORM) --- */
.booking-content {
    flex: 1;
    background-color: var(--form-bg);
    overflow-y: auto;
    padding: 60px 5%;
}

.form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.form-title {
    font-family: var(--font-luxury);
    color: var(--gold);
    font-size: 38px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.form-subtitle {
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Các phần Input giữ nguyên như cũ để đảm bảo tính dễ đọc */
.input-group { margin-bottom: 25px; display: flex; flex-direction: column; }
.input-row { display: flex; gap: 20px; }
.input-row .input-group { flex: 1; }

label { 
    font-size: 11px; 
    color: var(--gold); 
    margin-bottom: 8px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
}

input, select {
    background: var(--input-bg);
    border: 1px solid #222;
    padding: 14px;
    color: #fff;
    border-radius: 2px;
    outline: none;
    font-family: var(--font-body);
    transition: var(--transition);
}

input:focus { border-color: var(--gold); background: #1f1f1f; }

.section-label { color: var(--gold); font-weight: bold; margin-top: 30px; display: block; font-size: 14px; letter-spacing: 1px;}

.preorder-card {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid #222;
    padding: 12px;
    margin-bottom: 12px;
}

.preorder-card img { width: 65px; height: 65px; object-fit: cover; margin-right: 15px; }
/* --- TỐI ƯU KHU VỰC CHỌN BÀN --- */
.time-slots {
    display: flex;
    flex-wrap: wrap; /* Cho phép xuống hàng nếu quá nhiều bàn */
    gap: 15px;
    margin-top: 15px;
}

/* Tìm đến id table-list hoặc class time-slots của bạn */
#table-list {
    display: grid;
    /* Chia làm 2 cột bằng nhau, mỗi cột chiếm 1 phần (1fr) */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; /* Khoảng cách giữa các bàn */
    margin-top: 20px;
    width: 100%;
}

.table-select {
    background-color: #1a1a1a; /* Nền đen xám để tiệp với màu web */
    color: #c5a059;            /* Chữ màu vàng đồng */
    border: 1px solid #c5a059; /* Viền màu vàng đồng */
    padding: 15px;
    font-family: 'Montserrat', sans-serif; letter-spacing: 2px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease; /* Hiệu ứng mượt mà khi hover/click */
    border-radius: 4px;        /* Bo góc nhẹ */
    text-transform: uppercase; /* Chữ in hoa cho chuyên nghiệp */
    letter-spacing: 1px;
}

/* Trên điện thoại di động thì hiện 1 cột để tránh bị quá bé */
@media (max-width: 480px) {
    #table-list {
        grid-template-columns: 1fr;
    }
}
 
.table-select:hover {
    background-color: #c5a059;
    color: #000;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}
.table-select.active {
    background-color: #c5a059; /* Đổi hẳn sang nền vàng đồng */
    color: #1a1a1a;            /* Chữ chuyển sang đen */
    border-color: #fff;        /* Viền trắng sáng để nổi bật */
    font-weight: bold;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
    transform: scale(1.02);    /* Phóng to nhẹ để khách biết mình đang chọn bàn này */
}

/* Responsive cho thiết bị di động */
@media (max-width: 480px) {
    .time-slots {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Chia 2 cột trên điện thoại cho gọn */
    }
    .table-select {
        padding: 12px 10px !important;
        font-size: 12px;
    }
}

.time-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(197, 160, 89, 0.05);
}

.time-btn.active {
    background: var(--gold); /* Màu vàng đồng */
    border-color: var(--gold);
    color: #000; 
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}
.btn-confirm {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 30px;
    letter-spacing: 3px;
    transition: var(--transition);
}

.btn-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.3);
}

@media (max-width: 992px) {
    body, html { overflow: auto; }
    .split-container { flex-direction: column; height: auto; }
    .booking-visual { height: 500px; flex: none; }
    .booking-content { padding: 40px 5%; flex: none; }
    .input-row { flex-direction: column; gap: 0; }
}
@media (max-width: 992px) {
    .split-container {
        flex-direction: column;
        height: auto;
    }

    .booking-visual {
        height: 350px; /* Thu hẹp phần ảnh */
    }

    .visual-text h2 {
        font-size: 38px;
    }

    .booking-content {
        padding: 40px 5%;
    }

    .form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
    }
    
    .time-slots {
        grid-template-columns: repeat(3, 1fr); /* 3 cột nút giờ trên mobile */
    }

    .preorder-card {
        padding: 10px;
    }
}
/* --- ĐIỀU CHỈNH THANH TÌM KIẾM NGANG --- */
.search-bar-inline {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.3);
    padding: 5px;
    border-radius: 8px;
    margin: 20px 0 40px 0;
    align-items: center; /* Đảm bảo các phần tử thẳng hàng giữa */
}

/* Tỉ lệ các ô: Ngày và Giờ vừa đủ, ô Người rộng hơn */
.search-input-item:nth-child(1),
.search-input-item:nth-child(2) {
    flex: 1; /* Cố định tỉ lệ nhỏ hơn */
}

.search-input-item:nth-child(3) {
    flex: 1.5; /* Kéo giãn ô số lượng người để không mất chữ */
    border-right: none;
}

.search-input-item {
    border-right: 1px solid rgba(197, 160, 89, 0.2);
}

/* Nút Tìm Bàn nhỏ lại một chút */
.btn-find {
    flex: 0.8; /* Thu nhỏ chiều ngang button */
    height: 45px; /* Giảm chiều cao một chút cho cân đối */
    background: var(--gold) !important;
    color: #000 !important;
    border: none;
    padding: 0 15px; /* Giảm padding */
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px; /* Giảm cỡ chữ nút */
    text-transform: uppercase;
    cursor: pointer;
    margin-left: 10px;
}

/* --- LÀM NỔI BẬT OPTION KHI CHỌN --- */
select {
    appearance: none; /* Xóa icon mặc định để tự tùy chỉnh */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c5a059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px !important;
}

/* Styling cho menu xổ xuống (Tùy thuộc trình duyệt) */
select option {
    background-color: #1a1a1a; /* Nền tối cho hợp tông */
    color: #fff;
    padding: 10px;
}

/* Hiệu ứng khi hover hoặc tập trung vào ô select */
select:focus {
    background-color: rgba(197, 160, 89, 0.1) !important;
    outline: none;
}
/* Trạng thái nút bị vô hiệu hóa (tối màu và không thể nhấn) */
.btn-find:disabled, 
.btn-confirm:disabled {
    background: #222 !important;
    color: #555 !important;
    border: 1px solid #333 !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* Ẩn phần chọn bàn mặc định */
.hidden-section {
    display: none; 
    transition: all 0.5s ease;
}
/* Thêm vào cuối file bookingStyle.css */
.btn-find:disabled {
    background: #222 !important;
    color: #555 !important;
    border: 1px solid #333 !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* Hiệu ứng khi nút được kích hoạt (sáng lên) */
.btn-find:not(:disabled) {
    background: var(--gold) !important;
    color: #000 !important;
    opacity: 1;
    cursor: pointer;
}
/* Overlay làm mờ nền */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* Ẩn mặc định */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

/* Nội dung thông báo */
.modal-content {
    background: #111;
    border: 1px solid var(--gold);
    padding: 50px 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.5s ease forwards;
}

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

.success-icon span {
    font-size: 80px;
    color: var(--gold);
    margin-bottom: 20px;
}

.modal-content h2 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 32px;
    margin-bottom: 15px;
}

.modal-content p {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
}

.modal-details {
    margin: 25px 0;
    padding: 15px;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.btn-modal-close {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-modal-close:hover {
    background: #fff;
    transform: scale(1.05);
}
