
/* Ẩn triệt để thanh Mobile CTA mặc định của theme Houzez (tránh bị đè 2 thanh) */
div.mobile-property-contact {
    display: none !important;
}

/* Style cho thanh CTA Mobile Toàn Cầu */
.qn-global-cta {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #ffffff !important;
    padding: 10px 15px !important;
    z-index: 9999999 !important;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15) !important;
    display: none !important; /* Mặc định giấu trên PC */
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}

/* CHỈ HIỂN THỊ KHI MÀN HÌNH NHỎ HƠN 768px (MOBILE) */
@media (max-width: 768px) {
    .qn-global-cta {
        display: flex !important; /* Dùng !important để chống theme đè ngược */
    }
    html:root, body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    .footer-bottom-wrap {
        /* Đẩy nội dung chân trang dài ra để không bị che khuất mà vẫn giữ được màu nền xanh đậm */
        padding-bottom: 85px !important; 
    }
}

.qn-cta-left {
    display: flex !important;
    align-items: center !important;
    flex-grow: 1 !important;
}

.qn-cta-left img {
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: cover !important;
    margin-right: 12px !important;
    border: 2px solid #eaeaea !important; 
    display: block !important;
}

.qn-cta-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0c233e !important; 
    margin: 0 !important;
    line-height: 1.2 !important;
    font-family: inherit !important;
}

.qn-cta-role {
    font-size: 12px !important;
    color: #888 !important;
    margin-top: 2px !important;
}

.qn-cta-right {
    display: flex !important;
    gap: 10px !important;
}

.qn-cta-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
}

/* Nút ZALO nổi bật chuẩn CRO */
.qn-cta-zalo {
    background-color: #0068FF !important; /* Xanh Zalo chuẩn */
    color: #ffffff !important;
    padding: 0 16px !important;
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.35) !important;
    transition: all 0.2s ease !important;
}
.qn-cta-zalo:hover {
    background-color: #0056d6 !important;
    transform: translateY(-1px) !important;
}

/* Nút Gọi Điện Đỏ sẫm sang trọng chuẩn CRO */
.qn-cta-call {
    background-color: #bd081c !important; /* Đỏ sẫm */
    color: #ffffff !important;
    padding: 0 16px !important;
    box-shadow: 0 4px 12px rgba(189, 8, 28, 0.35) !important;
    animation: pulse-red 2s infinite !important;
    transition: all 0.2s ease !important;
}
.qn-cta-call:hover {
    background-color: #8c0615 !important;
    transform: translateY(-1px) !important;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(189, 8, 28, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(189, 8, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(189, 8, 28, 0); }
}

.qn-cta-call i {
    font-size: 16px !important;
    margin-right: 5px !important;
}


        :root {
            --primary: #0A192F;
            --primary-light: #E6F0FA;
            --accent: #E2B714;
            --bg-color: #0f172a;
            --text-dark: #1f2937;
            --text-light: #64748b;
            --bot-msg-bg: #ffffff;
            --user-msg-bg: #E2B714;
            --user-msg-text: #0A192F;
            --font-family: 'Roboto', Arial, sans-serif;
            --glass-bg: rgba(255, 255, 255, 0.95);
        }

        .phone-mockup *, .chatbot-fab, .chatbot-fab * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-family);
        }

        .phone-mockup {
            width: 360px;
            height: 550px;
            max-height: 65vh;
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: fixed;
            top: 33vh; /* Mở hộp chat ở vị trí 1/3 màn hình từ trên xuống */
            right: 20px;
            border-radius: 20px;
            z-index: 2147483646 !important;
            transform-origin: top right;
            transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
            /* Widget Hidden State */
            opacity: 0;
            pointer-events: none;
            transform: scale(0.5) translateY(-50px);
        }

        .phone-mockup.active {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1) translateY(0);
        }

        @media (max-width: 480px) {
            .phone-mockup {
                width: 100%;
                height: 100vh;
                max-height: 100vh;
                top: 0;
                right: 0;
                bottom: 0;
                border-radius: 0;
            }
        }

        /* Custom Theme Override: Đẩy nút mũi tên cuộn lên cao để nhường chỗ */
        .back-to-top-wrap {
            position: fixed !important;
            bottom: 140px !important;
            right: 20px !important;
            left: auto !important;
            margin: 0 !important;
            z-index: 2147483645 !important;
            width: auto !important;
            height: auto !important;
        }
        #ast-scroll-top, #scroll-top, .btn-back-to-top {
            position: fixed !important;
            bottom: 140px !important;
            right: 20px !important;
            left: auto !important;
            margin: 0 !important;
            z-index: 2147483645 !important;
        }

        /* Floating Action Button (FAB) Vàng Gold Sang Trọng chuẩn CRO */
        .chatbot-fab {
            position: fixed;
            bottom: 85px; /* Nằm ngay trên thanh CTA trắng */
            right: 15px;
            background-color: #E2B714; /* Vàng Gold */
            color: #0A192F; /* Chữ Navy đậm */
            border: none;
            border-radius: 30px; /* Hình nhộng bo tròn toàn bộ */
            padding: 8px 20px 8px 8px; /* Tinh chỉnh padding cho avatar */
            font-size: 1rem;
            font-weight: 800; /* Nét chữ đậm */
            font-family: var(--font-family);
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(226, 183, 20, 0.4);
            z-index: 2147483647 !important;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
            animation: pulse-gold 2s infinite;
        }
        
        /* Vá lỗi khoảng trắng dưới Footer do thanh Mobile CTA đẩy lên */
        @media (max-width: 768px) {
            html:root, body {
                padding-bottom: 0 !important;
                margin-bottom: 0 !important;
            }
            .footer-bottom-wrap {
                padding-bottom: 85px !important;
            }
        }
        .chatbot-fab:hover {
            transform: scale(1.05); /* Hover phóng to nhẹ */
            background-color: #cda310; /* Vàng sậm hơn khi hover */
        }

        @keyframes pulse-gold {
            0% { box-shadow: 0 0 0 0 rgba(226, 183, 20, 0.5); }
            70% { box-shadow: 0 0 0 10px rgba(226, 183, 20, 0); }
            100% { box-shadow: 0 0 0 0 rgba(226, 183, 20, 0); }
        }

        .fab-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #0A192F; /* Viền Navy nổi bật trên nền vàng */
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }


        .chat-header {
            background: rgba(255, 255, 255, 0.95);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            box-shadow: 0 4px 20px rgba(0,0,0,0.04);
            z-index: 10;
        }

        .avatar-container {
            position: relative;
            margin-right: 15px;
        }

        .avatar {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--accent);
            padding: 2px;
        }

        .online-dot {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 14px;
            height: 14px;
            background-color: #10B981;
            border-radius: 50%;
            border: 2px solid #fff;
        }

        .header-info h2 {
            font-size: 1.15rem;
            color: var(--primary);
            font-weight: 700;
            letter-spacing: -0.5px;
        }

        .header-info p {
            font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 2px;
            font-weight: 400;
        }

        .chat-window {
            flex: 1;
            padding: 24px 16px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
            scrollbar-width: none;
            scroll-behavior: smooth;
        }
        .chat-window::-webkit-scrollbar {
            display: none;
        }

        .message-row {
            display: flex;
            margin-bottom: 6px;
            opacity: 0;
            transform: translateY(15px);
            animation: fadeIn 0.4s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
        }

        @keyframes fadeIn {
            to { opacity: 1; transform: translateY(0); }
        }

        .message-row.bot { justify-content: flex-start; }
        .message-row.user { justify-content: flex-end; }

        .bot-avatar-small {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 12px;
            align-self: flex-end;
            margin-bottom: 2px;
            border: 1px solid rgba(0,0,0,0.1);
        }

        .message-bubble {
            max-width: 85%;
            padding: 14px 18px;
            font-size: 0.95rem;
            line-height: 1.5;
            box-shadow: 0 4px 6px rgba(0,0,0,0.02);
            word-wrap: break-word;
        }

        .bot .message-bubble {
            background-color: var(--bot-msg-bg);
            color: var(--text-dark);
            border-radius: 20px 20px 20px 4px;
            border: 1px solid rgba(0,0,0,0.06);
            font-weight: 400;
        }

        .user .message-bubble {
            background-color: var(--user-msg-bg);
            color: var(--user-msg-text);
            border-radius: 20px 20px 4px 20px;
            font-weight: 600;
        }

        .typing-indicator {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 15px 18px;
        }

        .dot {
            width: 6px;
            height: 6px;
            background-color: var(--primary);
            border-radius: 50%;
            animation: bounce 1.4s infinite ease-in-out both;
            opacity: 0.6;
        }

        .dot:nth-child(1) { animation-delay: -0.32s; }
        .dot:nth-child(2) { animation-delay: -0.16s; }

        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }

        .input-area {
            background: rgba(255, 255, 255, 0.98);
            border-top: 1px solid rgba(0,0,0,0.05);
            padding: 16px;
            padding-bottom: env(safe-area-inset-bottom, 16px);
            z-index: 10;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
        }

        .quick-replies {
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: all 0.3s ease;
        }

        .quick-reply-btn {
            background: #fff;
            color: var(--primary);
            border: 1px solid rgba(10, 25, 47, 0.15);
            padding: 14px 20px;
            border-radius: 14px;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            text-align: left;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            display: flex;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        }

        .quick-reply-btn:hover, .quick-reply-btn:active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(10, 25, 47, 0.15);
        }

        .prefix-group {
            display: flex;
            gap: 10px;
            margin-bottom: 5px;
        }
        .prefix-btn {
            flex: 1;
            padding: 12px;
            border: 1px solid var(--primary);
            border-radius: 12px;
            background: #fff;
            color: var(--primary);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .prefix-btn.active {
            background: var(--primary);
            color: #fff;
        }

        .text-input-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            transition: all 0.3s ease;
        }

        .text-input {
            width: 100%;
            padding: 14px 20px;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            font-size: 1rem;
            outline: none;
            transition: all 0.2s;
            background: #f8fafc;
        }

        .text-input:focus {
            border-color: var(--primary);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.05);
        }

        .send-btn-full {
            background: var(--primary);
            color: #fff;
            width: 100%;
            padding: 14px;
            border-radius: 16px;
            border: none;
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 10px rgba(10, 25, 47, 0.2);
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
        }

        .send-btn-full:active {
            transform: scale(0.98);
        }

        .zalo-cta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: #0068FF; 
            color: white;
            padding: 16px;
            border-radius: 12px;
            text-decoration: none;
            font-weight: 700;
            margin-top: 10px;
            transition: all 0.2s;
            box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
            font-size: 1.05rem;
            width: 100%;
        }
        
        .zalo-cta:active {
            transform: scale(0.98);
            box-shadow: 0 2px 8px rgba(0, 104, 255, 0.2);
        }

        .hidden { display: none !important; }

/* ========================================================
   WEB OVERLORD FIXES v2 — CHẨN ĐOÁN VÀ SỬA ĐÚNG GỐC
   Updated: 2026-06-08 (Session Re-apply)
   ======================================================== */

/* ----------------------------------------------------------------
   FIX 1: BANNER TRẮNG — Parallax JS bị WP Rocket delay
   Root cause: banner-inner dùng data-parallax-bg-image (JS set bg).
   Khi JS delay, không có background → trắng trơn.
   Fix: Dùng ::before pseudo-element + CSS background image LÀM FALLBACK
   Đồng thời đảm bảo min-height luôn hiển thị dù JS chưa chạy
   ---------------------------------------------------------------- */
.top-banner-wrap .banner-inner {
    /* Fallback background nếu parallax JS chưa chạy */
    background-image: url('https://quynhon.asia/wp-content/uploads/2025/03/Anh-man-hinh-2025-03-18-luc-10.33.42.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    /* Đảm bảo min-height luôn có */
    min-height: 300px !important;
}

/* Override parallax inline style nếu JS set wrong URL */
.top-banner-wrap .banner-inner[style*="background"] {
    background-size: cover !important;
    background-position: center center !important;
}

/* ----------------------------------------------------------------
   FIX 2: PROPERTY CARDS TRÙNG LABELS/GIÁ
   Root cause: Houzez render labels-wrap + item-price-wrap cả trong
   item-header (thumbnail) VÀ item-body (text). item-body bị duplicate.
   Fix: Ẩn phần duplicate trong item-body
   ---------------------------------------------------------------- */
.item-body .labels-wrap,
.item-body .item-price-wrap.hide-on-list {
    display: none !important;
}
/* Nhưng GIỮ item-body hiển thị tiêu đề + địa chỉ bình thường */
.item-body .item-title,
.item-body .item-address,
.item-body .item-amenities {
    display: block !important;
}

/* ----------------------------------------------------------------
   FIX 3: SIMONA HEIGHTS — TITLE BỊ LẶP
   Ẩn page-title-wrap mặc định của Houzez theme trên trang ID 9463 (WEB OVERLORD: Đã bỏ để hiển thị Tiêu đề - Breadcrumb)
   ---------------------------------------------------------------- */
/*
.postid-9463 .page-title-wrap,
.page-id-9463 .page-title-wrap {
    display: none !important;
}
*/

/* ----------------------------------------------------------------
   FIX 4: BANNER MOBILE RESPONSIVE
   Chỉ áp dụng cho mobile, KHÔNG override desktop
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
    .top-banner-wrap {
        height: auto !important;
        min-height: 250px !important;
    }
    .top-banner-wrap .banner-inner {
        height: auto !important;
        min-height: 250px !important;
        padding: 50px 20px !important;
    }
    .top-banner-wrap .banner-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    .top-banner-wrap .banner-subtitle {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }
}

/* ----------------------------------------------------------------
   FIX 5: CHAT AI BUTTON MOBILE — Không đè lên video player
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .chatbot-fab {
        padding: 8px !important;
        border-radius: 50% !important;
        bottom: 85px !important;
        right: 12px !important;
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        justify-content: center !important;
        overflow: hidden !important;
    }
    .chatbot-fab span:not(:first-child) {
        display: none !important;
    }
    /* Ẩn text "Chat với AI", chỉ giữ avatar icon */
    .chatbot-fab .chatbot-label {
        display: none !important;
    }
}

    