@import url('./apple-mobile-fit.css');

/* 1. Floating Movable AI Trigger Button */
    .gary-ai-trigger {
        position: fixed !important;
        bottom: 24px !important;
        right: 24px !important;
        top: auto !important;
        left: auto !important;
        z-index: 10000010 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: rgba(10, 10, 18, 0.96);
        border: 2.5px solid #FF5500;
        box-shadow: 0 10px 30px rgba(255, 85, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.5);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        padding: 0;
        margin: 0;
        transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    }

    .gary-ai-trigger:active { cursor: grabbing; }
    .gary-ai-trigger:hover {
        border-color: #FF7700;
        box-shadow: 0 14px 35px rgba(255, 85, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.7);
    }
    .gary-ai-avatar-box,
    .gary-ai-avatar-img,
    .gary-ai-pulse-ring {
        user-select: none;
        -webkit-user-select: none;
        -webkit-user-drag: none;
        pointer-events: none;
    }
    .sophie-greeting-bubble {
        pointer-events: auto !important;
    }
    .sophie-greeting-bubble * {
        pointer-events: auto !important;
    }

    .gary-ai-avatar-box {
        position: relative;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gary-ai-avatar-img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(255, 255, 255, 0.9);
        display: block;
    }

    .gary-ai-pulse-ring {
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        border: 2px solid #10b981;
        animation: aiNeuralPulse 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
    }

    @keyframes aiNeuralPulse {
        0% { transform: scale(0.95); opacity: 1; }
        70% { transform: scale(1.35); opacity: 0; }
        100% { transform: scale(1.35); opacity: 0; }
    }

    /* 2. Speech Bubble on Load */
    .sophie-greeting-bubble {
        position: absolute;
        right: 72px;
        left: auto;
        top: 50%;
        transform: translateY(-50%) translateX(12px) scale(0.85);
        background: rgba(12, 12, 22, 0.97);
        border: 1.5px solid #FF5500;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 85, 0, 0.45);
        border-radius: 16px;
        padding: 9px 16px;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 600;
        color: #ffffff;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
        display: flex;
        align-items: center;
        gap: 6px;
        z-index: 10000012;
    }

    .sophie-greeting-bubble::before {
        content: '';
        position: absolute;
        right: -7px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left: 7px solid #FF5500;
        border-right: none;
    }

    .sophie-greeting-bubble.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(-50%) translateX(0) scale(1) !important;
    }

    .sophie-greeting-bubble.hide {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-50%) translateX(-8px) scale(0.85) !important;
    }

    @media (max-width: 768px) {
        .sophie-greeting-bubble {
            position: fixed !important;
            bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
            right: 18px !important;
            left: auto !important;
            top: auto !important;
            transform: translateY(10px) scale(0.92) !important;
            max-width: 280px !important;
            white-space: normal !important;
            padding: 8px 14px !important;
            font-size: 12px !important;
        }
        .sophie-greeting-bubble::before {
            top: 100% !important;
            right: 20px !important;
            left: auto !important;
            bottom: auto !important;
            transform: none !important;
            border-top: 7px solid #FF5500 !important;
            border-bottom: none !important;
            border-left: 7px solid transparent !important;
            border-right: 7px solid transparent !important;
        }
        .sophie-greeting-bubble.show {
            transform: translateY(0) scale(1) !important;
        }
        .sophie-greeting-bubble.hide {
            transform: translateY(10px) scale(0.92) !important;
        }
    }

    /* 3. Modal Backdrop */
    .gary-ai-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 10000020;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .gary-ai-modal-backdrop.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* 4. Chat Window Container */
    .gary-ai-chat-window {
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 440px;
        max-width: calc(100vw - 32px);
        height: 660px;
        max-height: calc(100vh - 80px);
        background: #09090f;
        border: 1.5px solid rgba(255, 85, 0, 0.4);
        border-radius: 28px;
        box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 85, 0, 0.3);
        backdrop-filter: blur(32px);
        -webkit-backdrop-filter: blur(32px);
        z-index: 10000030;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px) scale(0.96);
        pointer-events: none;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    }

    .gary-ai-chat-window.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }

        @media (max-width: 767px) {
        .gary-ai-chat-window {
            position: fixed !important;
            inset: 0 !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100vw !important;
            max-width: 100vw !important;
            height: 100% !important;
            height: 100dvh !important;
            border-radius: 0 !important;
            border: none !important;
            margin: 0 !important;
            transform: translateY(100%) !important;
            box-shadow: none !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            z-index: 10000030 !important;
            opacity: 0 !important;
            pointer-events: none !important;
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
        }

        .gary-ai-chat-window.active {
            transform: translateY(0) !important;
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
        }

        .gary-ai-pill-input-container {
            margin: 6px 12px calc(8px + env(safe-area-inset-bottom, 8px)) 12px !important;
            padding: 6px 8px 6px 14px !important;
        }

        .gary-ai-header {
            padding-top: max(16px, env(safe-area-inset-top, 16px)) !important;
            padding-bottom: 12px !important;
            padding-left: max(14px, env(safe-area-inset-left, 14px)) !important;
            padding-right: max(14px, env(safe-area-inset-right, 14px)) !important;
            min-height: 64px !important;
            gap: 8px !important;
        }

        .header-desktop-actions {
            display: none !important;
        }

        .sophie-header-badge {
            display: none !important;
        }

        .gary-ai-trigger {
            bottom: 18px !important;
            right: 18px !important;
            width: 58px !important;
            height: 58px !important;
        }

        .sophie-voice-card {
            width: 95% !important;
            padding: 24px 16px 20px 16px !important;
            max-height: 90vh !important;
            overflow-y: auto !important;
        }

        .sophie-voice-avatar-wrap {
            width: 90px !important;
            height: 90px !important;
            margin-bottom: 16px !important;
        }
        .sophie-voice-avatar-img {
            width: 90px !important;
            height: 90px !important;
        }
    }

    /* 5. Header Area */
    .gary-ai-header {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(10, 10, 16, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        flex-grow: 0;
        z-index: 10;
    }

    /* Sophisticated Round Action Icon Buttons (Icons Only, Luxury Color Coded) */
    .sophie-hdr-icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        outline: none;
        cursor: pointer;
        text-decoration: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
        position: relative;
        z-index: 10000035 !important;
        pointer-events: auto !important;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }
    .sophie-hdr-icon-btn:hover {
        filter: brightness(1.12);
        transform: translateY(-1px) scale(1.04);
    }
    .sophie-hdr-icon-btn:active {
        transform: scale(0.92);
    }

    /* Distinct Vibrant Channel Colors */
    .sophie-wa-btn {
        background: #25D366 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35) !important;
    }
    .sophie-sms-btn {
        background: #007AFF !important;
        color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 122, 255, 0.35) !important;
    }
    .sophie-call-btn {
        background: #34C759 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(52, 199, 89, 0.35) !important;
    }
    .sophie-email-btn {
        background: #0078D4 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 120, 212, 0.35) !important;
    }
    .sophie-talk-btn {
        background: linear-gradient(135deg, #8B5CF6, #6366F1) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 12px rgba(139, 92, 246, 0.45) !important;
        animation: voiceGlowPulse 2.4s infinite ease-in-out;
    }
    @keyframes voiceGlowPulse {
        0%, 100% { box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4); }
        50% { box-shadow: 0 2px 18px rgba(139, 92, 246, 0.75); }
    }
    .sophie-close-btn, #garyAiCloseBtn {
        background: rgba(255, 255, 255, 0.16) !important;
        color: #ffffff !important;
        border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        margin-left: 2px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        z-index: 10000040 !important;
    }
    .sophie-close-btn:hover, #garyAiCloseBtn:hover {
        background: rgba(255, 255, 255, 0.28) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    @media (max-width: 767px) {
        .sophie-hdr-icon-btn {
            width: 38px !important;
            height: 38px !important;
            min-width: 38px !important;
            min-height: 38px !important;
        }
        #garyAiCloseBtn {
            width: 42px !important;
            height: 42px !important;
            min-width: 42px !important;
            min-height: 42px !important;
            margin-left: 4px !important;
        }
    }

    /* Single High-Converting Book Now Bar at Bottom */
    .sophie-bottom-booking-bar {
        padding: 8px 16px 6px 16px;
        background: rgba(10, 10, 16, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
        width: 100%;
    }
    .sophie-book-now-full-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 11px 16px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.32));
        border: 1.5px solid rgba(16, 185, 129, 0.6);
        color: #34D399;
        font-size: 13px;
        font-weight: 700;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        text-align: center;
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
    }
    .sophie-book-now-full-btn:hover {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(5, 150, 105, 0.48));
        border-color: rgba(16, 185, 129, 0.85);
        color: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }
    .sophie-book-now-full-btn:active {
        transform: scale(0.98);
    }

    /* Choice of Text vs Talk Mode Switcher next to Input */
    .sophie-mode-toggle-group {
        display: flex;
        align-items: center;
        gap: 2px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 20px;
        padding: 2px;
        margin-right: 4px;
        flex-shrink: 0;
    }
    .sophie-mode-btn {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: #94a3b8;
        cursor: pointer;
        padding: 0;
        transition: all 0.2s ease;
    }
    .sophie-mode-btn.active {
        background: #FF5500;
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(255, 85, 0, 0.4);
    }
    .sophie-mode-btn:hover:not(.active) {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
    }

    /* Voice Modal Header Icons (Icons Only) */
    .sophie-voice-hdr-icons {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 8px;
    }

    /* 6. Messages Area */
    .gary-ai-messages-area {
        flex: 1 1 0%;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 16px;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 85, 0, 0.3) transparent;
    }

    .gary-ai-messages-area::-webkit-scrollbar { width: 5px; }
    .gary-ai-messages-area::-webkit-scrollbar-thumb {
        background: rgba(255, 85, 0, 0.3);
        border-radius: 9999px;
    }

    /* Message Bubbles */
    .ai-msg {
        max-width: 88%;
        padding: 12px 16px;
        font-size: 15px;
        line-height: 1.55;
        word-break: break-word;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        position: relative;
    }

    @media (max-width: 767px) {
        .ai-msg {
            max-width: 92%;
            font-size: 15px;
            padding: 13px 16px;
        }
    }

    .ai-msg-assistant {
        align-self: flex-start;
        background: rgba(22, 22, 34, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #e2e8f0;
        border-radius: 20px 20px 20px 6px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .ai-msg-user {
        align-self: flex-end;
        background: #FF5500;
        color: #ffffff;
        border-radius: 20px 20px 6px 20px;
        font-weight: 500;
        box-shadow: 0 4px 16px rgba(255, 85, 0, 0.3);
    }

    /* Message Actions Row (Listen + Book Now inside bubble on same line) */
    .sophie-msg-actions-row {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        margin-top: 10px;
    }
    .sophie-msg-actions-row .sophie-speaker-btn,
    .sophie-msg-actions-row .sophie-msg-book-btn,
    .sophie-speaker-btn,
    .sophie-msg-book-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 30px !important;
        line-height: 28px !important;
        padding: 0 12px !important;
        margin: 0 !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        user-select: none;
        text-decoration: none;
        outline: none;
        white-space: nowrap;
        vertical-align: middle;
    }
    .sophie-speaker-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #93c5fd;
    }
    .sophie-speaker-btn:hover {
        background: rgba(255, 85, 0, 0.35);
        border-color: #FF5500;
        color: #ffffff;
        transform: translateY(-1px);
    }
    .sophie-speaker-btn:active {
        transform: scale(0.96);
    }
    .sophie-speaker-btn.speaking {
        background: #FF5500;
        border-color: #FF5500;
        color: #ffffff;
        animation: speakerPulse 1s infinite alternate;
    }
    @keyframes speakerPulse {
        from { opacity: 0.85; }
        to { opacity: 1; transform: scale(1.04); }
    }

    .sophie-msg-book-btn {
        background: rgba(16, 185, 129, 0.16);
        border: 1px solid rgba(16, 185, 129, 0.45);
        color: #6ee7b7;
    }
    .sophie-msg-book-btn:hover {
        background: #10B981;
        border-color: #10B981;
        color: #ffffff;
        transform: translateY(-1px);
    }
    .sophie-msg-book-btn:active {
        transform: scale(0.96);
    }

    /* Typing Animation Indicator */
    .ai-typing-indicator {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 8px 14px;
        background: rgba(22, 22, 34, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px 18px 18px 6px;
        width: fit-content;
        align-self: flex-start;
    }

    .ai-typing-indicator span {
        width: 6px;
        height: 6px;
        background: #FF5500;
        border-radius: 50%;
        animation: typingDot 1.4s infinite ease-in-out both;
    }

    .ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
    .ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

    @keyframes typingDot {
        0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
        40% { transform: scale(1.1); opacity: 1; background: #FF7700; }
    }

    /* Small Authentic Round Brand Icons Row */
    .sophie-action-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 12px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .sophie-round-action-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
        border: 1.5px solid rgba(255, 255, 255, 0.15);
    }

    .sophie-round-action-btn:hover {
        transform: scale(1.12);
        filter: brightness(1.12);
    }

    .sophie-round-action-btn.active {
        transform: scale(0.94);
    }

    .sophie-round-action-btn.wa {
        background: #25D366;
        box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
    }

    .sophie-round-action-btn.sms {
        background: #FF5500;
        box-shadow: 0 4px 14px rgba(255, 85, 0, 0.45);
    }

    .sophie-round-action-btn.call {
        background: #10b981;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
    }

    .sophie-round-action-btn.email {
        background: #0078D4;
        box-shadow: 0 4px 14px rgba(0, 120, 212, 0.45);
    }

    /* Quick Action Prompt Chips */
    .ai-chips-container {
        padding: 8px 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(8, 8, 14, 0.7);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        gap: 8px;
        scrollbar-width: none;
        flex-shrink: 0;
        flex-grow: 0;
    }

    .ai-chips-container::-webkit-scrollbar {
        display: none;
    }

    .ai-prompt-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        min-height: 36px;
        border-radius: 9999px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #cbd5e1;
        font-size: 12px;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        user-select: none;
        -webkit-user-select: none;
        flex-shrink: 0;
    }

    .ai-prompt-chip:active, .ai-prompt-chip:hover {
        background: rgba(255, 85, 0, 0.25);
        border-color: #FF5500;
        color: #ffffff;
    }

    /* 7. Bottom Input Bar with Mic Button */
    .gary-ai-input-bar {
        padding: 10px 16px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(10, 10, 16, 0.98);
        flex-shrink: 0;
        flex-grow: 0;
        position: relative;
        z-index: 50;
        width: 100%;
    }

    .gary-ai-pill-input-container {
        background: rgba(24, 24, 34, 0.95);
        border: 1.5px solid rgba(255, 255, 255, 0.14);
        border-radius: 28px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 4px 6px 4px 14px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .gary-ai-pill-input-container:focus-within {
        border-color: #FF5500;
        box-shadow: 0 4px 25px rgba(255, 85, 0, 0.35);
    }

    .gary-ai-input-field {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: #ffffff;
        font-size: 16px !important;
        line-height: 1.4;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        padding: 8px 0;
        min-height: 40px;
    }

    .gary-ai-input-field::placeholder {
        color: #71717a;
        font-size: 14px;
    }

    /* Microphone Voice Recording Button */
    .gary-ai-mic-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.16);
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .gary-ai-mic-btn:hover {
        background: rgba(255, 85, 0, 0.25);
        color: #ffffff;
        border-color: #FF5500;
    }

    .gary-ai-mic-btn.recording {
        background: #ef4444 !important;
        color: #ffffff !important;
        border-color: #f87171 !important;
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
        animation: micPulse 1.2s infinite ease-in-out;
    }

    @keyframes micPulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.15); }
    }

    .gary-ai-send-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #FF5500;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .gary-ai-send-btn:active {
        transform: scale(0.92);
        background: #005bb5;
    }
    
    .parallax-bg-text {
        position: absolute;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", sans-serif;
        font-weight: 900;
        font-size: clamp(80px, 12vw, 180px);
        line-height: 0.9;
        letter-spacing: -0.04em;
        color: rgba(29, 29, 31, 0.04);
        white-space: nowrap;
        user-select: none;
        pointer-events: none;
        z-index: 0;
        text-transform: uppercase;
        will-change: transform;
    }

/* --- SOPHIE LIVE VOICE CALL MODAL & AUDIO WAVE VISUALIZER --- */
.sophie-voice-modal {
    position: fixed;
    inset: 0;
    z-index: 10000030;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 10, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sophie-voice-modal.active {
    display: flex;
    opacity: 1;
}

.sophie-voice-card {
    position: relative;
    width: 92%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(20, 22, 35, 0.96) 0%, rgba(10, 11, 18, 0.98) 100%);
    border: 1.5px solid rgba(255, 85, 0, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(255, 85, 0, 0.18);
    border-radius: 32px;
    padding: 32px 24px 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.sophie-voice-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.sophie-voice-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.sophie-voice-settings-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.sophie-voice-settings-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Avatar & Animated Ripple Waves */
.sophie-voice-avatar-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 12px 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sophie-voice-wave {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 85, 0, 0.4);
    opacity: 0;
    pointer-events: none;
}

.sophie-voice-wave.wave-2 {
    inset: -26px;
    border-color: rgba(6, 182, 212, 0.35);
}

.sophie-voice-wave.wave-3 {
    inset: -42px;
    border-color: rgba(255, 85, 0, 0.2);
}

/* Active Audio Ripples */
.sophie-voice-avatar-wrap.speaking .sophie-voice-wave {
    animation: voiceRipple 1.6s infinite cubic-bezier(0.16, 1, 0.3, 1);
}
.sophie-voice-avatar-wrap.speaking .sophie-voice-wave.wave-2 {
    animation-delay: 0.35s;
}
.sophie-voice-avatar-wrap.speaking .sophie-voice-wave.wave-3 {
    animation-delay: 0.7s;
}

.sophie-voice-avatar-wrap.listening .sophie-voice-wave {
    border-color: rgba(16, 185, 129, 0.6);
    animation: voiceListenRipple 1.4s infinite cubic-bezier(0.16, 1, 0.3, 1);
}
.sophie-voice-avatar-wrap.listening .sophie-voice-wave.wave-2 {
    border-color: rgba(6, 182, 212, 0.45);
    animation-delay: 0.35s;
}
.sophie-voice-avatar-wrap.listening .sophie-voice-wave.wave-3 {
    border-color: rgba(16, 185, 129, 0.3);
    animation-delay: 0.7s;
}

@keyframes voiceRipple {
    0% { transform: scale(0.9); opacity: 0.85; }
    50% { opacity: 0.45; }
    100% { transform: scale(1.45); opacity: 0; }
}

@keyframes voiceListenRipple {
    0% { transform: scale(0.95); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

.sophie-voice-avatar-img {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF5500;
    box-shadow: 0 10px 30px rgba(255, 85, 0, 0.45);
    z-index: 2;
}

/* Status Pill */
.sophie-voice-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.sophie-voice-beacon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 12px #10B981;
}
.sophie-voice-beacon.speaking {
    background: #FF5500;
    box-shadow: 0 0 14px #FF5500;
    animation: beaconPulse 1s infinite;
}
.sophie-voice-beacon.connecting {
    background: #3b82f6;
    box-shadow: 0 0 14px #3b82f6;
    animation: beaconPulse 0.8s infinite;
}

@keyframes beaconPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* Subtitle / Live Transcript Display */
.sophie-voice-transcript-box {
    width: 100%;
    min-height: 80px;
    max-height: 175px;
    overflow-y: auto;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #f1f5f9;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.sophie-voice-call-gary-btn {
    width: 100%;
    padding: 12px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sophie-voice-call-gary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

/* Live Controls Bar */
.sophie-voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.sophie-call-btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    color: white;
}
.sophie-call-btn-circle:active {
    transform: scale(0.92);
}

.sophie-call-mic {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.sophie-call-mic.muted {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.sophie-call-hangup {
    background: #ef4444;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}
.sophie-call-hangup:hover {
    background: #dc2626;
}

.sophie-call-gary {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
}
.sophie-call-gary:hover {
    background: #10B981;
    color: white;
}

.sophie-call-text {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
}
.sophie-call-text:hover {
    background: rgba(255, 85, 0, 0.35);
    border-color: #FF5500;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.4);
}

.sophie-voice-switch-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 14px 0 16px 0;
}
.sophie-voice-switch-text-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    user-select: none;
    text-decoration: none;
}
.sophie-voice-switch-text-bar:hover {
    background: rgba(255, 85, 0, 0.25);
    border-color: #FF5500;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.4);
}
.sophie-voice-switch-text-bar:active {
    transform: scale(0.97);
}

.sophie-text-switch-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
.sophie-text-switch-btn:hover {
    background: #FF5500 !important;
    border-color: #FF5500 !important;
}

/* Header Live Voice Button */
.sophie-live-voice-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.25) 0%, rgba(255, 120, 0, 0.35) 100%);
    border: 1px solid rgba(255, 85, 0, 0.5);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
    box-shadow: 0 0 12px rgba(255, 85, 0, 0.2);
}
.sophie-live-voice-header-btn:hover {
    background: #FF5500;
    box-shadow: 0 0 18px rgba(255, 85, 0, 0.6);
    transform: translateY(-1px);
}

/* Settings Modal */
.sophie-apikey-modal {
    position: fixed;
    inset: 0;
    z-index: 10000040;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}
.sophie-apikey-modal.active {
    display: flex;
}
.sophie-apikey-card {
    width: 90%;
    max-width: 400px;
    background: #12131c;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 24px;
    color: white;
    font-family: system-ui, -apple-system, sans-serif;
    text-align: left;
}


/* --- SOPHIE GOOGLE CALENDAR JOB BOOKING WIDGET --- */
.sophie-booking-card {
    background: linear-gradient(180deg, rgba(25, 28, 42, 0.98) 0%, rgba(14, 16, 26, 0.98) 100%);
    border: 1.5px solid rgba(255, 85, 0, 0.4);
    border-radius: 24px;
    padding: 20px;
    margin: 12px 0;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 85, 0, 0.15);
    font-family: system-ui, -apple-system, sans-serif;
    text-align: left;
}

.sophie-booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.sophie-booking-title {
    font-size: 14px;
    font-weight: 800;
    color: #FF5500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sophie-slot-pill-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0 14px 0;
}

.sophie-slot-pill {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sophie-slot-pill:hover {
    background: rgba(255, 85, 0, 0.2);
    border-color: #FF5500;
}

.sophie-slot-pill.active {
    background: #FF5500 !important;
    color: #ffffff !important;
    border-color: #FF7733 !important;
    box-shadow: 0 0 15px rgba(255, 85, 0, 0.5);
}

.sophie-calendar-action-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    margin-top: 10px;
    text-decoration: none;
}

.sophie-calendar-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    color: white;
}

.sophie-google-cal-btn {
    background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.35);
}
.sophie-google-cal-btn:hover {
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.5);
}

/* --- ENHANCED MOBILE BOOKING FORM & APPOINTMENT PASS --- */
.sophie-booking-service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px 0;
}
.sophie-service-chip {
    flex: 1 1 calc(50% - 6px);
    padding: 10px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}
.sophie-service-chip:hover {
    background: rgba(255, 85, 0, 0.15);
    border-color: rgba(255, 85, 0, 0.4);
}
.sophie-service-chip.active {
    background: #FF5500 !important;
    border-color: #FF7733 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(255, 85, 0, 0.45);
}
.sophie-day-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 6px 0 10px 0;
}
.sophie-day-btn {
    padding: 9px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
}
.sophie-day-btn.active {
    background: rgba(255, 85, 0, 0.25) !important;
    border-color: #FF5500 !important;
    color: #ffffff !important;
}
.sophie-booking-input-stacked {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}
.sophie-booking-input-stacked:focus {
    border-color: #FF5500;
    background: rgba(255, 255, 255, 0.1);
}
.sophie-booking-wa-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: 14px;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.5);
    color: #25D366;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    text-decoration: none;
}
.sophie-booking-wa-btn:hover {
    background: rgba(37, 211, 102, 0.25);
    color: #ffffff;
}

/* Digital Appointment Pass */
.sophie-appointment-pass {
    background: linear-gradient(180deg, #0d1117 0%, #080a0f 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    border-radius: 20px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.2);
    text-align: left;
}
.sophie-pass-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.sophie-pass-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.sophie-pass-ref {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
}
.sophie-pass-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.sophie-pass-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 8px 10px;
}
.sophie-pass-item.full-width {
    grid-column: span 2;
}
.sophie-pass-label {
    font-size: 9.5px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
}
.sophie-pass-val {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}
.sophie-pass-notice {
    background: rgba(255, 85, 0, 0.1);
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    color: #fdba74;
    line-height: 1.4;
    margin-bottom: 12px;
}


/* Hearing user speech live volume wave */
.sophie-voice-avatar-wrap.hearing-speech .sophie-voice-wave {
    border-color: #10B981 !important;
    animation: voiceHearPulse 0.5s infinite alternate ease-in-out !important;
}

@keyframes voiceHearPulse {
    0% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1.45); opacity: 0.2; }
}

/* Quick Voice Action Chips */
.sophie-voice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
}

.sophie-voice-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sophie-voice-chip:hover {
    background: rgba(255, 85, 0, 0.2);
    border-color: #FF5500;
    color: white;
    transform: translateY(-1px);
}

/* Voice Quick Type Row (Laptop fallback) */
.sophie-voice-type-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 14px;
}

.sophie-voice-type-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.sophie-voice-type-input:focus {
    border-color: #FF5500;
}

.sophie-voice-type-send {
    background: #FF5500;
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.sophie-voice-type-send:hover {
    background: #e04b00;
}

/* Live Voice Call Top Banner in Chat Window */
.sophie-call-top-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.12) 100%);
    border-bottom: 1px solid rgba(16, 185, 129, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    user-select: none;
    overflow: hidden;
}
.sophie-call-top-banner * {
    white-space: nowrap !important;
}
.sophie-call-top-banner:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.32) 0%, rgba(5, 150, 105, 0.22) 100%);
}
.sophie-call-top-banner:active {
    transform: scale(0.99);
}

/* Floating Trigger Call & Chat Pills */
.sophie-greeting-bubble.show {
    pointer-events: auto !important;
}
.sophie-trigger-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.sophie-trigger-call-pill:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.6);
}
.sophie-trigger-chat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.sophie-trigger-chat-pill:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: scale(1.06);
}

/* Call Duration Timer Badge */
.sophie-call-timer-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

/* =====================================================================
   WORLD-CLASS SOPHIE AI UPGRADES (STARTER CHIPS, BENTO CARDS, EQUALIZER)
   ===================================================================== */

/* 1. Quick Starter Chips (Zero Effort Prompts) */
.sophie-starter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 4px 4px 4px;
    margin-top: 6px;
    margin-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.sophie-starter-chips::-webkit-scrollbar {
    display: none;
}
.sophie-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    font-size: 12px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.sophie-chip:hover {
    background: rgba(255, 85, 0, 0.22);
    border-color: #FF5500;
    color: #ffffff;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.35);
}
.sophie-chip:active {
    transform: scale(0.97);
}

/* 2. Real-Time Voice Waveform Equalizer (Audio Reactive) */
.sophie-visualizer-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    margin: 4px 0 16px 0;
}
.sophie-eq-bar {
    width: 4px;
    height: 8px;
    background: linear-gradient(180deg, #FF5500 0%, #10B981 100%);
    border-radius: 9999px;
    transition: height 0.12s ease;
    opacity: 0.75;
}
.sophie-voice-card.speaking .sophie-eq-bar {
    opacity: 1;
    animation: eqBounce 0.6s infinite ease-in-out alternate;
}
.sophie-voice-card.speaking .sophie-eq-bar.bar-1 { animation-delay: 0.05s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-2 { animation-delay: 0.15s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-3 { animation-delay: 0.25s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-4 { animation-delay: 0.35s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-5 { animation-delay: 0.45s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-6 { animation-delay: 0.2s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-7 { animation-delay: 0.3s; }
.sophie-voice-card.speaking .sophie-eq-bar.bar-8 { animation-delay: 0.1s; }

@keyframes eqBounce {
    0% { height: 6px; transform: scaleY(0.6); }
    100% { height: 28px; transform: scaleY(1.3); }
}

/* 3. Rich Generative Bento Cards */
.sophie-rich-card {
    background: linear-gradient(180deg, rgba(22, 25, 38, 0.95) 0%, rgba(12, 13, 20, 0.98) 100%);
    border: 1.5px solid rgba(255, 85, 0, 0.35);
    border-radius: 20px;
    padding: 14px 16px;
    margin: 10px 0 6px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 85, 0, 0.15);
    font-family: 'Inter', system-ui, sans-serif;
    color: #ffffff;
    text-align: left;
    position: relative;
    overflow: hidden;
}
.sophie-rich-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF5500 0%, #F59E0B 50%, #10B981 100%);
}
.sophie-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.sophie-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.01em;
}
.sophie-card-badge {
    font-size: 10px;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(255, 85, 0, 0.2);
    border: 1px solid rgba(255, 85, 0, 0.4);
    color: #ffaa77;
}

.sophie-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
@media (min-width: 400px) {
    .sophie-card-grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}
.sophie-card-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 10px;
    transition: background 0.15s ease;
}
.sophie-card-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.sophie-item-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sophie-item-price {
    font-size: 12px;
    font-weight: 800;
    color: #34d399;
    font-family: ui-monospace, monospace;
}
.sophie-item-desc {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.35;
}

.sophie-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}
.sophie-card-btn-primary {
    flex: 1;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FF5500 0%, #E04B00 100%);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.4);
    transition: transform 0.15s ease, background 0.15s ease;
}
.sophie-card-btn-primary:hover {
    transform: scale(1.02);
}
.sophie-card-btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 10px;
    background: #25D366;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease;
}
.sophie-card-btn-wa:hover {
    transform: scale(1.04);
}
.sophie-card-btn-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.15s ease;
}
.sophie-card-btn-call:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* 4. Interactive Postcode & Coverage Checker Widget */
.sophie-postcode-checker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}
.sophie-postcode-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    color: #ffffff;
    outline: none;
    text-transform: uppercase;
}
.sophie-postcode-input:focus {
    border-color: #FF5500;
}
.sophie-postcode-btn {
    padding: 6px 12px;
    border-radius: 10px;
    background: #10B981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.sophie-postcode-btn:hover {
    background: #059669;
}
.sophie-postcode-result {
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    margin-top: 6px;
    display: none;
    line-height: 1.4;
}

/* 5. Smooth Streaming Typing Cursor */
.sophie-streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #FF5500;
    margin-left: 3px;
    vertical-align: middle;
    animation: sophieCursorBlink 0.7s infinite;
}
@keyframes sophieCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

