/* =========================================================================
   SYMBOL-X LEADFLOW DEMO APP — COMPLETE STYLES
   Dark enterprise theme matching marketing site
   ========================================================================= */

:root {
    --bg-base: #050505;
    --bg-surface: #0a0a0a;
    --bg-elevated: #111111;
    --bg-hover: #1a1a1a;
    --bg-input: #141414;
    --text-primary: #ededed;
    --text-secondary: #888888;
    --text-muted: #555555;
    --text-white: #ffffff;
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-subtle: rgba(59, 130, 246, 0.12);
    --green: #34D399;
    --green-subtle: rgba(52, 211, 153, 0.12);
    --red: #EF4444;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(59, 130, 246, 0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 100px;
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* WhatsApp colors */
    --wa-green: #075E54;
    --wa-teal: #128C7E;
    --wa-light: #DCF8C6;
    --wa-dark: #0b141a;
    --wa-bubble-out: #005c4b;
    --wa-bubble-in: #202c33;
    --wa-header: #1f2c34;

    /* SMS colors */
    --sms-blue: #007AFF;
    --sms-gray: #3a3a3c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   ESTATE AGENT THEME
   ========================================================================= */
.estate-agent-theme {
    background-color: #fcfcfc;
    color: #1a1a1a;
    font-family: var(--font);
    overflow-y: auto;
    height: auto;
}

.estate-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* NAVBAR */
.estate-navbar {
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estate-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.estate-logo span { color: #888; font-weight: 600; font-style: italic; }

.estate-links {
    display: none;
}
@media(min-width: 768px) {
    .estate-links {
        display: flex;
        gap: 32px;
    }
}

.estate-links a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.estate-links a:hover { color: var(--accent); }

.btn-estate-primary {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-estate-primary:hover { background: #333; }

/* HERO SECTION */
.estate-hero {
    position: relative;
    height: 500px;
    background-image: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.estate-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 1;
}

.estate-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.estate-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.estate-hero p {
    font-size: 1.2rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.estate-search-bar {
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.estate-search-bar input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: var(--radius-full);
    outline: none;
    font-family: var(--font);
}

.estate-search-bar button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.estate-search-bar button:hover { background: var(--accent-hover); }

/* MAIN CONTENT */
.estate-main {
    padding: 64px 24px;
}

.estate-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.estate-section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a1a1a;
}

.estate-section-header a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* LISTINGS OVERRIDES FOR ESTATE THEME */
.demo-listings-panel {
    border-right: none;
    overflow-y: visible;
}
.listings-header {
    display: none; /* Hide old listings header */
}
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding: 0;
}
.listing-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.listing-card:hover {
    border-color: #ddd;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.listing-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.listing-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}
.listing-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.listing-title {
    color: #1a1a1a;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}
.listing-price {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
}
.listing-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* FOOTER */
.estate-footer {
    background: #111;
    color: #888;
    padding: 48px 24px;
    text-align: center;
    font-size: 0.9rem;
}

/* PIPELINE & CONTROLS (Moved to footer) */
.demo-controls-wrapper {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-toggle-pipeline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-toggle-pipeline:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border-color: rgba(255,255,255,0.2); }

.developer-panel {
    margin-top: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
}

.developer-panel.hidden { display: none; }

.pipeline-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pipeline-step-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.pipeline-step-demo.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--border-accent);
    color: var(--accent);
}
.pipeline-step-demo.complete {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34D399;
}
.pipeline-connector-demo { display: none; }

.demo-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}
.demo-actions button,
.demo-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white) !important;
    font-weight: 600 !important;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.demo-actions button:hover,
.demo-actions a:hover {
    background: var(--bg-hover);
    border-color: rgba(255,255,255,0.2);
}
.demo-actions .btn-activate-topbar {
    background: var(--text-white);
    color: var(--bg-base) !important;
}
.demo-actions .btn-activate-topbar:hover {
    background: #e0e0e0;
}

/* =========================================================================
   PROPERTY MODAL
   ========================================================================= */
.property-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.property-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
}

.modal-img {
    height: 260px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-badge { top: auto; bottom: 16px; left: 16px; }

.modal-body { padding: 24px; }

.modal-title {
    font-size: 1.4rem;
    font-weight: 650;
    color: var(--text-white);
    margin-bottom: 4px;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.modal-address {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.modal-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 20px;
}

.btn-enquire {
    width: 100%;
    padding: 14px;
    background: var(--text-white);
    color: var(--bg-base);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-enquire:hover { background: #e0e0e0; }

/* =========================================================================
   CHAT AREA (RIGHT PANEL)
   ========================================================================= */
/* =========================================================================
   FLOATING CHAT WIDGET
   ========================================================================= */
.floating-chat-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.floating-chat-window {
    width: 360px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid #eaeaea;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: scale-up 0.2s ease;
}

.floating-chat-window.open {
    display: flex;
}

@keyframes scale-up {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.floating-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}
.floating-chat-toggle:hover {
    transform: scale(1.05);
    background: #333;
}

/* WEBSITE CHAT OVERRIDES FOR FLOATING WIDGET */
.chat-panel { display: flex; flex-direction: column; height: 100%; background: #ffffff; }

.chat-header {
    padding: 16px;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-header-avatar {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-header-info strong { color: #fff; font-size: 1rem; display: block; }
.chat-status { font-size: 0.75rem; color: var(--green); display: flex; align-items: center; gap: 4px; }
.chat-messages { background: #f9f9f9; padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-bubble { max-width: 85%; padding: 12px 16px; font-size: 0.9rem; line-height: 1.5; word-wrap: break-word; border-radius: var(--radius-lg); }
.chat-assistant { background: #fff; border: 1px solid #eaeaea; color: #1a1a1a; align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.chat-user { background: #1a1a1a; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input-bar { padding: 12px 16px; background: #fff; border-top: 1px solid #eaeaea; display: flex; gap: 8px; }
.chat-input-bar input { flex: 1; border: 1px solid #eaeaea; padding: 10px 14px; border-radius: var(--radius-full); font-size: 0.9rem; outline: none; background: #f9f9f9; color: #1a1a1a; }
.chat-input-bar input:focus { border-color: #1a1a1a; }
.chat-send-btn { width: 40px; height: 40px; border-radius: 50%; background: #1a1a1a; display: flex; justify-content: center; align-items: center; color: #fff; border: none; cursor: pointer; flex-shrink: 0; }

.chat-animate { animation: slide-up 0.3s ease; }

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

/* =========================================================================
   DESKTOP MOCKUP OVERLAY (WHATSAPP WEB & MAC MESSAGES)
   ========================================================================= */
.desktop-mockup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.desktop-mockup-overlay.active { display: flex; animation: fade-in 0.3s ease; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.desktop-app-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    position: relative;
    flex-shrink: 0;
}

/* WhatsApp Web Mockup Styles */
.whatsapp-web {
    background: #eae6df;
}
.wa-web-sidebar {
    width: 30%;
    min-width: 300px;
    background: #ffffff;
    border-right: 1px solid #d1d7db;
    display: flex;
    flex-direction: column;
}
.wa-web-sidebar-header {
    height: 60px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    flex-shrink: 0;
}
.wa-web-user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #dfe5e7;
}
.wa-web-sidebar-actions {
    display: flex;
    gap: 16px;
}
.wa-web-search {
    padding: 8px 12px;
    background: #ffffff;
    border-bottom: 1px solid #f2f2f2;
}
.wa-web-search-box {
    background: #f0f2f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 35px;
}
.wa-web-search-box input {
    border: none;
    background: transparent;
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    color: #111b21;
}
.wa-web-chat-list {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}
.wa-web-chat-item {
    display: flex;
    padding: 12px;
    cursor: pointer;
    background: #f0f2f5; /* Active state */
}
.wa-web-chat-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--wa-teal);
    flex-shrink: 0;
    margin-right: 12px;
}
.wa-web-chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #f2f2f2;
    padding-bottom: 8px;
}
.wa-web-chat-title {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: #111b21;
}
.wa-web-chat-time {
    font-size: 0.75rem;
    color: #667781;
}
.wa-web-chat-preview {
    font-size: 0.85rem;
    color: #667781;
    margin-top: 2px;
}

.wa-web-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
    position: relative;
}

/* Mac Messages Mockup Styles */
.mac-messages {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.1);
}
.mac-sidebar {
    width: 300px;
    background: rgba(245, 245, 247, 0.8);
    border-right: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.mac-sidebar-header {
    padding: 16px;
    padding-top: 20px;
}
.mac-window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.mac-btn {
    width: 12px; height: 12px;
    border-radius: 50%;
}
.mac-btn.close { background: #ff5f56; border: 1px solid #e0443e; }
.mac-btn.min { background: #ffbd2e; border: 1px solid #dea123; }
.mac-btn.max { background: #27c93f; border: 1px solid #1aab29; }

.mac-search input {
    width: 100%;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    outline: none;
}
.mac-search input:focus {
    background: #fff;
    border-color: #007aff;
}
.mac-chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.mac-chat-item {
    display: flex;
    padding: 8px;
    border-radius: 8px;
    background: #007aff;
    color: #fff;
    align-items: center;
}
.mac-chat-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}
.mac-chat-info {
    flex: 1;
}
.mac-chat-title {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}
.mac-chat-time {
    font-weight: normal;
    font-size: 0.75rem;
    opacity: 0.8;
}
.mac-chat-preview {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

.mac-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.btn-close-mockup {
    margin: 40px auto 60px;
    padding: 16px 32px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-close-mockup:hover { background: rgba(255,255,255,0.2); }

/* =========================================================================
   WHATSAPP VIEW
   ========================================================================= */
.wa-panel { display: flex; flex-direction: column; height: 100%; }

.wa-header {
    padding: 8px 12px;
    background: var(--wa-header);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wa-back { color: #00a884; font-size: 1.1rem; cursor: pointer; }

.wa-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--wa-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
}

.wa-header-info {
    flex: 1;
}

.wa-header-info strong {
    font-size: 0.88rem;
    color: #fff;
    display: block;
}
.wa-header-info span {
    font-size: 0.72rem;
    color: #8696a0;
}

.wa-header-actions { color: #8696a0; }

.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: var(--wa-dark);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wa-bubble {
    max-width: 80%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.wa-assistant {
    background: var(--wa-bubble-in);
    color: #e9edef;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.wa-user {
    background: var(--wa-bubble-out);
    color: #e9edef;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.wa-meta {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

.wa-ticks { color: #53bdeb; }

.wa-animate { animation: slide-up 0.25s ease; }

.wa-input-bar {
    padding: 8px 12px 16px;
    background: var(--wa-header);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.wa-input-bar input {
    flex: 1;
    padding: 9px 14px;
    border-radius: 21px;
    border: none;
    background: var(--wa-bubble-in);
    color: #e9edef;
    font-size: 0.88rem;
    font-family: var(--font);
    outline: none;
}

.wa-send-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #00a884;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =========================================================================
   SMS VIEW
   ========================================================================= */
.sms-panel { display: flex; flex-direction: column; height: 100%; }

.sms-header {
    padding: 8px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}

.sms-header-top { margin-bottom: 10px; }

.sms-carrier {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sms-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sms-avatar-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--sms-gray);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.sms-contact-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.sms-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sms-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.sms-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }

.sms-empty-state p { font-size: 0.88rem; margin-bottom: 4px; }

.sms-empty-sub { font-size: 0.78rem !important; color: var(--text-muted); }

.sms-notification {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    animation: slide-up 0.3s ease;
    margin-bottom: 8px;
}

.sms-notif-icon { font-size: 1.3rem; }

.sms-notif-text strong {
    display: block;
    font-size: 0.85rem;
    color: #ff3b30;
}

.sms-notif-text span {
    font-size: 0.75rem;
    color: #888;
}

.sms-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.sms-assistant {
    background: #e9e9eb;
    color: #000;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.sms-user {
    background: var(--sms-blue);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.sms-animate { animation: slide-up 0.25s ease; }

.sms-missed-call-bar {
    padding: 16px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.btn-missed-call {
    padding: 12px 24px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    animation: pulse-red 2s ease infinite;
}

@keyframes pulse-red {
    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); }
}

.btn-missed-call:hover { background: #dc2626; }

.sms-input-bar {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sms-input-bar input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-white);
    font-size: 0.88rem;
    font-family: var(--font);
    outline: none;
}
.sms-input-bar input:focus { border-color: var(--sms-blue); }

.sms-send-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--sms-blue);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================================
   TYPING DOTS
   ========================================================================= */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px !important;
}

.typing-dots .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing-bounce 1.4s ease-in-out infinite;
}

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

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-5px); opacity: 1; }
}

/* =========================================================================
   CALENDAR OVERLAY
   ========================================================================= */
.calendar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 24px;
}
.calendar-overlay.visible { opacity: 1; }

.calendar-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 100%;
    padding: 28px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.calendar-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.calendar-title {
    font-size: 1.3rem;
    font-weight: 650;
    color: var(--text-white);
    margin-bottom: 4px;
}

.calendar-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.cal-date-btn {
    padding: 10px 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cal-date-btn:hover {
    border-color: var(--border-hover);
}

.cal-date-btn.selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.cal-day-name {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font);
}

.cal-day-num {
    font-size: 1.1rem;
    font-weight: 650;
    color: var(--text-white);
    font-family: var(--font);
}

.cal-month {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font);
}

.calendar-times {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}

.calendar-hint {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 12px;
}

.cal-time-btn {
    padding: 9px 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.cal-time-btn:hover:not(.unavailable) { border-color: var(--accent); color: var(--text-white); }

.cal-time-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cal-time-btn.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-confirm-area {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.calendar-selection {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 500;
}

.btn-confirm-booking {
    padding: 14px 36px;
    background: var(--text-white);
    color: var(--bg-base);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-confirm-booking:hover { background: #e0e0e0; }

.calendar-success {
    text-align: center;
    padding: 20px 0;
    animation: slide-up 0.4s ease;
}

.success-check {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.calendar-success h4 {
    font-size: 1.15rem;
    color: var(--text-white);
    margin-bottom: 6px;
}

.calendar-success p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =========================================================================
   SCROLLBAR
   ========================================================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Mac Messages Inner UI Styles */
.mac-chat-header {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.mac-chat-header-label { color: #888; }
.mac-chat-header-name { font-weight: 600; }
.mac-input-bar { padding: 16px; background: transparent; }
.mac-input-wrapper {
    flex: 1;
    width: 100%;
    background: #f4f4f5;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
}
.mac-input-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 1.05rem;
}
.mac-send-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.mac-send-btn:hover { opacity: 1; }

/* =========================================================================
   MEDIA QUERIES
   ========================================================================= */
@media (max-width: 900px) {
    .demo-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .demo-listings-panel {
        border-right: none;
        border-bottom: none;
        max-height: none;
        overflow: visible;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .listings-grid { grid-template-columns: 1fr; }
    .demo-topbar-actions .btn-activate-topbar { display: none; }
    .calendar-dates { grid-template-columns: repeat(4, 1fr); }
    .calendar-times { grid-template-columns: repeat(3, 1fr); }

    /* Estate Theme Mobile Refinements */
    .estate-hero {
        height: 380px;
    }
    .estate-hero h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    .estate-hero p {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    .estate-search-bar {
        padding: 4px;
    }
    .estate-search-bar input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .estate-search-bar button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .estate-main {
        padding: 40px 20px;
    }
    .estate-section-header h2 {
        font-size: 1.6rem;
    }
    .estate-footer {
        padding: 60px 20px;
    }
}

