/* =========================================
   TỔNG QUAN CẤU TRÚC MODAL
   ========================================= */
.gallery-modal-body {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
}

/* =========================================
   CỘT TRÁI (KHU VỰC HIỂN THỊ ẢNH)
   ========================================= */
.gallery-left {
    width: 70%;
    padding: 20px 30px;
    border-right: 1px solid #eee;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Tabs (Menu chuyển nhóm ảnh) */
.gallery-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-shrink: 0; /* Giữ cố định tabs ở trên cùng */
}
.gallery-tab-item {
    cursor: pointer;
    text-align: center;
    width: 100px;
}
.gallery-tab-item img {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: 0.3s;
}
.gallery-tab-item p {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
    color: #333;
}

/* Trạng thái Active của Tab */
.gallery-tab-item.active img {
    border-color: #f94162;
}
.gallery-tab-item.active p {
    color: #f94162;
}

/* Grid lưới hình ảnh */
.gallery-grid {
    display: none; 
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow-y: auto; /* Kích hoạt thanh cuộn dọc */
    flex-grow: 1;     /* Lấp đầy không gian còn lại bên dưới tabs */
    padding-right: 8px; 
}
.gallery-grid.active {
    display: grid;
    min-height: 0; /* Khắc phục lỗi tràn flex-box */
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* Tùy biến thanh cuộn (Scrollbar) cho Grid ảnh */
.gallery-grid::-webkit-scrollbar {
    width: 6px;
}
.gallery-grid::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}
.gallery-grid::-webkit-scrollbar-thumb {
    background: #d1d7e0;
    border-radius: 4px;
}
.gallery-grid::-webkit-scrollbar-thumb:hover {
    background: #f94162; 
}


/* =========================================
   CỘT PHẢI (KHU VỰC ĐÁNH GIÁ)
   ========================================= */
.gallery-right {
    width: 30%;
    padding: 20px;
    background: #fafafa;
    max-height: 80vh;
    overflow-y: auto;
}

/* Khối điểm số */
.rating-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}
.rating-score {
    background: #f94162;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 8px;
}

/* Bong bóng comment */
.review-text-item {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.review-text-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}
.review-text-item .content {
    background: #f1f3f5;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}
.review-text-item .content strong { 
    display: block; 
    margin-bottom: 3px; 
}

/* =========================================
   RESPONSIVE (ĐIỆN THOẠI & TABLET)
   ========================================= */
@media (max-width: 768px) {
    .gallery-left, .gallery-right { 
        width: 100%; 
        border-right: none; 
        max-height: 60vh; /* Giảm chiều cao xuống một chút trên mobile để dễ lướt qua phần dưới */
    }
    .gallery-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    /* Giao diện tab có thể cuộn ngang nếu nhiều tab */
    .gallery-tabs {
        overflow-x: auto;
        padding-bottom: 10px;
    }
}
/* =========================================
   STYLE CHO NÚT ĐÓNG (CLOSE BUTTON)
   ========================================= */
.close-gallery-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    z-index: 100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}
.close-gallery-btn:hover {
    background: #f94162;
    color: #fff;
    border-color: #f94162;
}

/* =========================================
   HIỆU ỨNG TRƯỢT PHẢI -> TRÁI (SIDE DRAWER)
   ========================================= */
/* Bắt vào ID của modal ở file gốc */
#hotelGalleryModal {
    padding-right: 0 !important; /* Fix lỗi thanh cuộn của Bootstrap */
}

#hotelGalleryModal .modal-dialog {
    position: fixed;
    margin: auto;
    width: 90%; 
    max-width: 1200px;
    height: 100%;
    right: 0; 
    /* Đẩy modal ra hẳn ngoài mép màn hình bên phải */
    transform: translate3d(100%, 0, 0) !important; 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Khi Modal có class 'show' (hiển thị), kéo nó về tọa độ 0 */
#hotelGalleryModal.show .modal-dialog {
    transform: translate3d(0, 0, 0) !important;
}

/* Ép chiều cao modal-content full 100% màn hình */
#hotelGalleryModal .modal-content {
    height: 100%;
    border: none;
    border-radius: 0;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Chiều cao bên trong chia full 100vh thay vì 80vh như trước */
.gallery-modal-body,
.gallery-left, 
.gallery-right {
    height: 100%;
    max-height: 100vh;
}