/* public/assets/css/headquater.css */
.entity_index {
    display: flex;
    padding-top: 8px;
    padding-left: 0px;
}

.entity_index li {
    list-style: none;
    margin-right: 10px;
}

/* Force the map container to take full width and override inline styles */
.show-frame > div {
    width: 100% !important;
    height: 80vh !important; /* You can change this to match your preferred map height */
    max-width: 100% !important;
}

/* Ensure the iframe itself also takes full space */
.show-frame iframe {
    width: 100% !important;
    height: 100% !important;
}

/* Style the map container to look good on the screen */
.show-map {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    position: relative;
    /* Center the map popup vertically if needed */
    margin: 20px auto; 
}

.show-rooms {
    position: relative;
    padding: 0px 0;
    color: #333;
}

.show-rooms.product-hotel {
    padding: 0px;
}

.show-rooms a.more {
    font-size: 14px;
    font-weight: 600;
    padding: 3px 5px;
    color: rgb(0, 182, 243) !important;
}

.show-rooms p,
.show-rooms h2 {
    color: #333 !important;
    font-weight: 300;
}

.show-rooms h2 {
    font-size: 24px;
}

.show-rooms .bed {
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding: 5px 15px;
}

.show-rooms .bed ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bed.info ul {
    display: flex;
    flex-wrap: wrap;   /* Wrap to next line if too long */
    gap: 16px;
    padding: 0;
    list-style: none;
}

.bed.info ul li {
    display: flex;
    align-items: center;
}

.bed.info ul li img.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.show-rooms .offers p {
    color: #333;
    margin-bottom: 3px;
}

.show-rooms .bed ul li {
    padding: 10px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.show-rooms .bed span {
    color: #333;
}

.show-rooms .bed p {
    margin: auto 0px;
}

.show-rooms .amenity .list ul {
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.show-rooms .amenity .list ul li {
    display: inline;
    margin: 3px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    border-radius: 100px;
    background-color: #EDF2F7;
    float: left;
}

.show-rooms .amenity .list ul li span {
    color: #333 !important;
}

.show-rooms .bed .icon {
    max-width: 25px;
    text-align: middle;
    margin-left: auto;
    margin-right: auto;
}

.show-rooms ul.list-policy {
    list-style: none;
    padding: 0;
    margin: 0;
}

.show-rooms ul.list-policy li {
    padding: 3px 3px;
    color: #333;
}

.show-rooms .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.show-rooms .item .item-right ul.capacity {
    list-style: none;
    padding: 0;
    margin: 0;
}

.show-rooms .item .item-right ul.capacity li {
    float: left;
    position: relative;
    padding: 3px;
    color: #555;
    margin-right: 15px;
}

.show-rooms .list-policy .cancellation {
    color: #6F7977;
}

.show-rooms .list-policy .breakfast {
    color: #65BB78;
}

.show-rooms .list-policy .confirmation {
    color: #EE8936;
}

.show-rooms .list-policy .invoice {
    color: #FF3383;
}

.show-rooms .item .item-right .info-room {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.show-rooms .item .item-right .include {
    background-color: #f0f8f0; /* Light green background */
    padding: 10px;
    border-left: 4px solid #4CAF50; /* Green left border */
    border-radius: 5px; /* Rounded corners */
    margin-bottom: 10px;
    color: #333;
}

.show-rooms .item .item-right .include h6 {
    font-weight: bold; /* Bold text */
    color: #333; /* Black text color */
}

.show-rooms .amenity.hide-amenity-mobile {
    display: block;
}

.show-rooms .amenity.show-amenity-mobile {
    display: none;
}

.amenity.show-amenity-mobile {
    border-top: 1px solid #ddd;
    margin-top: 5px;
    padding: 10px 0px;
}

.amenity.show-amenity-mobile .list ul {
    display: grid;
    grid-template-columns: repeat(5, 1fr) 50px; /* 5 equal amenities + 1 view more box */
    gap: 1px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.amenity.show-amenity-mobile .list ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: auto;
    min-height: 75px;
    padding: 1px;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
}

/* Image icon or fallback */
.amenity.show-amenity-mobile .list ul li .amenity-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 6px;
}

.amenity.show-amenity-mobile .list ul li i {
    font-size: 24px;
    color: #444;
    margin-bottom: 6px;
}

/* Amenity name, max 2 lines with ellipsis */
.amenity.show-amenity-mobile .list ul li span.ellipsis-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.2;
    max-height: 2.4em;
    word-break: break-word;
    padding: 0 4px;
}

/* View more button: rounded, compact, centered */
.amenity.show-amenity-mobile .list ul li:last-child {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amenity.show-amenity-mobile .list ul li:last-child a.popup-amenities {
    width: 36px;
    height: 36px;
    font-size: 12px;
    background-color: #ffdfe3;
    color: #e81c4f;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: auto;
}

@media(max-width: 768px) {
    .show-rooms .amenity.hide-amenity-mobile {
        display: none;
    }
    .show-rooms .amenity.show-amenity-mobile {
        display: block;
    }
}

.popup-amenity {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    opacity: 0;
    background: #fff;
    overflow: hidden;
    z-index: 1050;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transition: height 0.3s ease, opacity 0.3s ease;
    padding: 0 20px;
    pointer-events: none; /* No interaction when hidden */
}

/* When active */
.popup-amenity.active {
    height: 80vh;
    opacity: 1;
    padding-top: 20px;
    padding-bottom: 20px;
    pointer-events: auto;
    overflow-y: auto; /* Allow vertical scrolling when content exceeds 80vh */
    scroll-behavior: smooth; /* Make scrolling smoother */
}

/* Close button styling */
.close-popup {
    position: sticky; /* Keep the button fixed relative to the scroll container */
    top: 0px; 
    float: right; /* Push to the right edge */
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    margin-bottom: 15px; /* Add some space below the button so it doesn't overlap title */
}

/* Optional: Custom styling for the scrollbar to make it look modern */
.popup-amenity::-webkit-scrollbar {
    width: 6px;
}
.popup-amenity::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.popup-amenity::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.popup-amenity::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Mobile - additional optimization */
@media (max-width: 576px) {
    .popup-amenity.active {
        height: 90vh;
        overflow-y: auto;
    }
}

/* Grid container for amenities */
.popup-amenity .jss319 {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns on desktop */
    gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
    margin-top: 12px;
    margin-bottom: 24px; /* Space below each category */
}
.list.desktop .jss319 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
    margin-top: 12px;
    margin-bottom: 24px; /* Space below each category */
}

/* Individual amenity item wrapper */
.jss356 {
    display: flex;
    align-items: flex-start; /* Align icon and text to the top */
}

/* Amenity Icon */
.jss357 {
    width: 20px; /* Slightly smaller icon to fit 6 columns */
    height: 20px;
    margin-right: 8px; /* Space between icon and text */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Amenity Text */
.jss360 {
    width: 100%;
    font-size: 13px; /* Slightly smaller text */
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
}

/* Responsive adjustments for tablet */
@media (max-width: 992px) {
    .list.desktop {
        display: grid !important;
    }
    .list.desktop .jss319 {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
        gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
        margin-top: 12px;
        margin-bottom: 24px; /* Space below each category */
    }

    .jss319 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    }
    .popup-amenity .jss319 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 12px;
        margin-top: 12px;
        margin-bottom: 24px;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 576px) {
    .jss319 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile devices */
    }
}

/* ========================================================================= */
/* --- SLIDE FROM BOTTOM TO CENTER ANIMATION & LAYOUT --- */
/* ========================================================================= */

/* 1. Canh giữa màn hình tuyệt đối và tạo hiệu ứng trượt từ dưới lên */
#addToCart.bottom-sheet-modal .modal-dialog {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    min-height: 100%; 
    display: flex;
    align-items: center; /* Canh giữa theo chiều dọc */
    justify-content: center; /* Canh giữa theo chiều ngang */
    max-width: 1000px; /* Giới hạn độ rộng tối đa trên PC */
    
    /* Bắt đầu ở vị trí vô hình, bị đẩy hẳn xuống dưới đáy màn hình */
    transform: translateY(100vh) !important; 
    opacity: 0;
    
    /* Hiệu ứng trượt lên mượt mà (cubic-bezier tạo độ nảy nhẹ) */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease !important;
    padding: 15px; /* Giữ khoảng cách an toàn với mép màn hình */
}

/* Trạng thái khi hiển thị: Trượt lên điểm 0 (chính giữa màn hình do flexbox quản lý) */
#addToCart.bottom-sheet-modal.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1;
}

/* 2. Khung modal: Bo góc 4 cạnh bằng nhau, tự động co giãn chiều cao */
#addToCart.bottom-sheet-modal .modal-content {
    height: auto !important; 
    max-height: 90vh !important; /* Tối đa 90% màn hình, triệt tiêu scroll ngoài */
    width: 100%;
    margin: 0; 
    border-radius: 20px !important; /* Bo góc tròn đều 4 cạnh */
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden !important; 
    display: flex;
    flex-direction: column;
}

/* Nút tắt popup: Đặt gọn góc phải trên */
#addToCart.bottom-sheet-modal .close.absolute-top-right {
    top: 10px;
    right: 10px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 1055;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#addToCart.bottom-sheet-modal .close.absolute-top-right span {
    line-height: 1;
    margin-top: -2px;
}

/* 3. Nội dung bên trong (Body): Ép padding 5px và chống tràn scroll ngang */
.modal-body.compact-modal,
.modal-body.c-scrollbar-light {
    padding: 5px !important; /* Override cứng class p-4 của Bootstrap trong HTML */
    flex-grow: 1; 
    overflow-y: auto !important; /* Chỉ hiện thanh cuộn dọc khi nội dung cao hơn 90vh */
    overflow-x: hidden !important; /* Tắt hẳn thanh cuộn ngang gây ức chế */
    display: flex;
    flex-direction: column;
}

/* Triệt tiêu lỗi tràn ngang kinh điển của Bootstrap Row */
#addToCart.bottom-sheet-modal .modal-body > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Limit image height to prevent pushing content down */
.modal-product-gallery .img-zoom img {
    max-height: 250px;
    object-fit: contain;
    width: 100%;
}

/* 4. Sticky Action Bar (Thanh chốt đơn dưới cùng) */
.sticky-action-bar {
    position: sticky;
    bottom: -5px !important; /* Kéo âm 5px để bù trừ cho padding 5px của Body */
    background-color: #fff;
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom)); 
    margin-top: auto; 
    margin-left: -5px; /* Tràn viền khớp với body */
    margin-right: -5px; 
    padding-left: 15px; /* Giữ khoảng cách text bên trong nút */
    padding-right: 15px;
    border-top: 1px solid #f1f1f1;
    border-radius: 0 0 20px 20px; /* Bo góc đáy trùng với modal-content */
    z-index: 100;
    flex-shrink: 0; 
}

/* Giấu scrollbar ngang ở mobile, thu gọn scrollbar dọc */
.c-scrollbar-light::-webkit-scrollbar {
    width: 4px;
    height: 0px !important; 
}
.c-scrollbar-light::-webkit-scrollbar-track {
    background: transparent;
}
.c-scrollbar-light::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Mobile optimization */
@media (max-width: 576px) {
    #addToCart.bottom-sheet-modal .modal-dialog {
        padding: 10px; /* Thu hẹp lề một chút trên điện thoại */
    }
    #addToCart.bottom-sheet-modal .modal-content {
        max-height: 95vh !important; /* Cho phép cao hơn trên màn hình nhỏ */
    }
}

/* ================== HOTEL ROOM DETAILS & AMENITIES STYLES ================= */
.total-child-price > div {
    padding: 6px 0;
    border-bottom: 1px dashed #f1d69a;
    font-size: 15px;
    color: #333;
}

.total-child-price > div span {
    text-align: right;
    font-size: 16px;
    color: #c47a08;
}
/* ========================================================================= */
/* ================== NEW COMPACT MODAL STYLES ADDED HERE ================== */
/* ========================================================================= */

/* 2. Sửa modal-body: Xóa padding ở đáy để thanh action bar ép sát 100% */
.modal-body.compact-modal,
.modal-body.c-scrollbar-light {
    padding: 1rem 1rem 0 1rem !important; /* Chỉ giữ padding trên, trái, phải. Đáy = 0 */
    flex-grow: 1; 
    overflow-y: auto !important; /* Chỉ cuộn dọc khi thực sự vượt quá max-height 92vh */
    overflow-x: hidden !important; 
    display: flex;
    flex-direction: column;
}
/* Triệt tiêu lỗi tràn ngang kinh điển của Bootstrap Row */
#addToCart.bottom-sheet-modal .modal-body > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Limit image height to prevent pushing content down on mobile */
.modal-product-gallery .img-zoom img {
    max-height: 250px;
    object-fit: contain;
    width: 100%;
}

/* Reduce spacing on dividers */
.compact-hr {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* 3. Sửa action bar: Bám chính xác vào đáy, không bị hụt pixel */
.sticky-action-bar {
    position: sticky;
    bottom: 0px !important; /* Bám sát đáy, không dùng số âm nữa */
    background-color: #fff;
    padding-top: 15px;
    padding-bottom: max(15px, env(safe-area-inset-bottom)); /* Tối ưu cho viền đen/tai thỏ của iPhone */
    margin-top: 1rem; /* Tạo khoảng cách với phần form ở trên */
    margin-left: -1rem; 
    margin-right: -1rem;
    padding-left: 1rem; 
    padding-right: 1rem;
    border-top: 1px solid #f1f1f1;
    z-index: 100;
    flex-shrink: 0; /* Đảm bảo nút không bao giờ bị bóp méo khi nội dung quá dài */
}

/* Giấu scrollbar ngang ở mobile, thu gọn scrollbar dọc */
.c-scrollbar-light::-webkit-scrollbar {
    width: 4px;
    height: 0px !important; /* Tắt hẳn scrollbar ngang của webkit */
}
.c-scrollbar-light::-webkit-scrollbar-track {
    background: transparent;
}
.c-scrollbar-light::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
/* ========================================================================= */
/* ================= HOTEL COMPACT LAYOUT OPTIMIZATIONS ==================== */
/* ========================================================================= */

/* Transform standard list into a dense wrap flexbox */
.room-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Standardize gap between room options */
    padding: 0;
    margin-bottom: 0.5rem;
}

.room-list li.room-item {
    list-style: none;
    margin: 0;
}

/* Override default label margins for density */
.room-checkbox-label {
    margin-bottom: 0 !important;
    cursor: pointer;
}

/* Compact visual style for the room checkbox buttons */
.room-checkbox-label .custom-checkbox-icon {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-color: #e2e5ec !important;
    transition: all 0.2s ease-in-out;
}

.room-checkbox-label input[type="checkbox"] {
    display: none; /* Hide default browser checkbox */
}

/* Highlight style when room is selected */
.room-checkbox-label input:checked + .custom-checkbox-icon {
    background-color: #e6f7ff;
    border-color: #1890ff !important;
    color: #1890ff;
}

/* Disabled/Locked style */
.room-checkbox-label.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Maintain internal flex structure of modal */
.compact-modal .row.flex-grow-1 {
    min-height: 0; /* Ensures inner scroll works properly in flex child */
}

/* Smaller alert boxes for hotel warnings */
.compact-modal .alert {
    line-height: 1.3;
}