/* AI Chat, Voice Assistant & Valuation Styles */
/* ================================================
   LISTICO AI - CHATBOT UI
   Voice & text property search with WebSocket
   Uses landing.css design tokens (--primary-blue, etc.)
   ================================================ */

/* Hide floating voice assistant on AI Valuation page (has its own chat) */
body:has(.vs-page) .voice-assistant {
    display: none;
}

/* Prevent double scrollbar on AI Valuation page */
html:has(.vs-page),
html:has(.vs-page) body,
html:has(.vs-page) .landing-wrapper {
    overflow: hidden;
    height: 100dvh;
    min-height: unset;
}

/* Page Layout - fullscreen chat like ChatGPT/Claude */
.vs-page {
    height: 100dvh;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    background: #F8F9FB;
    overflow: hidden;
    z-index: 1;
    animation: vs-pageReveal 0.8s ease-out both;
}

.vs-layout-row {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 0;
}

/* Chat wrapper — outer container for chat area + input bar */
.vs-chat-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

/* Sidebar — Claude-style collapsible */
.vs-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    border-right: 1px solid rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.5rem;
    gap: 0.125rem;
    transition: width 0.2s ease;
    overflow: hidden;
}

.vs-sidebar.collapsed { width: 52px; }

.vs-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.12s, color 0.12s;
    align-self: stretch;
}

.vs-sidebar-toggle:hover { background: rgba(0,0,0,0.06); color: #111827; }

.vs-sidebar-toggle svg { flex-shrink: 0; }

.vs-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    color: #374151;
    font-family: inherit;
    transition: background 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
}

.vs-sidebar-item:hover { background: rgba(0,0,0,0.06); color: #111827; }

.vs-sidebar-item svg { flex-shrink: 0; opacity: 0.65; }
.vs-sidebar-item:hover svg { opacity: 1; }

.vs-sidebar.collapsed .vs-sidebar-item {
    padding: 0.5rem;
    justify-content: center;
    gap: 0;
}

.vs-sidebar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 1;
    max-width: 160px;
    transition: opacity 0.2s ease, max-width 0.2s ease;
}
.vs-sidebar.collapsed .vs-sidebar-label {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}
.vs-sidebar.collapsed .vs-sidebar-toggle { justify-content: center; }

.vs-sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(8,49,105,0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 0.625rem 0.2rem;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    overflow: hidden;
}
.vs-sidebar.collapsed .vs-sidebar-section-label { opacity: 0; pointer-events: none; }

.vs-sidebar-history-item {
    font-size: 0.8125rem;
    position: relative;
    cursor: pointer;
    user-select: none;
}
.vs-sidebar-history-item.active {
    background: rgba(8,49,105,0.08);
    color: #083169;
    font-weight: 500;
}
.vs-sidebar-history-item.active svg { opacity: 1; }

/* ... menu button */
.vs-sidebar-item-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    opacity: 0;
    transition: opacity 0.12s, background 0.12s;
    padding: 0;
}
.vs-sidebar-history-item:hover .vs-sidebar-item-menu-btn { opacity: 1; }
.vs-sidebar-item-menu-btn:hover { background: rgba(0,0,0,0.08); color: #111827; }
.vs-sidebar.collapsed .vs-sidebar-item-menu-btn { display: none; }

/* Dropdown */
.vs-sidebar-item-dropdown {
    position: fixed;
    width: 170px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.vs-sidebar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #374151;
    font-family: inherit;
    text-align: left;
    width: 100%;
    transition: background 0.1s;
}
.vs-sidebar-dropdown-item:hover { background: rgba(0,0,0,0.06); }
.vs-dropdown-danger { color: #dc2626; }
.vs-dropdown-danger:hover { background: rgba(220,38,38,0.07); }

/* Backdrop to close dropdown */
.vs-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

/* Mobile history button (hidden on desktop) */
.vs-mobile-history-btn {
    display: none;
}

/* Mobile sidebar backdrop */
.vs-mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 498;
}

/* Inline rename input */
.vs-rename-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-bottom: 1.5px solid #083169;
    outline: none;
    background: transparent;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #111827;
    padding: 0 2px;
}

@media (max-width: 768px) {
    .vs-sidebar { display: none; }
}

@keyframes vs-pageReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Decorative Background */
.vs-bg-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    contain: layout paint;
}

.vs-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: opacity;
}

.vs-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(8, 49, 105, 0.12) 0%, transparent 60%);
    top: -180px;
    right: -150px;
    opacity: 0;
    animation: vs-orbReveal 2s ease-out 0.3s both;
}

.vs-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.1) 0%, transparent 60%);
    bottom: 20px;
    left: -120px;
    opacity: 0;
    animation: vs-orbReveal 2s ease-out 0.6s both;
}

.vs-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 49, 105, 0.07) 0%, transparent 60%);
    top: 30%;
    left: 50%;
    opacity: 0;
    animation: vs-orbReveal 2s ease-out 0.9s both;
}

@keyframes vs-orbReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vs-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(8, 49, 105, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 49, 105, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 0%, transparent 100%);
    opacity: 1;
}

/* Chat Area */
.vs-chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.vs-chat-area::-webkit-scrollbar {
    width: 4px;
}
.vs-chat-area::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.vs-chat-area::-webkit-scrollbar-track {
    background: transparent;
}

/* Disable all entrance animations on re-render */
.vs-welcome.no-anim,
.vs-welcome.no-anim * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

/* ── Tour Booking Modal ───────────────────── */
.vs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.vs-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: vs-modalIn 0.25s ease;
}
@keyframes vs-modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.vs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0;
}
.vs-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #083169;
}
.vs-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.vs-modal-close:hover { color: #333; }
.vs-modal-prop-title {
    padding: 0.25rem 1.5rem 0;
    margin: 0;
    font-size: 0.82rem;
    color: #666;
    font-weight: 500;
}
.vs-modal-body {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.vs-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.vs-form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
}
.vs-form-group input,
.vs-form-group textarea {
    border: 1.5px solid #dde2ea;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}
.vs-form-group input:focus,
.vs-form-group textarea:focus {
    border-color: #3b82f6;
}
.vs-form-group textarea { resize: vertical; }
.vs-form-row {
    display: flex;
    gap: 0.75rem;
}
.vs-form-row .vs-form-group { flex: 1; }
.vs-field-error {
    font-size: 0.72rem;
    color: #dc2626;
    font-weight: 500;
}
.vs-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1.5rem 1.25rem;
}
.vs-modal-cancel {
    background: none;
    border: 1.5px solid #dde2ea;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    color: #555;
    font-weight: 600;
    transition: border-color 0.15s;
}
.vs-modal-cancel:hover { border-color: #999; }
.vs-modal-submit {
    background: #083169;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
}
.vs-modal-submit:hover { background: #0a3d82; }
.vs-modal-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.vs-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vs-spin 0.6s linear infinite;
}
@keyframes vs-spin { to { transform: rotate(360deg); } }

[data-theme="dark"] .vs-modal { background: #1e293b; }
[data-theme="dark"] .vs-modal-header h3 { color: #e2e8f0; }
[data-theme="dark"] .vs-modal-prop-title { color: #94a3b8; }
[data-theme="dark"] .vs-form-group label { color: #94a3b8; }
[data-theme="dark"] .vs-form-group input,
[data-theme="dark"] .vs-form-group textarea { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .vs-modal-cancel { border-color: #334155; color: #94a3b8; }

/* Welcome */
.vs-welcome {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    overflow: hidden;
}

/* Welcome Icon - dramatic entrance */
.vs-welcome-icon {
    width: 150px;
    height: 96px;
    border-radius: 26px;
    overflow: visible;
    margin-bottom: 1.75rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: vs-iconEntrance 0.7s ease-out 0.2s both;
}

.vs-welcome-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 26px;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(8, 49, 105, 0.25), 0 0 0 1px rgba(8, 49, 105, 0.06);
}

/* Shimmer sweep over icon */
.vs-welcome-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    z-index: 2;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 60%
    );
    background-size: 250% 100%;
    opacity: 0;
    animation: vs-shimmer 0.8s ease-out 1s both;
}

@keyframes vs-shimmer {
    0% { opacity: 1; background-position: 150% 0; }
    100% { opacity: 0; background-position: -50% 0; }
}

/* Glow ring with breathing */
.vs-icon-glow {
    position: absolute;
    inset: -12px;
    border-radius: 34px;
    z-index: 0;
    opacity: 0;
    background: conic-gradient(
        from 0deg,
        rgba(8, 49, 105, 0.12),
        rgba(212, 168, 83, 0.12),
        rgba(8, 49, 105, 0.06),
        rgba(212, 168, 83, 0.12),
        rgba(8, 49, 105, 0.12)
    );
    animation:
        vs-glowReveal 0.8s ease-out 0.6s both,
        vs-glowSpin 8s linear 1.4s infinite;
}

@keyframes vs-glowReveal {
    from { opacity: 0; }
    to { opacity: 0.7; }
}

@keyframes vs-glowSpin {
    to { transform: rotate(360deg); }
}

@keyframes vs-iconEntrance {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Title - smooth entrance */
.vs-welcome-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0A1929;
    margin: 0;
    letter-spacing: -0.03em;
    opacity: 0;
    animation: vs-textReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* Subtitle - smooth entrance */
.vs-welcome-subtitle {
    font-size: 1.0625rem;
    color: #6B7280;
    margin: 0.25rem 0 0;
    max-width: 440px;
    line-height: 1.6;
    opacity: 0;
    animation: vs-textReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

@keyframes vs-textReveal {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Suggestion Chips */
.vs-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2.25rem;
    width: 100%;
    max-width: 560px;
}

.vs-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(8, 49, 105, 0.07);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    text-align: left;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    opacity: 0;
}

/* Staggered entrance - each chip 120ms apart, starting at 1.1s */
.vs-chip-1 { animation: vs-chipIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both; }
.vs-chip-2 { animation: vs-chipIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.22s both; }
.vs-chip-3 { animation: vs-chipIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.34s both; }
.vs-chip-4 { animation: vs-chipIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.46s both; }

@keyframes vs-chipIn {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.vs-chip-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(8, 49, 105, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-chip-icon svg {
    opacity: 0.5;
    transition: all 0.35s;
}

.vs-chip-text {
    flex: 1;
    line-height: 1.35;
}

.vs-chip:hover {
    border-color: #083169;
    background: #083169;
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(8, 49, 105, 0.25);
    transform: translateY(-4px) scale(1.02);
}

.vs-chip:hover .vs-chip-icon {
    background: rgba(255, 255, 255, 0.18);
}

.vs-chip:hover .vs-chip-icon svg {
    opacity: 1;
    stroke: #FFFFFF;
}

.vs-chip:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

/* Messages */
.vs-msg {
    display: flex;
    animation: vsMsgIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vsMsgIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.vs-msg-user {
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.vs-msg-ai {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.vs-msg-time {
    font-size: 0.7rem;
    color: rgba(0,0,0,0.35);
    letter-spacing: 0.01em;
    padding: 0 0.25rem;
    white-space: nowrap;
}
.vs-msg-ai .vs-msg-time {
    margin-left: calc(34px + 0.625rem);
    width: 100%;
    padding: 0;
}

/* AI Avatar */
.vs-ai-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(8, 49, 105, 0.1);
}

.vs-ai-avatar img {
    width: 100%;
    height: 100%;
    display: block;
}

.vs-ai-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 80%;
    min-width: 0;
}

/* Bubbles */
.vs-bubble {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    word-break: break-word;
}

.vs-bubble-user {
    background: linear-gradient(135deg, #083169 0%, #0B4A9E 100%);
    color: #FFFFFF;
    border-radius: 20px 20px 4px 20px;
    max-width: 70%;
    box-shadow: 0 2px 12px rgba(8, 49, 105, 0.2);
}

.vs-bubble-ai {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #1A1A1A;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Typing Indicator */
.vs-typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 6px 4px;
}

.vs-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9A9A9A;
    animation: vsTyping 1.4s infinite ease-in-out;
}

.vs-typing span:nth-child(2) { animation-delay: 0.2s; }
.vs-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes vsTyping {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.35; }
    40% { transform: scale(1.15); opacity: 1; }
}

/* Agent Results Grid */
.vs-agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.vs-agent-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(8, 49, 105, 0.1);
    border-color: rgba(8, 49, 105, 0.15);
}

.vs-agent-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(8, 49, 105, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #083169;
    flex-shrink: 0;
    overflow: hidden;
}

.vs-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.vs-agent-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
}

.vs-agent-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-agent-loc {
    font-size: 0.75rem;
    color: #083169;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-agent-bio {
    font-size: 0.72rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vs-agent-lang {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

.vs-agent-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    user-select: none;
}

.vs-more-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #083169;
    opacity: 0.7;
    font-style: italic;
}

.vs-load-more-btn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(8, 49, 105, 0.05);
    border: 1px dashed rgba(8, 49, 105, 0.25);
    border-radius: 8px;
    font-size: 0.78rem;
    color: #083169;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.vs-load-more-btn:hover:not(:disabled) {
    background: rgba(8, 49, 105, 0.1);
}

.vs-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vs-prop-card-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(8,49,105,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.vs-prop-card-wrap:hover {
    box-shadow: 0 8px 28px rgba(8,49,105,0.12);
    transform: translateY(-3px);
}

.vs-save-btn {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    z-index: 1;
    padding: 0;
}

.vs-save-btn:hover, .vs-save-btn.saved {
    color: #e53935;
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

.vs-tour-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    background: rgba(8,49,105,0.04);
    border: none;
    border-radius: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    color: #083169;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.15s;
    flex-shrink: 0;
}
.vs-tour-btn:hover { background: rgba(8,49,105,0.1); }

.vs-new-chat-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
    align-self: center;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.vs-new-chat-btn svg {
    flex-shrink: 0;
    opacity: 0.65;
}

.vs-new-chat-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
}

.vs-new-chat-btn:hover svg {
    opacity: 1;
}

@media (max-width: 480px) {
    .vs-new-chat-btn {
        padding: 0.4rem 0.5rem;
        gap: 0;
    }
    .vs-new-chat-btn .vs-ncb-text {
        display: none;
    }
}

/* Filter Bar */
.vs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    align-items: center;
}
.vs-filter-label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    margin-right: 0.2rem;
}
.vs-filter-chip {
    background: rgba(8, 49, 105, 0.05);
    border: 1px solid rgba(8, 49, 105, 0.15);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    color: #083169;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.vs-filter-chip:hover {
    background: rgba(8, 49, 105, 0.12);
    border-color: rgba(8, 49, 105, 0.3);
}

/* Comparison View */
.vs-comparison {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(8, 49, 105, 0.1);
    background: #fff;
    margin-top: 0.5rem;
}
.vs-cmp-header {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    background: rgba(8, 49, 105, 0.04);
    border-bottom: 1px solid rgba(8, 49, 105, 0.1);
}
.vs-cmp-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    border-bottom: 1px solid rgba(8, 49, 105, 0.06);
}
.vs-cmp-row:last-child { border-bottom: none; }
.vs-cmp-cell {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.vs-cmp-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    justify-content: center;
}
.vs-cmp-prop {
    font-weight: 600;
    color: #083169;
    align-items: center;
}
.vs-cmp-prop img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.vs-cmp-title {
    font-size: 0.78rem;
    color: #1f2937;
    text-align: center;
}
.vs-cmp-actions .vs-cmp-cell {
    padding: 0.75rem;
    align-items: center;
}
.vs-cmp-view-btn {
    background: #083169;
    color: #fff;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    text-decoration: none;
    transition: background 0.15s;
}
.vs-cmp-view-btn:hover { background: #0a3d80; }

/* Market Insights Card */
.vs-market-card {
    background: linear-gradient(135deg, rgba(8,49,105,0.04) 0%, rgba(0,102,204,0.06) 100%);
    border: 1px solid rgba(8,49,105,0.12);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 0.5rem;
    width: 100%;
}
.vs-market-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #083169;
    margin-bottom: 0.85rem;
}
.vs-market-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
.vs-market-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.vs-market-val {
    font-size: 1rem;
    font-weight: 700;
    color: #083169;
}
.vs-market-val.vs-up { color: #059669; }
.vs-market-val.vs-down { color: #dc2626; }
.vs-market-lbl {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
}

/* Property Results Grid */
.vs-property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

/* Property Card */
.vs-prop-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vs-prop-card:hover {
    background: rgba(255, 255, 255, 1);
}

.vs-prop-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #F3F3F3;
}

.vs-prop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vs-prop-card:hover .vs-prop-img img {
    transform: scale(1.03);
}

.vs-prop-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9A9A9A;
    opacity: 0.5;
}

.vs-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #D4A853;
    color: #FFFFFF;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.625rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.vs-prop-info {
    padding: 0.75rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.vs-prop-price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #083169;
}

.vs-prop-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #494949;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-prop-meta {
    display: flex;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: #727272;
    margin-top: 0.125rem;
}

.vs-prop-loc {
    font-size: 0.75rem;
    color: #9A9A9A;
}

/* Bottom Input Bar */
.vs-input-bar {
    background: rgba(248, 249, 251, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    animation: vs-barSlide 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;
    opacity: 0;
}

/* Gradient fade from chat area into input bar */
.vs-input-bar::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: linear-gradient(to top, #F8F9FB 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

@keyframes vs-barSlide {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Recording Indicator */
.vs-recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #ef4444;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 20px;
    animation: vsRecFadeIn 0.3s ease-out;
}

@keyframes vsRecFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.vs-rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: vsRecPulse 1s ease-in-out infinite;
}

@keyframes vsRecPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

.vs-rec-label {
    color: #dc2626;
    letter-spacing: 0.01em;
}

.vs-rec-timer {
    color: #b91c1c;
    font-variant-numeric: tabular-nums;
    min-width: 2.5em;
    font-weight: 600;
}

.vs-cancel-btn {
    margin-left: 0.25rem;
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid rgba(185, 28, 28, 0.25);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #b91c1c;
    padding: 0;
    transition: background 0.15s;
    flex-shrink: 0;
}
.vs-cancel-btn:hover { background: rgba(185, 28, 28, 0.16); }

/* Audio Waveform Bars */
.vs-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
}

.vs-waveform span {
    width: 3px;
    border-radius: 2px;
    background: #ef4444;
    animation: vsWaveBar 1.2s ease-in-out infinite;
}

.vs-waveform span:nth-child(1) { height: 6px; animation-delay: 0s; }
.vs-waveform span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.vs-waveform span:nth-child(3) { height: 18px; animation-delay: 0.3s; }
.vs-waveform span:nth-child(4) { height: 12px; animation-delay: 0.45s; }
.vs-waveform span:nth-child(5) { height: 6px; animation-delay: 0.6s; }

@keyframes vsWaveBar {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Input Bar Recording State */
.vs-input-bar.is-recording {
    border-top-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 -4px 24px rgba(239, 68, 68, 0.08);
}

.vs-input-bar.is-recording .vs-input-row {
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
}

/* Connection Status Dot */
.vs-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 0.25rem;
}

.vs-status-dot.disconnected {
    background: #f59e0b;
    animation: vsStatusPulse 1.5s ease-in-out infinite;
}

@keyframes vsStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.vs-input-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    max-width: 830px;
    background: #FFFFFF;
    border-radius: 28px;
    padding: 0.3rem 0.3rem 0.3rem 0.5rem;
    border: 1.5px solid rgba(8, 49, 105, 0.12);
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.vs-input-row:focus-within {
    border-color: #083169;
    box-shadow: 0 0 0 4px rgba(8, 49, 105, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Mic Button */
.vs-mic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #727272;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.vs-mic-btn:hover:not(:disabled) {
    color: #083169;
    background: rgba(8, 49, 105, 0.06);
}

.vs-mic-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.vs-mic-btn.recording {
    background: #ef4444;
    color: white;
    animation: vsMicPulse 1.5s ease-in-out infinite;
}

@keyframes vsMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.vs-mic-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #D7D7D7;
    border-top-color: #083169;
    border-radius: 50%;
    animation: vsSpin 0.7s linear infinite;
}

@keyframes vsSpin {
    to { transform: rotate(360deg); }
}

/* Text Input */
.vs-text-input {
    flex: 1;
    padding: 0.5rem 0.25rem;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    background: transparent;
    color: #212121;
    font-family: inherit;
}

.vs-text-input::placeholder {
    color: #9A9A9A;
}

.vs-text-input:focus {
    outline: none;
}

.vs-text-input:disabled {
    opacity: 0.5;
}

/* Send Button */
.vs-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #083169;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(8, 49, 105, 0.2);
}

.vs-send-btn:hover:not(:disabled) {
    background: #051D3F;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(8, 49, 105, 0.3);
}

.vs-send-btn:disabled {
    background: #C2C2C2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive */
/* ---- Mobile: switch to natural page scroll (overflow:hidden kills scroll on iOS) ---- */
@media (max-width: 768px) {
    html:has(.vs-page),
    html:has(.vs-page) body,
    html:has(.vs-page) .landing-wrapper {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100dvh;
    }

    .vs-page {
        height: auto;
        min-height: 100dvh;
        padding-bottom: 80px;
        overflow-y: visible;
    }

    .vs-layout-row {
        overflow: visible;
        height: auto;
    }

    .vs-chat-wrapper {
        overflow: visible;
        height: auto;
    }

    .vs-chat-area {
        overflow-y: visible;
        flex: none;
        height: auto;
        max-height: none;
    }

    /* Sidebar hidden on mobile — shows as drawer when .mobile-open */
    .vs-sidebar {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        width: 80vw;
        max-width: 280px;
        z-index: 499;
        border-right: 1px solid rgba(0,0,0,0.1);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
        overflow-x: hidden;
    }
    .vs-sidebar.mobile-open {
        display: flex;
    }
    .vs-sidebar-toggle {
        display: none;
    }
    .vs-sidebar.mobile-open .vs-sidebar-toggle {
        display: flex;
    }

    /* Mobile history button — fixed so always visible during scroll */
    .vs-mobile-history-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 68px;
        left: 0.75rem;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 10px;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(8,49,105,0.12);
        color: #083169;
        cursor: pointer;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: background 0.15s;
    }
    .vs-mobile-history-btn:hover { background: rgba(8,49,105,0.1); }

    .vs-chat-area {
        padding: 1.25rem 1rem;
        position: relative;
        padding-top: 1.25rem;
    }

    .vs-welcome-title {
        font-size: 1.75rem;
    }

    .vs-welcome-icon {
        width:100px;
        height: 76px;
    }

    .vs-welcome-icon img {
        border-radius: 20px;
    }

    .vs-icon-glow {
        border-radius: 26px;
    }

    .vs-bubble-user {
        max-width: 85%;
    }

    .vs-ai-content {
        max-width: 85%;
    }

    .vs-property-grid {
        grid-template-columns: 1fr;
    }

    .vs-market-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .vs-cmp-header,
    .vs-cmp-row {
        grid-template-columns: 80px 1fr 1fr;
    }

    .vs-suggestions {
        gap: 0.5rem;
        max-width: 480px;
    }

    .vs-chip {
        font-size: 0.8125rem;
        padding: 0.75rem 0.875rem;
        border-radius: 14px;
    }

    .vs-chip-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .vs-orb-1 { width: 300px; height: 300px; }
    .vs-orb-2 { width: 250px; height: 250px; }
    .vs-orb-3 { display: none; }

    .vs-chat-area {
        padding: 1.25rem 1rem 1rem;
    }

    .vs-recording-indicator {
        font-size: 0.75rem;
        gap: 0.5rem;
        padding: 0.3rem 0.625rem;
    }

    .vs-waveform span:nth-child(4),
    .vs-waveform span:nth-child(5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .vs-welcome-title {
        font-size: 1.5rem;
    }

    .vs-welcome-subtitle {
        font-size: 0.875rem;
    }

    .vs-suggestions {
        grid-template-columns: 1fr;
    }

    .vs-input-bar {
        padding: 0.625rem 0.75rem;
    }

    .vs-input-row {
        gap: 0.375rem;
        padding: 0.2rem 0.2rem 0.2rem 0.3rem;
    }

    .vs-mic-btn,
    .vs-send-btn {
        width: 36px;
        height: 36px;
    }

    .vs-text-input {
        font-size: 0.875rem;
    }

    .vs-ai-avatar {
        width: 28px;
        height: 28px;
    }

    .vs-recording-indicator {
        font-size: 0.6875rem;
        gap: 0.375rem;
        padding: 0.25rem 0.5rem;
    }

    .vs-waveform {
        gap: 2px;
        height: 14px;
    }

    .vs-waveform span { width: 2px; }
    .vs-waveform span:nth-child(3) { height: 14px; }
}


/* ================================================
   VOICE ASSISTANT STYLES
   Epic 5: AI Voice Assistant
   ================================================ */
.voice-assistant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

@media (max-width: 768px) {
    .voice-assistant {
        bottom: 5rem;
        right: 1rem;
        left: auto;
    }

    .mobile-agent-btn {
        bottom: 9rem;
        left: 1rem;
        right: auto;
    }
}

/* Floating Action Button */
.voice-assistant-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #083169;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(8, 49, 105, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voice-assistant-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(8, 49, 105, 0.45);
}

.voice-assistant-fab.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.voice-assistant-fab .recording-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: va-pulse-ring 1.5s infinite;
}

@keyframes va-pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.voice-assistant.open .voice-assistant-fab {
    width: 40px;
    height: 40px;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    background: rgba(8, 49, 105, 0.9);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

/* Assistant Panel */
.voice-assistant-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    height: 560px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: va-slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes va-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: #083169;
    color: white;
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.assistant-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.assistant-actions {
    display: flex;
    gap: 0.5rem;
}

.assistant-actions .icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.assistant-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Messages Container */
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: #F7F7F8;
}

/* Welcome State */
.assistant-welcome {
    text-align: center;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.assistant-welcome .welcome-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(8, 49, 105, 0.12);
}

.assistant-welcome .welcome-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.assistant-welcome h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.375rem;
    color: #212121;
}

.assistant-welcome p {
    font-size: 0.8125rem;
    color: #727272;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.suggestion-chips {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
}

.suggestion-chip {
    padding: 0.625rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    font-size: 0.8125rem;
    color: #494949;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
}

.suggestion-chip:hover {
    background: #083169;
    border-color: #083169;
    color: white;
}

/* Messages */
.voice-assistant-panel .message {
    display: flex;
    gap: 0.5rem;
    max-width: 90%;
    animation: vsMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.voice-assistant-panel .message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.voice-assistant-panel .message.assistant {
    align-self: flex-start;
}

.voice-assistant-panel .assistant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: 2px;
}

.voice-assistant-panel .assistant-avatar img {
    width: 100%;
    height: 100%;
    display: block;
}

.voice-assistant-panel .message-content {
    padding: 0.625rem 0.875rem;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.voice-assistant-panel .message.user .message-content {
    background: #083169;
    color: white;
    border-bottom-right-radius: 4px;
}

.voice-assistant-panel .message.assistant .message-content {
    background: #FFFFFF;
    color: #212121;
    border: 1px solid #E8E8E8;
    border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.voice-assistant-panel .typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.voice-assistant-panel .typing-indicator span {
    width: 7px;
    height: 7px;
    background: #9A9A9A;
    border-radius: 50%;
    animation: vsTyping 1.4s infinite ease-in-out;
}

/* Property Results */
.voice-assistant-panel .property-results {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.voice-assistant-panel .property-result-card {
    display: flex;
    gap: 0.625rem;
    padding: 0.5rem;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.voice-assistant-panel .property-result-card:hover {
    border-color: #083169;
    transform: translateX(3px);
}

.voice-assistant-panel .property-result-card img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.voice-assistant-panel .property-result-card .no-image {
    width: 52px;
    height: 52px;
    background: #F3F3F3;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9A9A9A;
    flex-shrink: 0;
}

.voice-assistant-panel .property-result-card .property-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.voice-assistant-panel .property-result-card .property-price {
    font-weight: 700;
    color: #083169;
    font-size: 0.8125rem;
}

.voice-assistant-panel .property-result-card .property-title {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-assistant-panel .property-result-card .property-details {
    font-size: 0.6875rem;
    color: #727272;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #D4A853;
    margin-bottom: 0.5rem;
}

.connection-status .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D4A853;
    animation: blink 1s infinite;
}

/* Input Area */
.assistant-input {
    padding: 0.875rem 1rem;
    border-top: 1px solid #E8E8E8;
    background: #FFFFFF;
}

.assistant-input .input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.assistant-input input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid #E0E0E0;
    border-radius: 22px;
    font-size: 0.875rem;
    background: #F7F7F8;
    color: #212121;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.assistant-input input:focus {
    outline: none;
    border-color: #083169;
    background: #FFFFFF;
}

.assistant-input input:disabled {
    opacity: 0.5;
}

.assistant-input .voice-btn,
.assistant-input .send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.assistant-input .voice-btn {
    background: transparent;
    color: #727272;
}

.assistant-input .voice-btn:hover:not(:disabled) {
    color: #083169;
    background: rgba(8, 49, 105, 0.06);
}

.assistant-input .voice-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.assistant-input .voice-btn.recording {
    background: #ef4444;
    color: white;
    animation: vsMicPulse 1.5s ease-in-out infinite;
}

.assistant-input .send-btn {
    background: #083169;
    color: white;
}

.assistant-input .send-btn:hover:not(:disabled) {
    background: #051D3F;
    transform: scale(1.05);
}

.assistant-input .send-btn:disabled {
    background: #C2C2C2;
    cursor: not-allowed;
    transform: none;
}

.assistant-input .recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
}

.assistant-input .recording-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Responsive */
@media (max-width: 480px) {
    .voice-assistant {
        bottom: 80px;
        right: 16px;
    }

    .voice-assistant-panel {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }

    .voice-assistant-fab {
        width: 48px;
        height: 48px;
    }
}


/* ============================================
   DARK MODE - AI VALUATION PAGE (vs-*)
   ============================================ */

[data-theme="dark"] .vs-page {
    background: #0f172a;
}

[data-theme="dark"] .vs-grid-pattern {
    background-image:
        linear-gradient(rgba(74, 122, 181, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 122, 181, 0.04) 1px, transparent 1px);
}

[data-theme="dark"] .vs-welcome-title {
    color: #e2e8f0;
}

[data-theme="dark"] .vs-welcome-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .vs-bubble-ai {
    background: rgba(30, 41, 59, 0.95);
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .vs-ai-content {
    color: #e2e8f0;
}

[data-theme="dark"] .vs-ai-content p,
[data-theme="dark"] .vs-ai-content li {
    color: #cbd5e1;
}

[data-theme="dark"] .vs-input-bar {
    background: rgba(15, 23, 42, 0.9);
    border-top-color: #1e293b;
}
[data-theme="dark"] .vs-input-bar::before {
    background: linear-gradient(to top, #0f172a 0%, transparent 100%);
}

[data-theme="dark"] .vs-input-row {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .vs-input-row:focus-within {
    border-color: #4a7ab5;
    box-shadow: 0 0 0 4px rgba(74,122,181,0.15), 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .vs-input-row textarea,
[data-theme="dark"] .vs-input-row input {
    color: #e2e8f0;
    background: transparent;
}

[data-theme="dark"] .vs-input-row textarea::placeholder,
[data-theme="dark"] .vs-input-row input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .vs-mic-btn {
    color: #94a3b8;
}

[data-theme="dark"] .vs-mic-btn:hover {
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .vs-quick-prompts-row button,
[data-theme="dark"] .vs-suggestion-chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .vs-quick-prompts-row button:hover,
[data-theme="dark"] .vs-suggestion-chip:hover {
    background: #334155;
    border-color: #4a7ab5;
    color: #e2e8f0;
}

/* Property result cards inside chat */
[data-theme="dark"] .vs-property-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .vs-property-card:hover {
    border-color: #475569;
}

/* Sidebar dark mode */
[data-theme="dark"] .vs-sidebar {
    background: rgba(15,23,42,0.85);
    border-right-color: #1e293b;
}
[data-theme="dark"] .vs-sidebar-item {
    color: #94a3b8;
}
[data-theme="dark"] .vs-sidebar-item:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
}
[data-theme="dark"] .vs-sidebar-history-item.active {
    background: rgba(74,122,181,0.15);
    color: #93c5fd;
}
[data-theme="dark"] .vs-sidebar-toggle {
    color: #64748b;
}
[data-theme="dark"] .vs-sidebar-toggle:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
}
[data-theme="dark"] .vs-sidebar-section-label {
    color: rgba(148,163,184,0.5);
}
[data-theme="dark"] .vs-sidebar-item-menu-btn {
    color: #64748b;
}
[data-theme="dark"] .vs-sidebar-item-menu-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
}
[data-theme="dark"] .vs-sidebar-item-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
[data-theme="dark"] .vs-sidebar-dropdown-item {
    color: #cbd5e1;
}
[data-theme="dark"] .vs-sidebar-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .vs-rename-input {
    color: #e2e8f0;
    border-bottom-color: #4a7ab5;
}


/* ================================================
   AI Valuation - Dark mode suggestion chips
   ================================================ */

[data-theme="dark"] .suggestion-chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .suggestion-chip:hover {
    background: #334155;
    border-color: #4a7ab5;
    color: #e2e8f0;
}

