/* ==========================================================================
   AI Property Consultant Chatbot Styling
   Matching Project Theme (--primary-orange: #fa990e) & Picture 4 Reference
   ========================================================================== */

/* ==========================================================================
   Top Navigation Header - WhatsApp & AI Advisor Alignment
   ========================================================================== */
.header-top {
    position: relative;
    background-color: var(--dark-main, #141b22);
}

.header-top .top-inner {
    position: relative;
}

/* Base flex container for the info items */
.header-top .info {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* Reset all li inside header-top info */
.header-top .info li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

.header-top .info li:before,
.header-top .info li:after {
    display: none !important;
    content: none !important;
}

/* 1. WhatsApp Item */
.header-top .info li.header-whatsapp-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.header-top .info li.header-whatsapp-item i,
.header-top .info li.header-whatsapp-item .fa-whatsapp {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    color: var(--primary-orange, #fa990e) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.header-top .info li.header-whatsapp-item a {
    color: var(--color-rgba-255-255-255-0-6, rgba(255, 255, 255, 0.75)) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: color 0.25s ease !important;
}

.header-top .info li.header-whatsapp-item a:hover {
    color: var(--primary-orange, #fa990e) !important;
}

/* 2. Vertical Divider */
.header-top .info li.header-divider-item {
    display: inline-block !important;
    width: 1px !important;
    height: 14px !important;
    background-color: var(--color-rgba-255-255-255-0-2, rgba(255, 255, 255, 0.22)) !important;
    margin: 0 14px !important;
    padding: 0 !important;
    float: none !important;
    flex-shrink: 0 !important;
    border: none !important;
}

/* 3. AI Advisor Item */
.header-top .info li.ai-header-advisor-item {
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.header-ai-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: rgba(250, 153, 14, 0.12) !important;
    border: 1px solid rgba(250, 153, 14, 0.45) !important;
    padding: 3px 11px !important;
    border-radius: 20px !important;
    color: var(--primary-orange, #fa990e) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    cursor: pointer !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.header-ai-btn:hover {
    background: var(--primary-orange, #fa990e) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 153, 14, 0.35);
}

.header-ai-btn .ai-icon-bubble {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    line-height: 1 !important;
    position: static !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Reset position of <i> in header-top to prevent style.css absolute positioning overlap */
.header-top .info li i,
.header-top .info li.ai-header-advisor-item i,
.header-ai-btn i,
.header-ai-btn .ai-icon-bubble i {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: inherit !important;
}

.header-ai-btn .ai-header-btn-text {
    display: inline-block !important;
    line-height: 1 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    white-space: nowrap !important;
}

.header-ai-btn .ai-header-pulse {
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    display: inline-block !important;
    position: static !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: ai-pulse 2s infinite !important;
}

/* ==========================================================================
   Floating Speed-Dial Button (Image 3 Style: Expandable Stack)
   ========================================================================== */
.floating-speed-dial.whatsapp-btn {
    padding: 0;
    overflow: visible;
}

.floating-dial-main-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    outline: none;
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-dial-main-btn .dial-icon-msg {
    position: absolute;
    opacity: 1;
    transform: scale(1);
    transition: all 0.25s ease;
}

.floating-dial-main-btn .dial-icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
    transition: all 0.25s ease;
    font-size: 20px;
}

/* Expanded state on main button */
.floating-speed-dial.expanded .floating-dial-main-btn .dial-icon-msg {
    opacity: 0;
    transform: scale(0);
}

.floating-speed-dial.expanded .floating-dial-main-btn .dial-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.floating-speed-dial.expanded {
    background-color: var(--primary-orange-hover, #db8712);
}

/* Speed-dial options list (Image 3 vertical stack) */
.floating-dial-menu {
    position: absolute;
    bottom: 68px;
    left: 3px;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.floating-speed-dial.expanded .floating-dial-menu {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.floating-dial-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-speed-dial.expanded .floating-dial-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-speed-dial.expanded .floating-dial-item:nth-child(1) {
    transition-delay: 0.05s;
}

.floating-speed-dial.expanded .floating-dial-item:nth-child(2) {
    transition-delay: 0.1s;
}

.floating-dial-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.floating-dial-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ai-circle-btn {
    color: var(--primary-orange, #fa990e);
}

.ai-circle-btn:hover {
    background: var(--primary-orange, #fa990e);
    color: #ffffff;
}

.wa-circle-btn {
    color: #25d366;
}

.wa-circle-btn:hover {
    background: #25d366;
    color: #ffffff;
}

.floating-dial-label {
    background: #ffffff;
    color: #222222;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    user-select: none;
}

.floating-dial-label:hover {
    color: var(--primary-orange, #fa990e);
    transform: translateX(2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@keyframes ai-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Floating AI Chatbot Main Widget (Picture 4 Style) */
.ai-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 385px;
    max-width: calc(100vw - 30px);
    height: 600px;
    max-height: calc(100vh - 50px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform-origin: bottom right;
}

.ai-chat-widget.ai-chat-hidden {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
    pointer-events: none;
}

.ai-chat-widget.ai-chat-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Chat Header */
.ai-chat-header {
    background: linear-gradient(135deg, var(--primary-orange, #fa990e) 0%, #e08304 100%);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.ai-chat-avatar .ai-avatar-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ai-chat-avatar .ai-avatar-fallback {
    display: none;
    color: var(--primary-orange, #fa990e);
    font-size: 20px;
}

.ai-chat-avatar .ai-online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.ai-chat-header-text {
    line-height: 1.25;
}

.ai-chat-header-text .ai-chat-title {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ai-chat-header-text .ai-chat-subtitle {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.ai-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-chat-action-btn {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ai-chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.08);
}

/* Chat Body */
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 20px 16px;
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.ai-chat-body::-webkit-scrollbar {
    width: 5px;
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.ai-chat-timestamp {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 2px;
}

/* Dynamic Message List Container - Guarantees vertical gap between all chat messages */
.ai-messages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* Message Rows */
.ai-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 0;
}

.ai-msg-bot {
    justify-content: flex-start;
}

.ai-msg-user {
    justify-content: flex-end;
}

.ai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ai-msg-avatar img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.ai-msg-avatar .ai-avatar-fallback {
    display: none;
    font-size: 14px;
    color: var(--primary-orange, #fa990e);
}

/* Message Bubbles */
.ai-msg-bubble {
    max-width: 82%;
    padding: 11px 15px;
    font-size: 13.5px;
    line-height: 1.55;
    word-break: break-word;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ai-msg-bot .ai-msg-bubble {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e9ecef;
    border-top-left-radius: 4px;
}

.ai-msg-bot .ai-msg-bubble p {
    margin: 0 0 6px 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.ai-msg-bot .ai-msg-bubble p:last-child {
    margin-bottom: 0;
}

.ai-msg-bot .ai-msg-bubble ul,
.ai-msg-bot .ai-msg-bubble ol {
    margin: 4px 0 6px 18px;
    padding: 0;
}

.ai-msg-bot .ai-msg-bubble li {
    margin-bottom: 3px;
}

.ai-msg-bot .ai-msg-bubble strong {
    color: #111827;
}

/* Markdown Headings (###, ##, #) */
.ai-msg-bot .ai-msg-bubble .ai-md-heading {
    margin: 10px 0 5px 0;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}
.ai-msg-bot .ai-msg-bubble .ai-md-heading:first-child {
    margin-top: 0;
}
.ai-msg-bot .ai-msg-bubble h4.ai-md-heading { font-size: 15px; }
.ai-msg-bot .ai-msg-bubble h5.ai-md-heading { font-size: 14px; }
.ai-msg-bot .ai-msg-bubble h6.ai-md-heading { font-size: 13.5px; }

/* Code Blocks & Inline Code */
.ai-msg-bot .ai-msg-bubble .ai-code-block {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    color: #1f2937;
}
.ai-msg-bot .ai-msg-bubble .ai-code-block code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-family: inherit;
}
.ai-msg-bot .ai-msg-bubble .ai-inline-code {
    background: #f3f4f6;
    color: #d97706;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    border: 1px solid #e5e7eb;
}

/* Horizontal Rule */
.ai-msg-bot .ai-msg-bubble .ai-md-hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 8px 0;
}

/* Blockquotes */
.ai-msg-bot .ai-msg-bubble .ai-md-quote {
    margin: 6px 0;
    padding: 4px 10px;
    border-left: 3px solid var(--primary-orange, #fa990e);
    background: #fafaf9;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #4b5563;
}
.ai-msg-bot .ai-msg-bubble .ai-md-quote p {
    margin: 0;
}

/* In-bubble Typing Indicator (Dots Bouncing inside chat bubble) */
.ai-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}
.ai-typing-dots .typing-dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.ai-typing-dots .typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}
.ai-typing-dots .typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.ai-msg-user .ai-msg-bubble {
    background: var(--primary-orange, #fa990e);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.ai-msg-user .ai-msg-bubble p {
    margin: 0;
    color: #ffffff;
}

/* User Message Edit & Retry Button (Standard Gemini/ChatGPT Style) */
.ai-msg-edit-btn {
    opacity: 0;
    visibility: hidden;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
    padding: 0;
    margin: 0;
}

.ai-msg-row.ai-msg-user:hover .ai-msg-edit-btn,
.ai-msg-row.ai-msg-user:last-child .ai-msg-edit-btn {
    opacity: 0.85;
    visibility: visible;
}

.ai-msg-edit-btn:hover {
    opacity: 1 !important;
    color: var(--primary-orange, #fa990e);
    background: rgba(250, 153, 14, 0.12);
    transform: scale(1.12);
}

/* Assistant Message Action Footer (Stopped / Retry Bar) */
.ai-msg-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 4px;
}

.ai-stopped-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.ai-action-retry-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.ai-action-retry-btn:hover {
    background: #ffffff;
    color: var(--primary-orange, #fa990e);
    border-color: var(--primary-orange, #fa990e);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.ai-action-retry-btn i {
    font-size: 11px;
}

/* Quick Suggestion Pills (Picture 4) */
.ai-quick-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 6px 0 10px 40px;
}

.ai-quick-pill {
    background: #ffffff;
    border: 1.5px solid var(--primary-orange, #fa990e);
    color: var(--primary-orange, #fa990e);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.ai-quick-pill:hover {
    background: var(--primary-orange, #fa990e);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(250, 153, 14, 0.25);
}

/* Embedded Property Cards Container */
.ai-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 2px;
}

/* Embedded Property Card Inside Chat */
.ai-property-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    margin: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

.ai-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ai-property-img-box {
    position: relative;
    width: 100%;
    height: 135px;
    background: #f3f4f6;
    overflow: hidden;
}

.ai-property-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.ai-property-card:hover .ai-property-img-box img {
    transform: scale(1.04);
}

.ai-property-price-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.ai-property-price-badge span {
    color: #34d399;
}

.ai-property-content {
    padding: 12px;
}

.ai-property-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-property-location {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-property-location i {
    color: var(--primary-orange, #fa990e);
}

.ai-property-specs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: #4b5563;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.ai-property-specs span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-property-specs i {
    color: #9ca3af;
}

.ai-property-actions {
    display: flex;
    gap: 6px;
}

.ai-property-btn-detail {
    flex: 1;
    background: #f3f4f6;
    color: #1f2937;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.ai-property-btn-detail:hover {
    background: #e5e7eb;
    color: #111827;
}

.ai-property-btn-wa {
    flex: 1;
    background: #25d366;
    color: #ffffff;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s ease;
}

.ai-property-btn-wa:hover {
    background: #1eb956;
    color: #ffffff;
}

/* Typing Indicator (Dots Bouncing) */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px !important;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

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

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

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

/* Chat Footer / Input Form */
.ai-chat-footer {
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid #f0f1f3;
}

.ai-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f9fb;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-input-wrapper:focus-within {
    border-color: var(--primary-orange, #fa990e);
    box-shadow: 0 0 0 3px rgba(250, 153, 14, 0.15);
    background: #ffffff;
}

.ai-chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: #1f2937;
    padding: 6px 0;
}

.ai-chat-input::placeholder {
    color: #9ca3af;
}

.ai-chat-send-btn {
    width: 36px;
    height: 36px;
    background: var(--primary-orange, #fa990e);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.ai-chat-send-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    transform: translate(-1px, 1px); /* Optical center balance for angled paper plane */
}

.ai-chat-send-btn:hover {
    background: var(--primary-orange-hover, #db8712);
    transform: scale(1.06);
}

.ai-chat-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* Stop Generating Button State (Gemini Style) */
.ai-chat-send-btn.ai-btn-stop {
    background: #ef4444 !important;
    cursor: pointer !important;
    transform: none !important;
}

.ai-chat-send-btn.ai-btn-stop:hover {
    background: #dc2626 !important;
    transform: scale(1.06) !important;
}

.ai-chat-send-btn.ai-btn-stop i {
    font-size: 11.5px !important;
    transform: none !important;
}

.ai-chat-brand {
    text-align: center;
    margin-top: 6px;
    font-size: 10.5px;
    color: #9ca3af;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 991px) {
    .header-top {
        padding: 9px 12px !important;
    }

    .header-top .top-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        width: 100% !important;
    }

    .header-top .left-column,
    .header-top .right-column {
        float: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-top .info {
        display: inline-flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: auto !important;
        line-height: 1 !important;
    }

    .header-top .info li.header-whatsapp-item a {
        font-size: 13.5px !important;
    }

    .header-top .info li.header-divider-item {
        margin: 0 10px !important;
        height: 14px !important;
    }

    .header-ai-btn {
        padding: 3px 10px !important;
        font-size: 12.5px !important;
        gap: 5px !important;
    }

    .header-ai-btn .ai-header-btn-text {
        font-size: 12.5px !important;
    }

    .header-top .social-links {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 14px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        float: none !important;
        list-style: none !important;
    }

    .header-top .social-links li,
    .header-top .social-links li.social-link,
    .header-top .social-links li:first-child,
    .header-top .social-links li:last-child {
        float: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-top .social-links li a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 15px !important;
        line-height: 1 !important;
        text-align: center !important;
        color: var(--primary-orange) !important;
        text-decoration: none !important;
        transition: color 0.2s ease, transform 0.2s ease !important;
    }

    .header-top .social-links li a i {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        font-size: inherit !important;
    }
}

@media (max-width: 576px) {
    .ai-chat-widget {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .ai-chat-header {
        border-radius: 0;
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .ai-chat-fab {
        left: 20px;
        bottom: 110px;
    }

    /* On mobile screens: both WhatsApp and AI Advisor stay centered on ONE line without hiding text */
    .header-top {
        padding: 8px 8px !important;
    }

    .header-top .info {
        gap: 0 !important;
    }

    .header-top .info li.header-whatsapp-item {
        gap: 5px !important;
    }

    .header-top .info li.header-whatsapp-item a {
        font-size: 12.5px !important;
    }

    .header-top .info li.header-whatsapp-item i {
        font-size: 13.5px !important;
    }

    .header-top .info li.header-divider-item {
        margin: 0 8px !important;
        height: 12px !important;
    }

    .header-ai-btn {
        padding: 2.5px 8px !important;
        font-size: 11.5px !important;
        gap: 4px !important;
    }

    .header-ai-btn .ai-header-btn-text {
        font-size: 11.5px !important;
    }

    .header-ai-btn .ai-icon-bubble i {
        font-size: 11.5px !important;
    }

    .header-ai-btn .ai-header-pulse {
        width: 6px !important;
        height: 6px !important;
        min-width: 6px !important;
    }
}
