/* [UPDATE] Hiện lại Navbar (bỏ nav khỏi display:none), chỉ ẩn Footer */
footer{ display: none !important; }

/* [UPDATE] Cố định chiều cao trang web (App-like) - Chống rung lắc/kéo trang */
html, body { 
    height: 100%; 
    width: 100%; 
    overflow: hidden; /* Khóa cuộn toàn trang */
    position: fixed; /* [QUAN TRỌNG] Ghim chặt body vào màn hình */
    inset: 0;
    background-color: #f9fafb;
    display: flex; /* Dùng Flex để chia Navbar và Content */
    flex-direction: column;
    /* [APP-LIKE] Xử lý vùng an toàn */
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    overscroll-behavior: none;
}

/* [FIX] Desktop: Thêm padding-top để nội dung không bị Navbar che khuất */
@media (min-width: 992px) {
    body { padding-top: 80px !important; }
}

/* [NEW] Reset Main Container để full màn hình */
.main-content-wrapper {
    flex: 1; /* Chiếm toàn bộ không gian còn lại dưới Navbar */
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important; /* [FIX] Đảm bảo chiều cao 100% để map không bị collapse */
    overflow: hidden; /* Ngăn cuộn ở container chính */
}

/* [NEW] Giới hạn chiều rộng cho màn hình lớn (Desktop Large) */
@media (min-width: 1536px) {
    .main-content-wrapper {
        max-width: 1536px !important;
        margin: 0 auto !important;
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
        box-shadow: 0 0 25px rgba(0,0,0,0.05);
    }
}

/* Layout Split View */
.split-layout {
    display: flex;
    flex-direction: column;
    height: 100%; /* [UPDATE] Full chiều cao của cha (.main-content-wrapper) */
    width: 100%; 
    overflow: visible !important; 
    position: relative;
}

/* 1. Map Container (Top) */
.map-section {
    flex: 1; /* [UPDATE] Map tự động chiếm hết khoảng trống còn lại */
    width: 100%;
    position: relative;
    z-index: 10;
    min-height: 0; /* Quan trọng cho Flexbox */
    overflow: hidden; /* [NEW] Map không được tràn */
}
#itinerary-map { width: 100%; height: 100%; }

/* [FIX] Hạ thấp cụm nút điều khiển bản đồ để gần với Content Section hơn */
.map-section .map-custom-controls {
    bottom: 20px !important;
    right: 10px !important;
}

/* [FIX] Hiển thị nút tìm kiếm trong chế độ dẫn đường */
body.nav-mode-active #itinerary-search-wrapper {
    display: flex !important;
    z-index: 10001 !important; /* Cao hơn các thành phần khác */
}

/* [NEW] Chế độ dẫn đường: Mở hộp tìm kiếm lên trên (Upwards) */
body.nav-mode-active #itinerary-search-box {
    top: auto !important;
    bottom: 0 !important;
    transform-origin: bottom right !important;
}

/* 2. Content Container (Bottom) */
.content-section {
    height: 60vh; /* [UPDATE] Chiều cao mặc định trên Mobile */
    flex: none; /* Không tự co giãn, giữ đúng height */
    background-color: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-top: -20px; /* Đè lên map một chút */
    position: relative;
    z-index: 2000; /* [FIX] Tăng z-index cao hơn Map (Leaflet controls ~1000) */
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    overflow: visible; /* [FIX] Để nút toggle sidebar (absolute) không bị che khuất */
    transition: height 0.3s ease-in-out, margin-left 0.3s ease-in-out; /* [NEW] Hiệu ứng mượt mà */
}

/* Reset kích thước chuẩn cho Tiêu đề ngày */
#day-title-display {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: #1e293b !important;
}

/* Header Back Button (Floating on Map) */
.floating-header {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 4000;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: 480px;
    width: calc(100% - 24px);
}
/* Bật lại pointer-events cho các phần tử con */
.floating-header > * { pointer-events: auto; }

@media (min-width: 768px) {
    .floating-header {
        max-width: 460px;
    }
}

.btn-back {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #374151;
}

/* Sticky Tabs */
.day-tabs-container {
    position: sticky;
    top: 0;
    background: white;
    z-index: 30;
    padding: 8px 12px 0 12px;
    border-bottom: 1px solid #f1f5f9;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    align-items: center;
}
.day-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 4px 10px;
    border-radius: 16px;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.tab-btn.active {
    background-color: #eff6ff; /* blue-50 */
    color: #2563eb; /* blue-600 */
    border-color: #bfdbfe;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

/* Timeline Card kế thừa chuẩn Location Card cao cấp */
.timeline-location-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 108px !important;
    height: auto !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.timeline-location-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.timeline-card-thumb {
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    align-self: stretch !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0 !important;
    background-color: #f1f5f9 !important;
    display: block !important;
}

.timeline-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.timeline-location-card:hover .timeline-card-thumb img {
    transform: scale(1.05);
}

.timeline-card-badge {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    z-index: 3 !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

.timeline-card-content {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
}

.timeline-card-title {
    font-size: 0.92rem !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    margin: 0 0 2px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
}

.timeline-location-card:hover .timeline-card-title {
    color: var(--primary-color) !important;
}

.timeline-card-tip {
    background-color: #fefce8;
    border-left: 2px solid #eab308;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
    margin-bottom: 2px;
}

/* Nút Lộ trình trên thẻ: Tinh gọn, bo tròn mềm mại chuẩn UI */
.btn-card-route {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #0284c7 !important;
    background-color: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    border-radius: 20px !important;
    padding: 3px 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
}

.btn-card-route:hover {
    background-color: #e0f2fe !important;
    border-color: #7dd3fc !important;
}

@media (max-width: 767.98px) {
    .timeline-location-card {
        min-height: 104px !important;
        height: auto !important;
    }

    .timeline-card-thumb {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        align-self: stretch !important;
    }

    .timeline-card-content {
        padding: 6px 8px !important;
    }
}

/* Timeline Content */
.timeline-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
    padding-bottom: 80px; /* Chừa chỗ cho thanh đáy */
    overscroll-behavior-y: contain;
}

/* Vertical Timeline Design (Single-Surface Stepper) */
.timeline-item {
    position: relative;
    padding-left: 26px;
    padding-bottom: 24px;
    border-left: 2px dashed #cbd5e1; /* Đường nét đứt xám tinh tế nối các chặng */
}
.timeline-item:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 8px;
}

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #2563eb;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 2px #bfdbfe;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px #93c5fd;
}

/* Timeline Time Header Row (Giờ + Loại hình cùng dòng) */
.timeline-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.timeline-time {
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 2.5px 8px;
    border-radius: 12px;
    line-height: 1.2;
}

.timeline-type-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0284c7;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
}

/* --- [NEW] NAVIGATION MODE STYLES --- */
/* Khi body có class 'nav-mode-active' */
body.nav-mode-active .content-section,
body.nav-mode-active .day-tabs-container,
body.nav-mode-active .floating-header,
body.nav-mode-active nav, /* [FIX] Ẩn Navbar */
body.nav-mode-active header,
body.nav-mode-active .navbar { display: none !important; }

body.nav-mode-active .map-section {
    height: 100vh !important;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999 !important;
}

/* [NEW] Desktop Responsive: Split Layout (Content Left - Map Right) */
@media (min-width: 768px) {
    .split-layout {
        flex-direction: row; /* Xếp ngang thay vì dọc */
    }
    .content-section {
        width: 450px; /* Sidebar cố định 450px để nội dung không bị tràn viền */
        flex: none;
        height: 100%; /* [FIX] Đổi từ 100vh sang 100% để khớp với container cha đã trừ padding body */
        order: 1; /* Đưa nội dung sang trái */
        margin-top: 0; /* Reset margin âm của mobile */
        border-radius: 0; /* Reset bo góc */
        border-right: 1px solid #e5e7eb;
        z-index: 30;
        transition: margin-left 0.3s ease-in-out; /* [NEW] Hiệu ứng trượt */
    }
    .map-section {
        flex: 1; /* Map chiếm phần không gian còn lại */
        height: 100%; /* [FIX] Đổi từ 100vh sang 100% */
        order: 2; /* Map nằm bên phải */
    }
}

/* [NEW] Google Maps Custom Marker (Số thứ tự) */
.itinerary-marker {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}
.itinerary-marker:hover {
    transform: scale(1.1);
    z-index: 10;
}
.marker-number {
    width: 28px; height: 28px;
    background-color: #2563eb; /* Blue 600 */
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* [NEW] Tên địa điểm cạnh Marker */
.marker-name {
    position: absolute;
    left: 32px; /* Cách marker number một chút */
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* [UPDATE] Bỏ nền trắng */
    padding: 0; /* [UPDATE] Bỏ padding */
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: none; /* [UPDATE] Bỏ bóng */
    color: #202124; /* [UPDATE] Màu chữ đậm chuẩn Google Maps */
    z-index: 9;
    border: none;
    opacity: 1; /* [UPDATE] Luôn hiển thị tên địa điểm */
    transition: opacity 0.2s;
    pointer-events: none;
    /* [NEW] Tạo viền trắng xung quanh chữ (Halo effect) để dễ đọc */
    text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff;
}

/* Hiện tên khi hover vào marker */
.itinerary-marker:hover .marker-name {
    opacity: 1;
}

/* Luôn hiện tên nếu muốn (bỏ comment dòng dưới) */
/* .marker-name { opacity: 1; } */

/* [NEW] Active Marker State */
.marker-active {
    transform: scale(1.3) !important;
    z-index: 50 !important;
}
.marker-active .marker-number {
    background-color: #f59e0b !important; /* Orange 500 */
    border-color: #fff7ed !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

/* Mobile Adjustment */
@media (max-width: 767.98px) {
    .directions-panel-container {
        top: 60px; /* Tránh bị header che nếu có */
        max-height: 50vh;
    }

    /* [NEW] Khi đang dẫn đường (Header ẩn) -> Đẩy panel lên sát top */
    body.nav-mode-active .directions-panel-container {
        top: 10px !important;
    }

    /* [FIX] Mobile Toggle Button Style (Handle Bar) */
    #content-toggle-btn {
        position: absolute !important;
        left: 50% !important;
        transform: none !important; /* [FIX] Bỏ transform để tránh lỗi render */
        margin-left: -30px !important; /* [FIX] Căn giữa thủ công (width 60px / 2) */
        top: -18px !important; /* [FIX] Đẩy lên thấp hơn cho đỡ thô */
        border-radius: 12px 12px 0 0 !important; /* Bo tròn góc trên (dạng Tab) */
        width: 60px !important; 
        height: 18px !important; /* [FIX] Giảm chiều cao nút */
        border: 1px solid #e5e7eb !important;
        border-bottom: 0 !important;
        background-color: white !important;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.05) !important;
        z-index: 2001 !important; /* [FIX] Luôn nổi trên content-section */
    }

    /* Khi đóng content trên mobile (Chế độ xem bản đồ) -> Ôm sát nội dung tabs, loại bỏ khoảng trắng thừa */
    body.content-closed .content-section {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        z-index: 2000 !important;
        margin-left: 0 !important;
        padding-bottom: 0 !important;
    }
    /* Ẩn nội dung timeline khi ở chế độ xem bản đồ */
    body.content-closed .timeline-scroll-area {
        display: none !important;
    }
    
    /* Map sẽ tự động giãn ra nhờ flex: 1 */
}

/* [NEW] Trạng thái đóng Sidebar trên Desktop */
@media (min-width: 768px) {
    body.content-closed .content-section {
        margin-left: -450px; /* Kéo thụt vào bên trái */
    }
}

/* [NEW] Hiệu ứng Highlight thẻ khi click Marker (Mạnh mẽ hơn) */
@keyframes highlight-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.card-highlighted {
    background-color: #eff6ff !important; /* bg-blue-50 */
    border-color: #3b82f6 !important; /* border-blue-500 */
    box-shadow: 0 0 0 2px #3b82f6 !important; /* ring-2 */
    animation: highlight-pulse 1s ease-in-out;
    z-index: 50;
}

/* [FIX] Đảm bảo Tooltip Bootstrap luôn nổi lên trên mọi thành phần (kể cả Content Section z-2000) */
.tooltip {
    z-index: 10000 !important;
}

/* [FIX] Z-Index cho Modal và Offcanvas cao hơn Content Section (2000) */
.modal, .offcanvas { z-index: 3000 !important; }
.modal-backdrop, .offcanvas-backdrop { z-index: 2999 !important; }
/* Đảm bảo nút đóng modal/offcanvas dễ bấm */
.btn-close { opacity: 1; }

/* --- [NEW] MOBILE BOOKING BAR (Đồng bộ Service/Location) --- */
.mobile-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 3000;
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    gap: 8px;
}

@media (min-width: 1024px) {
    .mobile-booking-bar {
        display: none !important;
    }
}

.nav-item-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 8px;
    flex: 1;
    height: 100%;
    color: #343a40;
    text-decoration: none;
    cursor: pointer;
}
.nav-item-detail .nav-icon { font-size: 1.4rem; color: var(--primary-color); margin-bottom: 4px; }
.nav-item-detail .nav-text { font-size: 0.75rem; font-weight: 600; line-height: 1; }

/* [NEW] Highlight style cho nút Đặt Combo */
.nav-item-detail .nav-icon.highlight { color: var(--secondary-color); /* [THEME] Màu phụ (Cam/Đỏ) */ }
.nav-item-detail .nav-text.highlight { color: var(--secondary-color); font-weight: 700; }

.action-group { flex-grow: 1.5; display: flex; align-items: center; height: 100%; padding: 10px 0; }

.cta-button-mobile {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 800;
}

/* [NEW] Hiệu ứng rung nhẹ cho icon (Đặt Combo) */
@keyframes shake-gentle {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(12deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(6deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(0deg); } /* Nghỉ 50% thời gian */
}
.shake-gentle {
    animation: shake-gentle 2.5s infinite ease-in-out;
    transform-origin: center;
    display: inline-block;
}

/* [FIX] Loại bỏ hoàn toàn khung đen (outline) cho nút mũi tên tab */
#tab-prev, #tab-next {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent; /* Bỏ highlight trên mobile */
}
#tab-prev:focus, #tab-next:focus,
#tab-prev:focus-visible, #tab-next:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* [NEW] Search Box Container Styling */
#itinerary-search-box {
    position: absolute; /* [FIX] Tuyệt đối để không đẩy nút khác */
    right: 50px; /* Cách nút 50px sang trái */
    bottom: 0 !important; /* Ghim đáy cùng hàng nút để mở hướng lên trên */
    top: auto !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 4px 10px -6px rgba(0, 0, 0, 0.1) !important;
    width: 280px !important;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 16px !important;
    padding: 14px !important;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block; /* Luôn block để transition hoạt động */
    z-index: 1000;
}

/* [FIX] Trạng thái ẩn với hiệu ứng */
#itinerary-search-box.hidden {
    display: block !important; /* Override class hidden mặc định */
    opacity: 0;
    transform: scale(0.9) translateX(10px);
    pointer-events: none;
    visibility: hidden;
}

/* [NEW] Search Filter Buttons (Tags) */
.search-filter-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 12px 4px;
    border-radius: 12px;
    background-color: #f8f9fa;
    color: #374151;
    border: 1px solid #e5e7eb;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
    height: 100%;
}
.search-filter-btn:hover { 
    background-color: #fff; 
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.search-filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}
.search-filter-btn .filter-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 2px;
}

/* [NEW] Grid Layout for Search Buttons */
#search-filter-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

    /* [FIX] Hạ thấp nút điều khiển bản đồ trên Mobile để không đè lên nút tìm kiếm */
    @media (max-width: 767.98px) {
        .map-custom-controls {
            bottom: 140px !important; /* [UPDATE] Đẩy lên cao hơn Bottom Sheet dẫn đường */
            top: auto !important;
        }
    }

    /* [NEW] Định vị nút Tìm kiếm khi ở chế độ Dẫn đường */
    body.nav-mode-active #itinerary-search-wrapper {
        position: fixed !important;
        bottom: 185px !important; /* [UPDATE] Hạ thấp (130px + 44px + 11px gap) */
        right: 20px !important;
        z-index: 10000 !important;
    }
    /* Đồng bộ kích thước nút tìm kiếm với các nút khác */
    body.nav-mode-active #btn-toggle-search {
        width: 50px !important;
        height: 50px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
        border: 1px solid #e5e7eb !important;
    }

/* --- [NEW] NAVIGATION BOTTOM SHEET (Google Maps Style) --- */
.nav-bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
    z-index: 10000; /* Cao nhất */
    display: flex;
    flex-direction: column;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px; /* [OPTIMIZE] Giảm chiều cao mặc định */
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-bottom-sheet.expanded {
    height: 80vh; /* Chiều cao khi mở rộng */
}

.nav-sheet-handle-bar {
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-sheet-handle {
    width: 40px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 10px;
}

.nav-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 15px 20px;
    flex-shrink: 0;
}

.nav-btn-circle {
    width: 40px; height: 40px; /* [OPTIMIZE] Giảm kích thước nút */
    border-radius: 50%;
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.nav-btn-circle:active { transform: scale(0.95); }

.nav-btn-exit { background-color: #fee2e2; color: #dc2626; } /* Đỏ nhạt */

/* [UPDATE] Nút mũi tên (Google Maps) trong suốt & hiện đại */
.nav-btn-gmaps { 
    background-color: rgba(37, 99, 235, 0.1); /* Xanh trong suốt */
    color: #2563eb; 
    backdrop-filter: blur(5px); /* Hiệu ứng mờ nền */
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.nav-sheet-info {
    text-align: center;
    flex: 1;
    cursor: pointer;
}
.nav-duration { font-size: 1.5rem; font-weight: 800; color: #111827; line-height: 1.1; } /* [OPTIMIZE] Giảm font size */
.nav-meta { font-size: 0.9rem; color: #6b7280; font-weight: 500; }
.nav-arrival { color: #059669; font-weight: 700; } /* Màu xanh lá cho giờ đến */

.nav-sheet-body {
    flex: 1;
    overflow-y: auto;
    background-color: #f9fafb;
    border-top: 1px solid #f3f4f6;
    padding: 0;
}

/* --- [NEW] Desktop Action Bar (High-Contrast & Premium Design) --- */
.itinerary-desktop-cta {
    display: none;
}
@media (min-width: 1024px) {
    .itinerary-desktop-cta {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #ffffff !important;
        border-top: 2px solid #e2e8f0 !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
        flex-shrink: 0;
        z-index: 30;
    }
}

.cta-price-info {
    display: flex;
    flex-direction: column;
}

.cta-price-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.cta-price-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0284c7;
    line-height: 1.2;
}

.cta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cta-btn-zalo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.cta-btn-zalo:hover {
    background: #dbeafe !important;
    color: #1e40af !important;
    transform: translateY(-1px);
}

.cta-zalo-badge {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.cta-btn-booking {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    border: none !important;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35) !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-btn-booking:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45) !important;
    color: #ffffff !important;
}
.cta-btn-booking:active {
    transform: scale(0.97);
}