/* Widget styling for iframe embedding - FIXED POINTER EVENTS */
html, body {
    background: transparent !important;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto !important;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent !important;
}

/* Prevent mobile tap highlight on every element inside the iframe */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent !important;
}
button, [role="button"], .explorer-tile, .gallery-card, .rtr-quick-answer-tile,
.inline-cat-chip, .prompt-suggestion, .pdp-inline-panel,
.message-row, .message-bubble, .passthrough-chat, .passthrough-container,
.input-chin, .input-wrapper, .typebot-wrapper, .chat-controls {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Only interactive elements should be clickable */

/* Border radius handled in main .chat-popup definition below */

.typebot-wrapper {
    border-radius: 32px;
}

.bottom-gradient-overlay {
    border-radius: 0;
}

.input-chin {
    border-radius: 32px;
}

.chat-popup.show,
.chat-popup.show * {
    pointer-events: auto !important;
}

#passthroughContainer,
#passthroughContainer * {
    pointer-events: auto !important;
}

#calendlyFullscreen,
#calendlyFullscreen * {
    pointer-events: auto !important;
}

#financingFullscreen,
#financingFullscreen * {
    pointer-events: auto !important;
}

/* Chat Widget CSS Variables and Styles */
:root {
    --brand-primary: #0b5394;
    --brand-secondary: #4472C4;
    --glass-white-primary: 0.25;
    --glass-white-secondary: 0.15;
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-subtle: rgba(255, 255, 255, 0.5);
    --spring-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ios-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-mobile: 32px;
    --glass-blur: 24px;
    --glass-saturation: 200%;
    --spring-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --input-chin-height: 92px;
    --input-chin-height-mobile: 88px;
    --input-field-height: 52px;
    --input-field-height-mobile: 48px;
    --chin: var(--input-chin-height);
    --promptsH: 56px;
    
    /* iOS Viewport Fix Variables */
    --vh: 1vh;
    --viewport-height: 100vh;
    --header-height: 60px;
    --input-chin-height-mobile: 88px;
}

@media (max-width: 768px) {
    :root {
        --chin: var(--input-chin-height-mobile);
    }
}

/* Background removed for iframe embedding */

/* iOS Body Scroll Lock */
.body-scroll-lock {
    position: fixed !important;
    width: 100% !important;
    overflow: hidden !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* iOS specific popup lock */
.ios-keyboard-open {
    position: absolute !important;
    overflow: hidden !important;
}

/* ========== iOS VIEWPORT FIX CSS ========== */
/* Critical: iOS Body Lock for chat expanded state */
body.chat-expanded-mobile {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    touch-action: none !important;
}

/* Mobile expanded state - CRITICAL CHANGES */
@media (max-width: 768px) {
    /* When keyboard is detected, JS will override with visualViewport values */
}

/* Typebot wrapper - scrollable content area */
#typebotWrapper {
    /* Desktop */
    position: absolute;
    top: 0; /* CHANGE 2: Fix overflow - content flush with top */
    left: 0;
    right: 0;
    bottom: 92px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    #typebotWrapper {
        /* Mobile */
        top: 0; /* CHANGE 2: Fix mobile overflow - flush with top */
        bottom: 60px; /* Cut off lower - flush with text input top */
    }
}

/* Input chin - fixed to bottom */
#inputChin {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--input-chin-height);
    z-index: 20;
}

@media (max-width: 768px) {
    #inputChin {
        height: var(--input-chin-height-mobile);
    }
}

/* Prevent iOS scroll issues */
.chat-popup.expanded {
    touch-action: none; /* CHANGE 3: Prevent scroll fighting with page */
    overscroll-behavior: contain; /* CHANGE 3: Prevent scroll fighting with page */
    -webkit-overflow-scrolling: auto;
}

/* Enhanced scroll prevention for mobile */
@media (max-width: 768px) {
    .chat-popup.expanded {
        touch-action: none !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: auto !important;
        overflow: hidden !important;
        background: transparent !important;
        box-shadow:
            inset 0 0 80px rgba(255, 255, 255, 0.8),
            inset 0 0 40px rgba(255, 255, 255, 0.55) !important;
    }
    
    /* Prevent body scroll when chat is expanded */
    body.chat-expanded-mobile {
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        touch-action: none !important;
        overscroll-behavior: contain !important;
    }
}

/* Desktop scroll prevention */
@media (min-width: 769px) {
    .chat-popup.expanded {
        touch-action: none !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: auto !important;
        position: fixed !important;
        overflow: hidden !important;
        box-shadow: 
            0 2px 6px rgba(0, 0, 0, 0.12),
            inset 0 0 80px rgba(255, 255, 255, 0.5), 
            inset 0 0 40px rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Prevent body scroll when chat is expanded on desktop */
    body.chat-expanded-desktop {
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        touch-action: none !important;
        overscroll-behavior: contain !important;
    }
}

/* Only typebot wrapper should scroll */
#typebotWrapper {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Enhanced typebot wrapper scroll on mobile */
@media (max-width: 768px) {
    #typebotWrapper {
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: auto !important;
        bottom: 60px !important; /* Force consistent positioning */
    }
    
    /* Ensure typebot wrapper positioning is maintained after JS recalculation */
    .chat-popup.expanded #typebotWrapper {
        bottom: 60px !important;
        top: 0 !important;
        position: absolute !important;
    }
}

/* Input field - prevent zoom on iOS */
#glassInput {
    /* Ensure input doesn't cause layout issues */
    width: 100%;
    box-sizing: border-box;
    /* Prevent zoom on iOS */
    font-size: 16px !important;
}

@media (max-width: 768px) {
    #glassInput {
        /* CRITICAL: 16px prevents iOS zoom */
        font-size: 16px !important;
    }
}

/* FIX: Hide original buttons when calendar is fullscreen */
#calendlyFullscreen ~ .chat-controls {
    display: none !important;
}

#calendlyFullscreen ~ .back-btn {
    display: none !important;
}

#financingFullscreen ~ .chat-controls {
    display: none !important;
}

#financingFullscreen ~ .back-btn {
    display: none !important;
}

/* Reset for chat widget only */
.chat-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    animation: preventFlash 0.1s ease-out 0.1s forwards;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

@keyframes preventFlash {
    to { opacity: 1; }
}

/* Gentler iOS notification slide up - matches diff */
@keyframes iosNotificationSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.92);
    }
    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.01);
    }
    85% {
        transform: translateY(1px) scale(0.998);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}




.chat-popup {
    position: absolute; /* Absolute within sized iframe, NOT fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s var(--spring-smooth);
    pointer-events: none;
    z-index: 10000;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.chat-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Lower opacity glass effect - reduced white */
    background: rgba(245, 245, 248, 0.30);
    /* Subtle inner blur for glass depth */
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
}

/* Base ::after only applies when NOT expanded */
.chat-popup:not(.expanded)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.25), transparent 60%);
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
    animation: subtleGlow 4s ease-in-out infinite;
}

@keyframes subtleGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

.mouse-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--popup-mouse-x, 50%) var(--popup-mouse-y, 50%), rgba(255, 255, 255, 0.3), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
    will-change: background;
    transform: translateZ(0);
    contain: strict;
}

.chat-popup:hover .mouse-gradient {
    opacity: 0.5;
}

.chat-popup:hover,
.chat-popup.touch-hover {
    box-shadow: 
        0 25px 45px rgba(31, 38, 135, 0.18),
        0 12px 24px rgba(31, 38, 135, 0.12),
        inset 0 4px 12px rgba(255, 255, 255, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.chat-popup.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* EXPANDING STATE - ALLOW ANIMATION TO WORK */
.chat-popup.expanding {
    transition: none !important;
    animation-fill-mode: forwards !important;
    opacity: initial !important;
    /* Reset any conflicting styles - let animation control everything */
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 999999 !important;
}

/* Smooth opening animation - EXPAND UP from bubble */
@keyframes chatExpandBounce {
    0% {
        width: 64px !important;
        height: 64px !important;
        border-radius: 50% !important;
        opacity: 0 !important;
        transform: scale(0.2) translateY(0) !important;
        bottom: 30px !important;
        right: 30px !important;
    }
    15% {
        opacity: 0.2 !important;
    }
    30% {
        opacity: 0.5 !important;
    }
    55% {
        width: 440px !important;
        height: 680px !important;
        border-radius: 38px !important;
        opacity: 0.95 !important;
        transform: scale(1.02) translateY(-10px) !important; /* Expand up */
        bottom: 30px !important;
        right: 30px !important;
    }
    75% {
        width: 420px !important;
        height: 660px !important;
        border-radius: 35px !important;
        opacity: 1 !important;
        transform: scale(0.98) translateY(-5px) !important; /* Bounce back */
        bottom: 30px !important;
        right: 30px !important;
    }
    100% {
        width: 440px !important;
        height: 680px !important;
        border-radius: 36px !important;
        opacity: 1 !important;
        transform: scale(1) translateY(0) !important; /* Settle */
        bottom: 30px !important;
        right: 30px !important;
    }
}

/* CRITICAL: Expanded state - DESKTOP ONLY (min-width: 769px) */
/* Iframe is now 100% of wrapper — no oversizing — so popup fills it fully */
@media (min-width: 769px) {
    .chat-popup.expanded,
    .chat-popup.expanded:not(.expanding),
    #chatPopup.expanded {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        border-radius: 36px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        pointer-events: auto !important;
        transition: none !important;
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        z-index: 1 !important;
        box-sizing: border-box !important;
        border: none !important;
        box-shadow: none !important;
    }
}

/* SPOTLIGHT EFFECT - CLEAN IMPLEMENTATION - BEHIND ALL CONTENT */
.chat-popup.expanded {
    --popup-mouse-x: 50%;
    --popup-mouse-y: 50%;
}

.chat-popup.expanded .mouse-gradient {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    border-radius: inherit !important;
    z-index: 2 !important;
    background: radial-gradient(
        300px circle at var(--popup-mouse-x, 50%) var(--popup-mouse-y, 50%),
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.18) 25%,
        transparent 50%
    ) !important;
    will-change: background !important;
    transform: translateZ(0) !important;
    contain: strict !important;
    opacity: 0.45 !important;
    mix-blend-mode: overlay !important;
    will-change: background !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    display: block !important;
    visibility: visible !important;
    transition: opacity 0.3s ease !important;
}

.chat-popup.expanded .mouse-gradient.active {
    opacity: 1 !important;
}

body.is-chrome .chat-popup.expanded .mouse-gradient {
    mix-blend-mode: normal !important;
    opacity: 0.3 !important;
}
body.is-chrome .chat-popup.expanded .mouse-gradient.active {
    opacity: 0.5 !important;
}

/* Inner glow as real element (more reliable than ::after) */
.inner-glow {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: inherit !important;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4), transparent 70%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
    animation: subtleGlowExpanded 3s ease-in-out infinite !important;
    display: none !important;
}

.chat-popup.expanded .inner-glow {
    display: block !important;
    opacity: 0.6 !important;
}

@keyframes subtleGlowExpanded {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}

/* Chrome-specific fixes - only disable main shell backdrop to avoid double-blur compositing */
body.is-chrome .chat-popup::before {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: transparent !important;
}

body.is-chrome .inner-glow {
    transform: translateZ(0) !important;
}

body.is-chrome .context-back-btn {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(240, 240, 243, 0.92) !important;
}

body.is-chrome .inline-cat-chip {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(240, 240, 243, 0.8) !important;
}
body.is-chrome .inline-cat-chip[style*="rgba(204,219,41"] {
    background: rgba(204, 219, 41, 0.25) !important;
}

body.is-chrome .control-btn {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(240, 240, 243, 0.92) !important;
    will-change: transform !important;
}

body.is-chrome .mobile-back-btn {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(240, 240, 243, 0.92) !important;
}

body.is-chrome .prompt-suggestion,
body.is-chrome .prompt-suggestion-locked {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(220, 220, 224, 0.75) !important;
}

body.is-chrome .gallery-card .blur-overlay {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Nuclear Chrome fix: disable ALL backdrop-filter inside the iframe.
   The parent embed wrapper provides the glass effect — these inner blurs
   only cause compositor glitching in Chrome.
   EXCEPTION: immersive mode has no wrapper glass — blur must work inside. */
body.is-chrome *,
body.is-chrome *::before,
body.is-chrome *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.is-chrome .chat-popup.immersive-mode .inline-cat-chip,
body.is-chrome .chat-popup.immersive-mode .prompt-suggestion,
body.is-chrome .chat-popup.immersive-mode .prompt-suggestion-locked,
body.is-chrome .chat-popup.immersive-mode .context-back-btn,
body.is-chrome .chat-popup.immersive-mode .glass-input,
body.is-chrome .chat-popup.immersive-mode .message-bubble.assistant,
body.is-chrome .chat-popup.immersive-mode .install-quote-card {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
}

/* Chrome spotlight enabled — compositing handled by translateZ(0) */

.bottom-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        to top,
        rgba(180, 180, 180, 0.5) 0%,
        rgba(200, 200, 200, 0.4) 15%,
        rgba(210, 210, 210, 0.3) 30%,
        rgba(220, 220, 220, 0.2) 45%,
        rgba(230, 230, 230, 0.12) 60%,
        rgba(240, 240, 240, 0.06) 75%,
        rgba(245, 245, 245, 0.03) 85%,
        transparent 100%
    );
    border-radius: 0;
    pointer-events: none;
    z-index: 2;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-popup.expanded .bottom-gradient-overlay {
    display: none;
    opacity: 0;
}
/* Bottom gradient disabled in passthrough — chin ::before handles the fade */

.chat-popup.minimizing {
    transition: all 0.5s var(--ios-standard);
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    filter: blur(2px);
}

/* Mobile specific - Fill iframe completely */
@media (max-width: 768px) {
    .chat-popup {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 24px;
    }
    
    /* Mobile expanded - FILL the iframe completely (iframe has margins/radius) */
    .chat-popup.expanded,
    .chat-popup.expanded:not(.expanding),
    #chatPopup.expanded {
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        border-radius: 24px !important;
        box-sizing: border-box !important;
        border: none !important;
    }
    
    /* Passthrough mode on mobile: wrapper handles frosted glass, popup is transparent */
    #chatPopup.expanded.passthrough-mode,
    .chat-popup.expanded.passthrough-mode {
        border: none !important;
        position: absolute !important;
        background: transparent !important;
        box-shadow:
            inset 0 0 80px rgba(255, 255, 255, 0.8),
            inset 0 0 40px rgba(255, 255, 255, 0.55) !important;
    }
    
    .chat-popup.expanded.minimizing {
        transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
        opacity: 0 !important;
        transform: translateY(100%) !important;
        border-radius: 24px 24px 0 0 !important;
        filter: none !important;
    }
}

@media (min-width: 769px) {
    .chat-popup.minimizing {
        transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        opacity: 0;
        transform: scale(0.8) translateY(20px);
        border-radius: 36px;
        filter: blur(0);
    }
    
    .chat-popup.minimizing.expanded {
        transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.1, 1),
                    opacity 0.25s cubic-bezier(0.4, 0, 1, 1),
                    border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1);
        transform: scale(0.05);
        transform-origin: bottom right;
        border-radius: 50%;
        opacity: 0;
    }
}

.chat-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 25;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s var(--spring-smooth) 0.2s;
}

.chat-popup.show:not(.expanded) .chat-controls { opacity: 1; transform: translateY(0); }
.chat-popup.show:not(.expanded) .control-btn { width: 26px; height: 26px; border-radius: 13px; }
.chat-popup.show:not(.expanded) .control-btn svg { width: 12px; height: 12px; }
.chat-popup.expanded .chat-controls { opacity: 1; transform: translateY(0); top: 20px; right: 22px; }
.chat-popup.expanded .control-btn { width: 30px; height: 30px; border-radius: 15px; }
.chat-popup.expanded .control-btn svg { width: 14px; height: 14px; }

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border: none;
    position: relative;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: backdrop-filter, transform;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s var(--spring-elastic);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    overflow: visible;
    transform-origin: center;
}

.control-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.control-btn:active { transform: scale(0.95); }
.control-btn svg { fill: #333333; opacity: 0.7; position: relative; z-index: 1; }
.control-btn:hover svg { fill: #000000; opacity: 0.9; }

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: backdrop-filter, transform;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s var(--spring-elastic);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 25;
    opacity: 0;
    transform: translateY(-5px);
    overflow: visible;
    transform-origin: center;
}

.chat-popup.expanded.passthrough-mode .back-btn { 
    display: none !important;
}

.context-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    height: 30px;
    border-radius: 15px;
    display: none;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 25;
    padding: 0 12px 0 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    color: #444;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.context-back-btn svg {
    fill: #333;
    opacity: 0.7;
    flex-shrink: 0;
}
.context-back-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(204, 219, 41, 0.5);
    box-shadow: 0 0 12px rgba(204, 219, 41, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}
.context-back-btn:hover svg {
    fill: #000;
    opacity: 0.9;
}
.context-back-btn.visible {
    display: flex !important;
}

body.desktop-embed .mobile-back-btn {
    display: none !important;
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-20px) translateY(-5px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

.back-btn:hover { 
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.75); 
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}
.back-btn:active { transform: scale(0.95); }
.back-btn svg { width: 14px; height: 14px; fill: #333333; opacity: 0.7; }
.back-btn:hover svg { fill: #000000; opacity: 0.9; }

.typebot-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0 8px 8px 8px;
    border-radius: 32px;
    overflow: hidden;
}

.chat-popup.expanded .typebot-container { display: block !important; opacity: 1 !important; }
.typebot-container typebot-standard { width: 100% !important; height: 100% !important; display: block !important; }


/* SIMPLE FIX: Typebot wrapper with NO bottom or height */
.typebot-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    border-radius: 32px;
    background: transparent !important;
    z-index: 3;
    transition: opacity 0.4s var(--spring-smooth), transform 0.4s var(--spring-smooth);
    transform: translateY(0);
}

.typebot-wrapper.hiding { 
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.typebot-wrapper.showing {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.typebot-wrapper iframe {
    overflow: auto !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    -webkit-overflow-scrolling: touch !important;
}

.fading-out {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: opacity 200ms ease, transform 200ms ease !important;
    pointer-events: none !important;
}

.fading-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 200ms ease, transform 200ms ease !important;
}

.passthrough-container {
    position: absolute;
    width: 100%;
    height: calc(100% - var(--input-chin-height));
    top: 0;
    left: 0;
    z-index: 5;
    display: none;
    opacity: 0;
    padding: 0;
    transition: opacity 0.4s var(--spring-smooth);
    background: transparent !important;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

.passthrough-container.show { 
    display: block !important; 
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.passthrough-title {
    font-size: 24px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 20px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24), 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.20);
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 2;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    opacity: 1;
}

@keyframes wordBlurIn {
    0% { 
        opacity: 0; 
        filter: blur(8px);
        transform: translateY(4px);
    }
    100% { 
        opacity: 1; 
        filter: blur(0);
        transform: translateY(0);
    }
}

.passthrough-title.animating span {
    display: inline-block;
    opacity: 0;
    animation: wordBlurIn 0.4s var(--spring-smooth) forwards;
    will-change: transform, opacity, filter;
}

.passthrough-title.hidden { 
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Passthrough chat positioning with z-index to go behind prompts */
.passthrough-chat {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 50px 20px calc(60px + env(safe-area-inset-bottom, 0)) 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%);
}

/* When chat is empty, let clicks through to title */
.passthrough-chat:empty {
    pointer-events: none;
}

.passthrough-chat::-webkit-scrollbar { display: none; }

/* Fix #3: Mobile-specific passthrough-chat positioning */

.message-row { display: flex; gap: 8px; align-items: flex-end; margin: 4px 0; }
.message-row.user { flex-direction: row-reverse; }
.message-row.assistant { flex-direction: row; }

/* FAQ / LLM follow-up buttons — beat Webflow/Shopify theme button { color } resets */
.passthrough-chat .message-row.action-buttons .rtr-action-btn--primary,
.passthrough-chat .message-row.action-buttons .rtr-action-btn--primary * {
    background: linear-gradient(135deg, #CCDB29 0%, #9FAF00 100%) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    -webkit-text-fill-color: #1d1d1f !important;
    color: #1d1d1f !important;
}
.passthrough-chat .message-row.action-buttons .rtr-action-btn--secondary,
.passthrough-chat .message-row.action-buttons .rtr-action-btn--secondary * {
    background: rgba(220, 220, 224, 0.55) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
}

/* Opening welcome stack: visually center above input area. */
.chat-popup.welcome-centered .passthrough-chat > .message-row.assistant:first-of-type {
    margin-top: auto !important;
}
.chat-popup.welcome-centered .passthrough-chat > :last-child {
    margin-bottom: auto !important;
}

/* Message avatar sizing with blur-in + green breathing glow */
@keyframes avatarBlurIn {
    0% { opacity: 0; filter: blur(8px); transform: scale(0.8); }
    100% { opacity: 1; filter: blur(0); transform: scale(1); }
}
@keyframes avatarGreenRotate {
    0% {
        box-shadow: 0 -1px 4px 1px rgba(204,219,41,0.55), 0 1px 2px rgba(204,219,41,0.1);
        border-color: rgba(204,219,41,0.5);
    }
    25% {
        box-shadow: 1px 0 4px 1px rgba(204,219,41,0.35), -1px 0 2px rgba(204,219,41,0.1);
        border-color: rgba(204,219,41,0.35);
    }
    50% {
        box-shadow: 0 1px 4px 1px rgba(204,219,41,0.55), 0 -1px 2px rgba(204,219,41,0.1);
        border-color: rgba(204,219,41,0.5);
    }
    75% {
        box-shadow: -1px 0 4px 1px rgba(204,219,41,0.35), 1px 0 2px rgba(204,219,41,0.1);
        border-color: rgba(204,219,41,0.35);
    }
    100% {
        box-shadow: 0 -1px 4px 1px rgba(204,219,41,0.55), 0 1px 2px rgba(204,219,41,0.1);
        border-color: rgba(204,219,41,0.5);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    animation: avatarBlurIn 0.5s cubic-bezier(0.25,0.46,0.45,0.94) forwards, avatarGreenRotate 2.5s linear 0.5s infinite;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(204, 219, 41, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.message-avatar img { 
    width: 85%; 
    height: 85%; 
    object-fit: contain;
    opacity: 1 !important;
    border-radius: 0;
}

/* Passthrough mode - FULL OPACITY, no darkening */
.chat-popup.expanded.passthrough-mode .message-avatar img {
    filter: none;
    opacity: 1 !important;
}

/* Passthrough mode - clear ::before glass for ALL viewports (iframe is narrow) */
.chat-popup.expanded.passthrough-mode::before {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
}
/* Passthrough spotlight stays enabled — parent blur overlay is separate layer */
/* Passthrough mode: blur overlay in parent page handles all visual chrome */
.chat-popup.expanded.passthrough-mode {
    border: none !important;
    box-shadow: none !important;
}
/* Desktop embed: parent page has blur overlay, so iframe bg must be transparent.
   Must use #chatPopup ID to beat the mobile rule's ID-level specificity. */
body.desktop-embed #chatPopup.expanded.passthrough-mode,
body.desktop-embed .chat-popup.expanded.passthrough-mode {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    touch-action: auto !important;
    -webkit-overflow-scrolling: auto !important;
}
body.desktop-embed #chatPopup.expanded::before,
body.desktop-embed .chat-popup.expanded::before {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.desktop-embed .chat-popup.expanded {
    touch-action: auto !important;
    overscroll-behavior: auto !important;
}

.message-bubble {
    max-width: 70%;
    min-width: 60px;
    padding: 10px 14px;
    border-radius: 24px;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.024em;
    word-wrap: break-word;
    position: relative;
    animation: messageSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Beautiful blur animation for bot bubbles - top to bottom blur sweep */
@keyframes botBubbleBlurIn {
    0% { opacity: 0; transform: translateY(12px) scale(0.95); filter: blur(8px); }
    50% { opacity: 0.8; filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.message-bubble.user {
    background: linear-gradient(135deg, #CCDB29 0%, #9FAF00 100%);
    color: #1d1d1f;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(204, 219, 41, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    margin: 4px 2px;
}

.message-bubble.assistant {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    color: #000000;
    border: none;
    animation: botBubbleBlurIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow:
        0 2px 8px rgba(31, 38, 135, 0.08),
        0 1px 3px rgba(31, 38, 135, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.message-bubble.assistant .bot-message-link {
    color: #0b5394;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.message-bubble.assistant .bot-message-link:hover {
    color: #083d6e;
}

.typing-row { display: flex; gap: 8px; align-items: flex-end; margin: 4px 0; }

.typing-indicator {
    min-width: 60px;
    max-width: 65px;
    padding: 12px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    border: 0.5px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 2px 8px rgba(31, 38, 135, 0.08),
        0 1px 3px rgba(31, 38, 135, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
    animation: messageSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #8e8e93;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
    display: inline-block;
}

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

@keyframes typingDot {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.3); opacity: 1; }
}


.input-chin {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--input-chin-height);
    padding: 8px 20px 26px 20px; /* Less top (prompts closer), more bottom (input up from edge) */
    padding-bottom: calc(26px + env(safe-area-inset-bottom, 0));
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none !important;
    border-radius: 0 !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--spring-smooth);
    z-index: 15;
}

.chat-popup.expanded .input-chin {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: slideUpChin 0.5s var(--spring-smooth);
    pointer-events: auto !important;
    z-index: 25 !important;
}

/* Chin gradient: tight fade just above input area */
.chat-popup.expanded .input-chin::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, rgba(232,232,236,0.15) 60%, rgba(232,232,236,0.45) 100%);
    border-radius: 0;
}

.chat-popup.expanded .input-chin > .input-wrapper,
.chat-popup.expanded .input-chin > .input-wrapper * {
    pointer-events: auto !important;
}
/* Prompt wrapper pointer-events controlled by visibility state only */
.chat-popup.expanded.passthrough-mode.input-focused .input-chin > .prompt-suggestions-wrapper,
.chat-popup.expanded.passthrough-mode.input-focused .input-chin > .prompt-suggestions-wrapper * {
    pointer-events: auto !important;
}

/* Prompt suggestions container - wrapper div */
.prompt-suggestions-wrapper {
    position: absolute;
    bottom: calc(100% - 2px); /* Closer to input */
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 20;
    display: none;
    pointer-events: none;
}

.chat-popup.passthrough-mode .prompt-suggestions-wrapper { 
    display: block !important; 
}

/* Prompt suggestions scrollable container */
.prompt-suggestions-container {
    padding: 12px 16px;
    margin: -12px 0;
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    touch-action: pan-x pan-y;
    pointer-events: auto;
}

.prompt-suggestions-container::-webkit-scrollbar { display: none; }

/* Auto-scroll hover zones for desktop */
@media (min-width: 769px) {
    .prompt-suggestions-wrapper {
        left: 20px;
        right: 20px;
    }

    .prompt-suggestions-wrapper::before,
    .prompt-suggestions-wrapper::after {
        display: none !important;
        content: none !important;
    }
}

/* REFINED: More subtle glow for desktop prompt scroll buttons */
@media (min-width: 769px) {
    /* Desktop prompt row: no visible arrow buttons; hover-to-scroll only */
    .prompt-scroll-gradient {
        display: none !important;
    }
    .prompt-scroll-btn {
        display: none !important;
    }

    .prompt-suggestions-container {
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
    }
}

.prompt-suggestion {
    flex: 0 0 auto;
    padding: 10px 18px;
    background: rgba(220, 220, 224, 0.55);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    text-shadow: none;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    letter-spacing: -0.01em;
    position: relative;
    transform-origin: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 3px 8px rgba(31, 38, 135, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Chrome passthrough/contact prompt pills keep glass blur (override global blur reset) */
body.is-chrome .chat-popup.passthrough-mode .prompt-suggestion,
body.is-chrome .chat-popup.passthrough-mode .prompt-suggestion-locked,
body.is-chrome .chat-popup.contact-mode .prompt-suggestion,
body.is-chrome .chat-popup.contact-mode .prompt-suggestion-locked {
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    background: linear-gradient(135deg, rgba(198, 216, 239, 0.78), rgba(173, 197, 224, 0.6)) !important;
    border: 1px solid rgba(231, 241, 255, 0.8) !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    will-change: auto !important;
}

/* Locked pill - same styling as regular pills */
.prompt-suggestion-locked {
    background: rgba(220, 220, 224, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.65);
    font-weight: 700;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.prompt-suggestion-locked:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.22));
    border-color: rgba(204, 219, 41, 0.5);
    box-shadow: inset 0 0 14px rgba(204, 219, 41, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Full-body green glow hover with bloom ease-in + preserved drop shadow */
.prompt-suggestion:hover {
    background: linear-gradient(135deg, rgba(204,219,41,0.25), rgba(159,175,0,0.15));
    border-color: rgba(204, 219, 41, 0.6);
    box-shadow: 0 0 18px rgba(204,219,41,0.35), 0 0 6px rgba(204,219,41,0.2), inset 0 0 12px rgba(204,219,41,0.15), 0 3px 8px rgba(31,38,135,0.08), 0 2px 4px rgba(0,0,0,0.05);
}

.prompt-suggestion:active {
    background: linear-gradient(135deg, rgba(204,219,41,0.35), rgba(159,175,0,0.25));
}

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

@keyframes mobileSlideUp {
    from { 
        transform: translateY(100%);
        opacity: 0.8;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.input-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
    height: var(--input-field-height);
    transition: all 0.3s var(--spring-smooth);
}

.mobile-back-btn { display: none; }

.glass-input {
    width: 100%;
    height: 100%;
    padding: 0 60px 0 20px;
    font-size: 17px;
    font-weight: 400;
    color: #1d1d1f;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 26px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    /* iOS fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: left;
    transform: none;
}

.input-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 26px;
    background: radial-gradient(300px circle at var(--input-mouse-x, 50%) var(--input-mouse-y, 50%), rgba(255, 255, 255, 0.4), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper:hover::after { opacity: 0.6; }

.input-wrapper:has(input:focus)::after {
    opacity: 1;
    background: radial-gradient(400px circle at var(--input-mouse-x, 50%) var(--input-mouse-y, 50%), rgba(255, 255, 255, 0.5), transparent 50%);
}

.glass-input::placeholder { color: #86868b; font-weight: 400; }

.glass-input:hover:not(:focus) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.35));
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.glass-input:focus {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.45));
    border-color: rgba(200, 200, 205, 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Passthrough mode - more prominent input */
.chat-popup.expanded.passthrough-mode .glass-input {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-popup.expanded.passthrough-mode .glass-input:focus {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 3px 10px rgba(0, 0, 0, 0.12);
}

.submit-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    padding: 0;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s var(--spring-elastic);
}

.submit-btn:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.6);
}

.submit-btn:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(255, 255, 255, 0.5);
}

.submit-btn.has-text {
    background: linear-gradient(135deg, #CCDB29 0%, #9FAF00 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 1px 2px rgba(204, 219, 41, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.submit-btn.has-text:hover {
    background: linear-gradient(135deg, #B8C625 0%, #8A9800 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.submit-btn svg { 
    width: 28px; 
    height: 28px; 
}

.submit-btn svg path { 
    fill: #666666;
    transition: fill 0.2s ease;
}

.submit-btn.has-text svg path { 
    fill: #1d1d1f;
    stroke: #1d1d1f;
}

.submit-btn:hover svg path { 
    fill: #333333;
}

.submit-btn.has-text:hover svg path { 
    fill: #1d1d1f;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Mobile logo sizing */
    .chat-bubble { 
        bottom: 20px; 
        right: 20px; 
        width: var(--bubble-size-mobile); 
        height: var(--bubble-size-mobile); 
    }
    
    .chat-bubble img {
        width: 100%;
        height: 100%;
    }
    
    .chat-bubble.mobile-hide, .chat-popup.show ~ .chat-bubble { opacity: 0; transform: scale(0); pointer-events: none; transition: all 0.3s ease-out; visibility: hidden; }
    
    /* MOBILE FIX: Preview state with fully rounded edges and vertically centered X */
    .chat-popup { 
        left: 12px; 
        right: 12px; 
        bottom: 12px; 
        width: auto; 
        height: var(--preview-height-mobile); 
        border-radius: 50px !important;
        z-index: 999999; 
        position: fixed; 
        transform: translateY(0);
        opacity: 1;
    }
    
    /* MOBILE FIX: Vertically center the X button in preview mode */
    .chat-popup.show:not(.expanded) .chat-controls {
        top: 50% !important;
        transform: translateY(-50%) !important;
        opacity: 1;
    }
    
    /* iOS notification animation - mobile only */
    .chat-popup.show:not(.expanded) {
        z-index: 999999;
        transform: translateY(0);
        opacity: 1;
        animation: iosNotificationSlideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .preview-container { padding: 18px 50px 18px 20px; gap: 12px; display: flex; align-items: center; }
    .preview-message { text-align: left; font-size: 15px; }
    
    /* Mobile notification icon sizing */
    .notification-icon { 
        display: flex !important; 
        width: 44px; 
        height: 44px; 
        border-radius: 22px; 
        background: rgba(255, 255, 255, 0.04); 
        border: 1px solid rgba(255, 255, 255, 0.15); 
        align-items: center; 
        justify-content: center; 
        flex-shrink: 0; 
        margin-right: 8px;
        padding: 0;
    }
    
    .notification-icon img { 
        width: 100%; 
        height: 100%; 
        object-fit: cover;
        border-radius: 50%;
    }
    
    /* MOBILE FIX: Expanded state with typebot wrapper spacing - Floating card appearance */
    .chat-popup.expanded:not(.expanding) { 
        position: fixed !important;
        left: 12px !important; 
        right: 12px !important; 
        bottom: env(safe-area-inset-bottom, 0) !important; 
        top: 60px !important;
        /* FIX #3: Drawer Height - Floating card with padding */
        height: calc(100vh - 60px - env(safe-area-inset-bottom, 0)) !important; 
        width: calc(100vw - 24px) !important; 
        max-width: none !important; 
        border-radius: 32px !important; 
        margin-top: 0 !important; 
        box-sizing: border-box !important; 
        z-index: 999999 !important; 
        overflow: hidden !important;
        touch-action: none !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: none !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    /* Mobile animation - slide up instead of expand */
    .chat-popup.expanding {
        animation: mobileSlideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    }
}

/* Desktop expanded styles - FLOATING CARD */
@media (min-width: 769px) {
    .chat-popup.expanded,
    .chat-popup.expanded:not(.expanding),
    #chatPopup.expanded {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 36px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1 !important;
        border: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        transition: none !important;
        box-sizing: border-box !important;
    }
    
    .notification-icon {
        display: none !important;
    }
}

/* Better preview position on mobile */
@media (max-width: 768px) {
    .chat-popup:not(.expanded) {
        bottom: 80px !important; /* Align with bubble */
        left: 20px !important;
        right: 20px !important;
        width: calc(100% - 40px) !important;
    }
}

@media (max-width: 768px) {
    /* MOBILE FIX: Reset controls position for expanded state */
    .chat-popup.expanded .chat-controls {
        top: 20px !important;
        transform: translateY(0) !important;
    }
    
    /* MOBILE FIX: Typebot wrapper flush - drawer style */
    .chat-popup.expanded .typebot-wrapper {
        top: 0 !important;
        bottom: 60px !important; /* Cut off lower - flush with text input top */
        border-radius: 0 !important; /* No radius - drawer style */
    }
    
    /* Mobile gradient - subtle fade at bottom */
    .chat-popup.expanded .bottom-gradient-overlay {
        border-radius: 0 !important;
        background: linear-gradient(
            to top,
            rgba(200, 200, 205, 0.4) 0%,
            rgba(210, 210, 215, 0.3) 20%,
            rgba(220, 220, 225, 0.2) 40%,
            transparent 100%
        ) !important;
    }
    
    /* Mobile expanded - FILL iframe (iframe handles positioning/margins) */
    .chat-popup.expanded,
    .chat-popup.expanded:not(.expanding),
    #chatPopup.expanded {
        border-radius: 24px !important;
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .chat-popup.expanded::before {
        border-radius: 24px !important;
    }
    
    /* Mobile expanded - slightly darker blur overlay */
    .chat-popup.expanded::before {
        background: rgba(200, 200, 205, 0.35) !important;
    }
    
    .input-chin { 
        height: auto !important;
        min-height: var(--input-chin-height-mobile); 
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0)) 16px; 
        border-radius: 0 0 24px 24px !important; /* Rounded bottom corners for floating style */
        background: transparent !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .glass-input { font-size: 17px; -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 0 52px 0 16px; min-height: 48px; }
    .input-wrapper { height: var(--input-field-height-mobile); position: relative; }
    
    .back-btn { display: none !important; }
    
    .mobile-back-btn { 
        display: block; 
        position: absolute; 
        left: -52px; 
        top: 50%; 
        transform: translateY(-50%); 
        width: 44px; 
        height: 44px; 
        border-radius: 22px; 
        background: rgba(255, 255, 255, 0.65); 
        border: 1px solid rgba(255, 255, 255, 0.6); 
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
        cursor: pointer; 
        display: none; 
        align-items: center; 
        justify-content: center; 
        transition: all 0.3s ease; 
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        pointer-events: auto !important;
        z-index: 100;
    }
    
    .chat-popup.expanded.passthrough-mode .mobile-back-btn { display: none !important; }
    body.mobile-embed .chat-popup.expanded.passthrough-mode.flow-active .mobile-back-btn { display: none !important; }
    .chat-popup.expanded.passthrough-mode .input-wrapper { margin-left: 0; width: 100%; }
    .chat-popup.expanded.passthrough-mode .input-chin { padding-left: 20px; padding-right: 20px; }
    
    .mobile-back-btn:active { transform: translateY(-50%) scale(0.95); background: rgba(255, 255, 255, 0.5); }
    .mobile-back-btn svg { width: 18px; height: 18px; fill: #333333; opacity: 0.7; }
    
    .submit-btn { width: 40px; height: 40px; right: 4px; transform: translateY(-50%); }
    
    /* Mobile prompts positioning */
    .prompt-suggestions-container { 
        padding: 12px 16px !important;
        margin: -12px 0;
        gap: 6px;
    }
    
    .prompt-suggestions-wrapper {
        bottom: calc(100% - 2px); /* Closer to input */
    }
    
    /* Align prompts with back button left edge */
    .chat-popup.expanded.passthrough-mode .prompt-suggestions-container {
        padding-left: 20px !important;
        padding-right: 16px !important;
    }
    
    .prompt-suggestion { 
        padding: 8px 15px; 
        font-size: 14px; 
        border-radius: 20px;
    }
    
    /* Removed active transform on mobile too */
    .prompt-suggestion:active {
        background: rgba(255, 255, 255, 0.264);
    }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* iOS Drag Indicator */
.drag-indicator {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: rgba(60, 60, 67, 0.3);
    border-radius: 100px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    display: none;
    transform-origin: center;
}

@media (max-width: 768px) {
    .chat-popup.show:not(.expanded) .drag-indicator {
        display: block;
        opacity: 1;
    }

    .drag-indicator {
        animation: liquidBounce 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
        animation-delay: 0.5s;
        transform-origin: center;
    }

    @keyframes liquidBounce {
        0%, 100% {
            transform: translateX(-50%) scaleX(1) scaleY(1);
            opacity: 0.3;
        }
        20% {
            transform: translateX(-50%) scaleX(1.3) scaleY(0.95);
            opacity: 0.5;
        }
        40% {
            transform: translateX(-50%) scaleX(0.85) scaleY(1.05);
            opacity: 0.6;
        }
        60% {
            transform: translateX(-50%) scaleX(1.15) scaleY(0.98);
            opacity: 0.5;
        }
        80% {
            transform: translateX(-50%) scaleX(0.95) scaleY(1.02);
            opacity: 0.4;
        }
    }
}

/* Drag states */
.chat-popup.dragging {
    transition: none !important;
}

.chat-popup.dragging .drag-indicator {
    animation: none !important;
}

.chat-popup.drag-preview {
    transform: translateY(var(--drag-offset, 0)) !important;
    height: var(--drag-height, var(--preview-height-mobile)) !important;
}

/* PERFECTED DRAG EXPERIENCE STYLES */
@media (max-width: 768px) {
    .chat-popup.drag-preview .input-chin {
        position: absolute !important;
        bottom: 0 !important;
        padding: 20px 16px !important;
        transform: translateY(0) !important;
    }

    .chat-popup.drag-preview .typebot-wrapper {
        display: block !important;
        transition: none !important;
    }

    .chat-popup.drag-preview .chat-controls {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease !important;
    }

    .chat-popup.drag-preview .bottom-gradient-overlay {
        display: none !important;
    }

    .chat-popup.drag-preview {
        box-shadow:
            0 0 40px rgba(255, 255, 255, 0.3),
            0 0 80px rgba(255, 255, 255, 0.15),
            0 20px 40px rgba(31, 38, 135, 0.15) !important;
    }

    .chat-popup.drag-preview .input-chin,
    .chat-popup.expanded .input-chin {
        z-index: 10 !important;
        display: flex !important;
    }

    .chat-popup.expanded.passthrough-mode .prompt-suggestions-wrapper {
        position: absolute !important;
        bottom: calc(100% - 2px) !important; /* Closer to input */
        left: 0 !important;
        right: 0 !important;
        z-index: 11 !important;
        display: block !important;
    }

    .chat-popup.expanded.passthrough-mode.keyboard-open .input-chin {
        position: fixed !important;
    }
    
    /* Mobile iframe positioning - flush with top */
    .typebot-wrapper iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(0) !important;
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Force iframe flush positioning on mobile */
    .chat-popup.expanded .typebot-wrapper iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(0) !important;
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}
/* RTR SHIMMER AND GALLERY CSS - INJECTED */
.glass-input::placeholder { color: transparent !important; }
.glass-input:focus::placeholder { color: rgba(90, 90, 95, 0.7) !important; visibility: visible !important; }
.decorative-placeholder { position: absolute; left: 16px; right: 52px; top: 50%; transform: translateY(-50%); font-size: 17px; font-weight: 400; letter-spacing: -0.01em; pointer-events: none; cursor: text; z-index: 2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.glass-input:focus ~ .decorative-placeholder { display: none !important; }
.glass-input.has-text ~ .decorative-placeholder { display: none !important; }
.decorative-placeholder.stopped { display: none !important; }
.shimmer-word { display: inline-block; opacity: 0; color: rgba(80, 80, 85, 0.9); background: linear-gradient(90deg, rgba(110, 110, 115, 0.5) 0%, rgba(70, 70, 75, 1) 50%, rgba(110, 110, 115, 0.5) 100%); background-size: 200% 100%; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: shimmerWordBlurIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards, shimmerGlow 3.5s ease-in-out infinite; will-change: opacity, filter; }
.shimmer-word.outro { animation: shimmerWordBlurOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }
@keyframes shimmerWordBlurIn { 0% { opacity: 0; filter: blur(5px); } 100% { opacity: 1; filter: blur(0px); } }
@keyframes shimmerWordBlurOut { 0% { opacity: 1; filter: blur(0px); } 100% { opacity: 0; filter: blur(5px); } }
@keyframes shimmerGlow { 0%, 100% { background-position: 200% 50%; } 50% { background-position: 0% 50%; } }
.rtr-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; flex: 1; min-width: 0; }
.gallery-card { position: relative; border-radius: 20px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: transparent; border: 2px solid transparent; box-shadow: 0 4px 12px rgba(0,0,0,0.12); opacity: 0; transform: translateY(20px); transition: opacity 0.5s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.35s cubic-bezier(0.25,0.46,0.45,0.94), border-color 0.35s cubic-bezier(0.25,0.46,0.45,0.94); -webkit-transform: translateY(20px) translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform, opacity; isolation: isolate; }
.gallery-card:hover { transform: translateY(-3px); box-shadow: 0 0 20px rgba(204,219,41,0.4), 0 0 8px rgba(204,219,41,0.25), inset 0 0 12px rgba(204,219,41,0.1), 0 8px 24px rgba(0,0,0,0.15); border-color: rgba(204,219,41,0.6); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card .blur-overlay { position: absolute; bottom: -1px; left: 0; right: 0; height: 60%; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 40%, rgba(0,0,0,0) 100%); mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 40%, rgba(0,0,0,0) 100%); pointer-events: none; border-radius: 0 0 20px 20px; -webkit-transform: translateZ(0); transform: translateZ(0); will-change: backdrop-filter; }
.gallery-card .dark-overlay { position: absolute; bottom: -1px; left: 0; right: 0; height: 50%; background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 55%, transparent 100%); pointer-events: none; border-radius: 0 0 20px 20px; }
.gallery-card .card-title { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 12px; z-index: 2; text-align: center; color: #fff; font-weight: 600; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
@media (max-width: 768px) { .rtr-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery-card { aspect-ratio: 4/3; } .gallery-card .card-title { font-size: 13px; padding: 8px 10px; } }

/* Product Detail View & Image Carousel */
.product-detail-wrap { width: 100%; }
.product-image-carousel { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.product-image-carousel::-webkit-scrollbar { display: none; }
.product-image-carousel > div { scroll-snap-align: center; }
.product-detail-wrap input[type="text"]:focus { outline: none; border-color: rgba(204, 219, 41, 0.5); box-shadow: 0 0 0 3px rgba(204, 219, 41, 0.15); }
.product-detail-wrap button:hover { transform: translateY(-1px); }
.product-detail-wrap a:hover { opacity: 0.9; transform: translateY(-1px); }

/* END RTR SHIMMER AND GALLERY CSS */

/* Prompt pills & passthrough mode */
/* CRITICAL: Border and inner glow for passthrough mode - NO media query because iframe is 480px wide */
/* Passthrough: all border/shadow handled by blur overlay in parent page */
#chatPopup.expanded.passthrough-mode,
.chat-popup.expanded.passthrough-mode {
    border: none !important;
    box-shadow: none !important;
}

/* Prompt pills - hidden by default, shown on input focus */
.chat-popup.passthrough-mode .prompt-suggestions-wrapper {
    opacity: 0 !important;
    transform: translateY(4px);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    pointer-events: none !important;
}
.chat-popup.passthrough-mode .prompt-suggestions-wrapper *,
.chat-popup.passthrough-mode .prompt-suggestions-wrapper::before,
.chat-popup.passthrough-mode .prompt-suggestions-wrapper::after {
    pointer-events: none !important;
}
.chat-popup.passthrough-mode.input-focused .prompt-suggestions-wrapper {
    opacity: 1 !important;
    transform: translateY(0);
    pointer-events: auto !important;
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.chat-popup.passthrough-mode.input-focused .prompt-suggestions-wrapper *,
.chat-popup.passthrough-mode.input-focused .prompt-suggestions-wrapper::before,
.chat-popup.passthrough-mode.input-focused .prompt-suggestions-wrapper::after {
    pointer-events: auto !important;
}

/* Chat overflow - content should end above the input area */
/* When prompt pills are hidden (default): small padding for input bar only (~68px) */
/* Bottom padding so content scrolls behind the chin gradient */
.chat-popup.passthrough-mode .passthrough-chat,
.chat-popup.passthrough-mode #passthroughChat {
    bottom: 0 !important;
    padding-bottom: 130px !important;
    transition: padding-bottom 0.2s ease;
}
.chat-popup.passthrough-mode.input-focused .passthrough-chat,
.chat-popup.passthrough-mode.input-focused #passthroughChat {
    padding-bottom: 170px !important;
}

/* Startup stabilization: prevent initial compositing flashes on Chrome/Safari. */
.chat-popup.startup-prep .prompt-suggestions-wrapper,
.chat-popup.startup-prep .prompt-suggestions-wrapper *,
.chat-popup.startup-prep .prompt-suggestion,
.chat-popup.startup-prep .prompt-suggestion-locked,
.chat-popup.startup-prep .input-wrapper,
.chat-popup.startup-prep .input-wrapper::after {
    transition: none !important;
    animation: none !important;
}
.chat-popup.startup-prep .prompt-suggestions-wrapper {
    opacity: 0 !important;
}
.chat-popup.startup-prep .prompt-suggestion,
.chat-popup.startup-prep .prompt-suggestion-locked,
.chat-popup.startup-prep .input-wrapper {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Ultra-stable mode: prioritize zero-flicker over decorative transitions. */
.chat-popup.ultra-stable .gallery-card,
.chat-popup.ultra-stable .prompt-suggestion,
.chat-popup.ultra-stable .prompt-suggestion-locked,
.chat-popup.ultra-stable .input-wrapper,
.chat-popup.ultra-stable .input-wrapper::after,
.chat-popup.ultra-stable .card-spotlight,
.chat-popup.ultra-stable .blur-overlay,
.chat-popup.ultra-stable .dark-overlay {
    transition: none !important;
    animation: none !important;
}
.chat-popup.ultra-stable [style*="animation:messageSlideIn"] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
.chat-popup.ultra-stable .gallery-card {
    opacity: 1 !important;
    transform: none !important;
}

/* ============================================
   CONTACT MODE OVERRIDES
   Standard portrait widget embedded inline.
   Inherits passthrough-mode pill-on-focus behavior.
   ============================================ */

.chat-popup.contact-mode {
    border-radius: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden !important;
    isolation: isolate !important;
}

.chat-popup.contact-mode::before {
    display: none !important;
    content: none !important;
}
.chat-popup.contact-mode::after {
    display: none !important;
    content: none !important;
}

.chat-popup.contact-mode .inner-glow,
.chat-popup.contact-mode .mouse-gradient,
.chat-popup.contact-mode .bottom-gradient-overlay {
    display: none !important;
}

.chat-popup.contact-mode .chat-controls {
    display: none !important;
}

.chat-popup.contact-mode .passthrough-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    left: auto !important;
    right: auto !important;
    position: relative !important;
}
.chat-popup.contact-mode .passthrough-container::after {
    display: none !important;
    content: none !important;
}

.chat-popup.contact-mode .passthrough-chat {
    padding: 50px 36px 156px 36px !important;
    overflow-y: auto !important;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%) !important;
    z-index: 1200 !important;
}

.chat-popup.contact-mode .input-chin {
    height: var(--input-chin-height) !important;
    padding: 10px 36px 24px 36px !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    left: auto !important;
    right: auto !important;
    position: absolute !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    z-index: 120 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
}
.chat-popup.contact-mode .input-chin::before {
    display: none !important;
    content: none !important;
}
.chat-popup.contact-mode .contact-flow-top-blur {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
}
.chat-popup.contact-mode .contact-flow-bottom-blur {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 98px !important;
    z-index: 110 !important;
    pointer-events: none !important;
    background: linear-gradient(
        to bottom,
        rgba(214, 224, 240, 0) 0%,
        rgba(208, 220, 240, 0.22) 44%,
        rgba(198, 212, 238, 0.54) 100%
    ) !important;
    -webkit-backdrop-filter: blur(9px) saturate(140%) !important;
    backdrop-filter: blur(9px) saturate(140%) !important;
    -webkit-mask-image: radial-gradient(145% 110% at 50% 100%, rgba(0,0,0,1) 24%, rgba(0,0,0,0.86) 50%, rgba(0,0,0,0.3) 78%, rgba(0,0,0,0) 100%) !important;
    mask-image: radial-gradient(145% 110% at 50% 100%, rgba(0,0,0,1) 24%, rgba(0,0,0,0.86) 50%, rgba(0,0,0,0.3) 78%, rgba(0,0,0,0) 100%) !important;
}
.chat-popup.contact-mode .input-wrapper {
    max-width: none !important;
    width: 100% !important;
    position: relative !important;
    z-index: 121 !important;
    background: rgba(236, 240, 248, 0.36) !important;
    -webkit-backdrop-filter: blur(14px) saturate(155%) !important;
    backdrop-filter: blur(14px) saturate(155%) !important;
    border: 1px solid rgba(255, 255, 255, 0.52) !important;
    border-radius: 26px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    overflow: hidden !important;
}
.chat-popup.contact-mode .prompt-suggestions-wrapper {
    left: 0 !important;
    right: 0 !important;
    max-width: 680px !important;
}

@media (min-width: 769px) {
    .chat-popup.contact-mode .prompt-suggestions-wrapper {
        left: 36px !important;
        right: 36px !important;
        border-radius: 26px;
        background: transparent !important;
        box-shadow: none !important;
    }
    .chat-popup.contact-mode .prompt-suggestions-wrapper::before,
    .chat-popup.contact-mode .prompt-suggestions-wrapper::after {
        display: none !important;
        content: none !important;
    }

    .chat-popup.contact-mode .prompt-suggestions-container {
        -webkit-mask-image: none !important;
        mask-image: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Contact prompt pills: guaranteed glass feel (incl. Chrome fallback) */
.chat-popup.contact-mode .prompt-suggestion,
.chat-popup.contact-mode .prompt-suggestion-locked {
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    background: linear-gradient(135deg, rgba(243, 246, 251, 0.76), rgba(232, 238, 247, 0.58)) !important;
    border: 1px solid rgba(246, 249, 255, 0.8) !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.52), 0 2px 6px rgba(0,0,0,0.08) !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease !important;
}
.chat-popup.contact-mode .prompt-suggestion:hover,
.chat-popup.contact-mode .prompt-suggestion-locked:hover {
    background: linear-gradient(135deg, rgba(248, 250, 254, 0.78), rgba(238, 243, 250, 0.62)) !important;
    border-color: rgba(249, 252, 255, 0.84) !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.52), 0 2px 6px rgba(0,0,0,0.08) !important;
    transform: none !important;
}
/* Contact prompts: apply hover treatment to the whole strip (not per-pill spotlight). */
.chat-popup.contact-mode .prompt-suggestions-wrapper:hover .prompt-suggestion,
.chat-popup.contact-mode .prompt-suggestions-wrapper:hover .prompt-suggestion-locked {
    background: linear-gradient(135deg, rgba(249, 252, 255, 0.8), rgba(239, 245, 252, 0.64)) !important;
    border-color: rgba(250, 253, 255, 0.88) !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.58), 0 2px 6px rgba(0,0,0,0.08) !important;
}
.chat-popup.contact-mode .glass-input {
    background: rgba(255, 255, 255, 0.06) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    backdrop-filter: blur(0px) !important;
    border: none !important;
}
body.is-chrome .chat-popup.contact-mode .input-wrapper {
    /* Chrome-safe fallback when backdrop-filter compositing drops */
    background: linear-gradient(135deg, rgba(236, 240, 248, 0.56), rgba(226, 233, 246, 0.46)) !important;
    border: 1px solid rgba(255, 255, 255, 0.58) !important;
}
body.is-chrome .chat-popup.contact-mode .contact-flow-top-blur {
    background: linear-gradient(
        to bottom,
        rgba(238, 242, 248, 0.56) 0%,
        rgba(226, 234, 246, 0.28) 38%,
        rgba(238, 240, 244, 0) 100%
    ) !important;
}
body.is-chrome .chat-popup.contact-mode .contact-flow-bottom-blur {
    background: linear-gradient(
        to bottom,
        rgba(214, 224, 240, 0) 0%,
        rgba(208, 220, 240, 0.24) 44%,
        rgba(198, 212, 238, 0.56) 100%
    ) !important;
}
.chat-popup.contact-mode.flow-active .input-chin,
.chat-popup.contact-mode #inputChin {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.chat-popup.contact-mode .rtr-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
}

.chat-popup.contact-mode .gallery-card {
    aspect-ratio: 5/2 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}

.chat-popup.contact-mode .gallery-card img {
    border-radius: 16px !important;
}

.chat-popup.contact-mode .gallery-card .blur-overlay {
    height: 70% !important;
    border-radius: 0 0 16px 16px !important;
}

.chat-popup.contact-mode .gallery-card .dark-overlay {
    height: 60% !important;
    border-radius: 0 0 16px 16px !important;
}

.chat-popup.contact-mode .gallery-card .card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 12px !important;
    letter-spacing: 0.01em !important;
}

.chat-popup.contact-mode .gallery-card .card-spotlight {
    border-radius: 16px !important;
}

.chat-popup.contact-mode .message-bubble.assistant {
    font-size: 14px !important;
    padding: 8px 14px !important;
}

.chat-popup.contact-mode .message-avatar {
    width: 32px !important;
    height: 32px !important;
}
.chat-popup.contact-mode .message-row:has(.rtr-gallery-grid) .message-avatar {
    display: none !important;
}
.chat-popup.contact-mode .message-row:has(.rtr-gallery-grid) .rtr-gallery-grid {
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    .chat-popup.contact-mode {
        border-radius: 24px !important;
    }
    .chat-popup.contact-mode .passthrough-container {
        border-radius: 24px !important;
        overflow: hidden !important;
    }
    .chat-popup.contact-mode .passthrough-chat {
        padding: 32px 12px 146px 12px !important;
    }
    .chat-popup.contact-mode .rtr-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .chat-popup.contact-mode .gallery-card {
        aspect-ratio: 3/2 !important;
        border-radius: 12px !important;
    }
    .chat-popup.contact-mode .gallery-card img {
        border-radius: 12px !important;
    }
    .chat-popup.contact-mode .gallery-card .blur-overlay,
    .chat-popup.contact-mode .gallery-card .dark-overlay {
        border-radius: 0 0 12px 12px !important;
    }
    .chat-popup.contact-mode .gallery-card .card-title {
        font-size: 11px !important;
        padding: 5px 6px !important;
    }
    .chat-popup.contact-mode .gallery-card .card-spotlight {
        border-radius: 12px !important;
    }
    .chat-popup.contact-mode .input-chin {
        height: var(--input-chin-height-mobile) !important;
        min-height: var(--input-chin-height-mobile) !important;
        padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0)) 12px !important;
        max-width: none !important;
        margin: 0 auto !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    .chat-popup.contact-mode .contact-flow-bottom-blur {
        display: none !important;
        content: none !important;
    }
    .chat-popup.contact-mode .input-wrapper {
        border-radius: 24px !important;
        min-height: var(--input-field-height-mobile) !important;
        background: rgba(236, 240, 248, 0.42) !important;
        -webkit-backdrop-filter: blur(16px) saturate(155%) !important;
        backdrop-filter: blur(16px) saturate(155%) !important;
        border: 1px solid rgba(255, 255, 255, 0.56) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
    }
    .chat-popup.contact-mode .input-wrapper::after {
        border-radius: 24px !important;
        opacity: 0.55 !important;
    }
    .chat-popup.contact-mode .glass-input {
        border-radius: 24px !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
        padding: 0 52px 0 16px !important;
    }
    .chat-popup.contact-mode .glass-input::placeholder {
        font-size: 17px !important;
        color: transparent !important;
    }
    .chat-popup.contact-mode .glass-input:focus::placeholder {
        color: rgba(90, 90, 95, 0.7) !important;
    }
    .chat-popup.contact-mode .submit-btn {
        border-radius: 22px !important;
    }
    .chat-popup.contact-mode .prompt-suggestions-wrapper {
        bottom: calc(100% - 30px) !important;
        border-radius: 24px !important;
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    .chat-popup.contact-mode .prompt-suggestions-container {
        padding: 8px 0 !important;
        margin: -8px 0 !important;
    }
    .chat-popup.contact-mode .prompt-suggestion,
    .chat-popup.contact-mode .prompt-suggestion-locked {
        -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
        backdrop-filter: blur(18px) saturate(160%) !important;
        background: linear-gradient(135deg, rgba(246, 249, 253, 0.78), rgba(236, 242, 250, 0.62)) !important;
    }
    .chat-popup.contact-mode.input-focused .prompt-suggestions-wrapper {
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }
    .chat-popup.contact-mode .message-bubble.assistant {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
    .chat-popup.contact-mode .message-avatar {
        width: 24px !important;
        height: 24px !important;
    }
    .chat-popup.contact-mode .message-row:has(.rtr-gallery-grid) .message-avatar {
        display: none !important;
    }
}

/* Desktop contact prompts: match production glass (no blue cast, no per-pill hover jitter) */
@media (min-width: 769px) {
    .chat-popup.contact-mode .prompt-suggestion,
    .chat-popup.contact-mode .prompt-suggestion-locked,
    body.is-chrome .chat-popup.contact-mode .prompt-suggestion,
    body.is-chrome .chat-popup.contact-mode .prompt-suggestion-locked {
        background: linear-gradient(135deg, rgba(243, 246, 251, 0.76), rgba(232, 238, 247, 0.58)) !important;
        border: 1px solid rgba(246, 249, 255, 0.8) !important;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        transition: background 0.14s linear, border-color 0.14s linear !important;
    }

    .chat-popup.contact-mode .prompt-suggestion:hover,
    .chat-popup.contact-mode .prompt-suggestion-locked:hover {
        background: linear-gradient(135deg, rgba(248, 250, 254, 0.78), rgba(238, 243, 250, 0.62)) !important;
        border-color: rgba(249, 252, 255, 0.84) !important;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    .chat-popup.contact-mode .prompt-suggestions-wrapper:hover .prompt-suggestion,
    .chat-popup.contact-mode .prompt-suggestions-wrapper:hover .prompt-suggestion-locked {
        background: linear-gradient(135deg, rgba(249, 252, 255, 0.8), rgba(239, 245, 252, 0.64)) !important;
        border-color: rgba(250, 253, 255, 0.88) !important;
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.55), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    /* Safari desktop contact stability mode: remove compositing-heavy masks. */
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-container {
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-wrapper {
        background: transparent !important;
        box-shadow: none !important;
    }

    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-wrapper::before,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-wrapper::after {
        display: none !important;
        content: none !important;
    }

    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestion,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestion-locked,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestion:hover,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestion-locked:hover,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-wrapper:hover .prompt-suggestion,
    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-wrapper:hover .prompt-suggestion-locked {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: linear-gradient(135deg, rgba(236, 240, 248, 0.92), rgba(226, 233, 244, 0.88)) !important;
        border-color: rgba(246, 249, 255, 0.8) !important;
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.52), 0 2px 6px rgba(0,0,0,0.08) !important;
        transform: none !important;
        transition: none !important;
    }

    .chat-popup.contact-mode.safari-stable-prompts .prompt-suggestions-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestion,
    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestion-locked,
    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestion:hover,
    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestion-locked:hover,
    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestions-wrapper:hover .prompt-suggestion,
    .chat-popup.passthrough-mode.safari-stable-prompts .prompt-suggestions-wrapper:hover .prompt-suggestion-locked {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: linear-gradient(135deg, rgba(236, 240, 248, 0.92), rgba(226, 233, 244, 0.88)) !important;
        transition: none !important;
    }
}

/* Mobile polish: normalize bubble/card radii to prevent odd corner rendering */
@media (max-width: 768px) {
    .chat-popup.contact-mode .message-bubble.assistant,
    .chat-popup.immersive-mode .message-bubble.assistant {
        border-radius: 20px !important;
    }

    .chat-popup.contact-mode .gallery-card,
    .chat-popup.contact-mode .gallery-card img,
    .chat-popup.contact-mode .gallery-card .card-spotlight {
        border-radius: 14px !important;
    }

    .chat-popup.contact-mode .gallery-card .blur-overlay,
    .chat-popup.contact-mode .gallery-card .dark-overlay {
        border-radius: 0 0 14px 14px !important;
    }
}

/* Contact mode: transparent category header bg (no opaque gradient) */
.chat-popup.contact-mode .cat-header-bg {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Contact mode: protect product/quote tabs from cards behind them */
.chat-popup.contact-mode .category-sticky-header {
    top: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2200 !important;
    isolation: isolate !important;
    position: relative !important;
    background: transparent !important;
}
.chat-popup.contact-mode .category-sticky-header .inline-cat-chips {
    padding: 0 0 10px !important;
    margin: 0 !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    z-index: 2201 !important;
    position: relative !important;
    align-items: center !important;
}
.chat-popup.contact-mode .category-sticky-header,
.chat-popup.contact-mode .category-sticky-header .inline-cat-chips {
    box-shadow: none !important;
}
.chat-popup.contact-mode .category-sticky-header::before {
    display: none !important;
    content: none !important;
}
.chat-popup.contact-mode .category-sticky-header .inline-cat-chip {
    position: relative !important;
    z-index: 2202 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    color: #2f2f2f !important;
    background: rgba(248, 250, 253, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.94) !important;
    text-shadow: none !important;
    filter: none !important;
}
.chat-popup.contact-mode .context-back-btn {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 2300 !important;
}

.chat-popup.contact-mode .product-section-wrap {
    position: relative !important;
    z-index: 2100 !important;
}

/* Desktop: keep category pills inline with the back button row */
@media (min-width: 769px) {
    .chat-popup.contact-mode .passthrough-chat:has(.category-sticky-header) {
        padding-top: 14px !important;
    }
    .chat-popup.contact-mode .category-sticky-header {
        top: 10px !important;
        margin-top: 0 !important;
    }
    .chat-popup.contact-mode .category-sticky-header .inline-cat-chips {
        padding-top: 0 !important;
        padding-left: 0 !important;
    }
}

/* Mobile: keep pills below back button with extra breathing room */
@media (max-width: 768px) {
    .chat-popup.contact-mode .context-back-btn {
        top: 10px !important;
        left: 10px !important;
    }
    .chat-popup.contact-mode .category-sticky-header {
        top: 14px !important;
    }
    .chat-popup.contact-mode .category-sticky-header .inline-cat-chips {
        padding-left: 20px !important;
        padding-top: 0 !important;
    }
}

/* Keep default passthrough sticky header/back button behavior in contact mode */

/* ============================================
   IMMERSIVE MODE OVERRIDES
   Activated via .immersive-mode on .chat-popup
   ============================================ */

.chat-popup.immersive-mode,
.chat-popup.expanded.immersive-mode {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 750px !important;
    height: 100% !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    touch-action: none;
    overscroll-behavior: contain;
    color: #fff !important;
}

.chat-popup.immersive-mode::before,
.chat-popup.expanded.immersive-mode::before {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.chat-popup.immersive-mode .inner-glow,
.chat-popup.immersive-mode .mouse-gradient,
.chat-popup.immersive-mode .bottom-gradient-overlay {
    display: none !important;
}

.chat-popup.immersive-mode .chat-controls {
    display: none !important;
}

.chat-popup.immersive-mode .context-back-btn {
    display: none; /* shown via .visible state from JS */
    top: 12px !important;
    left: 14px !important;
    z-index: 40 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(18, 18, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    border-radius: 9999px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.12) !important;
    -webkit-backdrop-filter: blur(14px) saturate(135%) !important;
    backdrop-filter: blur(14px) saturate(135%) !important;
}

.chat-popup.immersive-mode .context-back-btn.visible {
    display: flex !important;
}

.chat-popup.immersive-mode .context-back-btn svg,
.chat-popup.immersive-mode .context-back-btn span {
    fill: rgba(255, 255, 255, 0.92) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    opacity: 1 !important;
}

.chat-popup.immersive-mode .typebot-wrapper {
    display: none !important;
}

.chat-popup.immersive-mode .passthrough-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: calc(100% - var(--input-chin-height)) !important;
}

.chat-popup.immersive-mode .passthrough-title {
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    text-align: center !important;
}

/* During intro: hide gallery/chat/input, show only cycling title */
.chat-popup.immersive-intro .passthrough-chat {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.chat-popup.immersive-intro .input-chin {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(16px) !important;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s !important;
}

.chat-popup.immersive-mode .input-chin {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    z-index: 25 !important;
    background: transparent !important;
}

.chat-popup.immersive-mode .input-chin::before {
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.7) 100%) !important;
    height: 40% !important;
}

.chat-popup.immersive-mode .input-chin > .input-wrapper,
.chat-popup.immersive-mode .input-chin > .input-wrapper * {
    pointer-events: auto !important;
}

/* Immersive prompt wrapper — inherits passthrough focus behavior */

.chat-popup.immersive-mode .prompt-suggestions-wrapper {
    isolation: isolate;
}

.chat-popup.immersive-mode .prompt-suggestion,
.chat-popup.immersive-mode .prompt-suggestion-locked {
    will-change: transform;
    isolation: isolate;
}

.chat-popup.immersive-mode .passthrough-chat {
    padding: 16px 24px !important;
    z-index: auto !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* ---- Global white text for all immersive content ---- */
.chat-popup.immersive-mode .passthrough-chat,
.chat-popup.immersive-mode .passthrough-chat * {
    color: #fff !important;
}

/* Exceptions: elements on colored backgrounds keep dark text */
.chat-popup.immersive-mode .message-bubble.user,
.chat-popup.immersive-mode .message-bubble.user * {
    color: #1d1d1f !important;
}

.chat-popup.immersive-mode .passthrough-chat [style*="background:linear-gradient(135deg,#CCDB29"],
.chat-popup.immersive-mode .passthrough-chat [style*="background:linear-gradient(135deg, #CCDB29"],
.chat-popup.immersive-mode .passthrough-chat .action-button.primary {
    color: #1d1d1f !important;
}

.chat-popup.immersive-mode .message-bubble.assistant {
    font-size: 15px;
    line-height: 1.55;
    max-width: 85%;
    background: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(6px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(180%) !important;
    border: none !important;
    border-radius: 24px !important;
    box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.15), inset 0 -1px 2px rgba(0, 0, 0, 0.03) !important;
}

.chat-popup.immersive-mode .message-bubble.user {
    font-size: 15px;
}

/* Category chips white text */
.chat-popup.immersive-mode .inline-cat-chip {
    color: rgba(255,255,255,0.85) !important;
}

.chat-popup.immersive-mode .inline-cat-chip[style*="rgba(204,219,41"] {
    color: #fff !important;
}

/* ---- Input: widen to match prompt buttons width ---- */
.chat-popup.immersive-mode .input-wrapper {
    max-width: none !important;
    width: 100% !important;
}

/* ---- Glass input dark glass styling ---- */
.chat-popup.immersive-mode .glass-input {
    font-size: 16px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(6px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(180%) !important;
    border: 1px solid rgba(100, 150, 255, 0.18) !important;
    border-radius: 26px !important;
    box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.2), inset 0 -1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Native placeholder: hidden when unfocused (shimmer shows), white when focused */
.chat-popup.immersive-mode .glass-input::placeholder {
    color: transparent !important;
}

.chat-popup.immersive-mode .glass-input:focus::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

.chat-popup.immersive-mode .glass-input:focus {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(100, 150, 255, 0.35) !important;
}

/* Decorative shimmer placeholder — white tones */
.chat-popup.immersive-mode .decorative-placeholder {
    color: rgba(255,255,255,0.5) !important;
}

.chat-popup.immersive-mode .shimmer-word {
    color: rgba(255,255,255,0.7) !important;
    background: linear-gradient(90deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.4) 100%) !important;
    background-size: 200% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.chat-popup.immersive-mode .submit-btn svg path {
    stroke: rgba(255,255,255,0.7) !important;
}

.chat-popup.immersive-mode .message-avatar img {
    filter: brightness(1.2);
}

/* ---- Input wrapper spotlight override for dark bg ---- */
.chat-popup.immersive-mode .input-wrapper::after {
    display: none !important;
}

@media (max-width: 768px) {
    .chat-popup.immersive-mode,
    .chat-popup.expanded.immersive-mode {
        max-width: none !important;
        border-radius: 0 !important;
    }

    .chat-popup.immersive-mode .passthrough-container {
        height: calc(100% - var(--input-chin-height-mobile)) !important;
    }

    .chat-popup.immersive-mode .passthrough-chat {
        padding: 12px 16px !important;
    }
}

/* Immersive category sticky header: black gradient, square top edge, flush */
.chat-popup.immersive-mode .category-sticky-header {
    top: 0 !important;
    border-radius: 0 !important;
    margin: 0 -20px !important;
    padding: 0 20px !important;
    z-index: 55 !important;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%) !important;
}

.chat-popup.immersive-mode .product-section-wrap,
.chat-popup.immersive-mode .product-selector-wrap {
    margin-top: 0 !important;
}

.chat-popup.immersive-mode .explorer-grid-wrap {
    padding-top: 10px !important;
}

/* Install quote card — full width, reduced opacity, white text for immersive */
.chat-popup.immersive-mode .install-quote-row {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}
.chat-popup.immersive-mode .install-quote-row .message-avatar {
    display: none !important;
}
.chat-popup.immersive-mode .install-quote-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08)) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
    width: 100% !important;
    max-width: 100% !important;
}
.chat-popup.immersive-mode .install-quote-card * {
    color: rgba(255,255,255,0.9) !important;
}
.chat-popup.immersive-mode .install-quote-card span[style*="color:#9FAF00"],
.chat-popup.immersive-mode .install-quote-card span[style*="color: #9FAF00"] {
    color: #CCDB29 !important;
}

/* Push category pills below top-left back button area */
.chat-popup.immersive-mode .category-sticky-header .inline-cat-chips {
    padding-top: 44px !important;
}

/* Immersive: dark header background instead of light */
.chat-popup.immersive-mode .cat-header-bg {
    background: rgba(0,0,0,1) !important;
}

/* Immersive prompt overflow edge fades (left/right) */
.chat-popup.immersive-mode .prompt-suggestions-wrapper::before,
.chat-popup.immersive-mode .prompt-suggestions-wrapper::after {
    display: none !important;
    content: none !important;
}

.chat-popup.immersive-mode .prompt-suggestions-container {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.92) 2%, black 5%, black 95%, rgba(0, 0, 0, 0.92) 98%, transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.92) 2%, black 5%, black 95%, rgba(0, 0, 0, 0.92) 98%, transparent 100%) !important;
}

/* Disable desktop scroll chevron blocks in immersive */
.chat-popup.immersive-mode .prompt-scroll-btn,
.chat-popup.immersive-mode .prompt-suggestions-wrapper.can-scroll-left .prompt-scroll-btn.left,
.chat-popup.immersive-mode .prompt-suggestions-wrapper.can-scroll-right .prompt-scroll-btn.right {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.chat-popup.immersive-mode .prompt-suggestions-wrapper.can-scroll-left .prompt-suggestions-container,
.chat-popup.immersive-mode .prompt-suggestions-wrapper.can-scroll-right .prompt-suggestions-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* Ensure category pills keep blur + shadow in immersive (including Chrome) */
.chat-popup.immersive-mode .inline-cat-chip {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.26), 0 4px 10px rgba(0,0,0,0.22) !important;
}

body.is-chrome .chat-popup.immersive-mode .inline-cat-chip {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
    background: rgba(255, 255, 255, 0.18) !important;
}

body.is-chrome .chat-popup.immersive-mode .inline-cat-chip[style*="rgba(204,219,41"] {
    background: linear-gradient(135deg, rgba(204,219,41,0.34), rgba(159,175,0,0.26)) !important;
}

/* Immersive gallery: portrait cards handled by inline JS pixel heights */

.chat-popup.immersive-mode .message-row {
    max-width: 100% !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .chat-popup.immersive-mode .rtr-gallery-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px !important;
        padding: 0 4px !important;
    }
    .chat-popup.immersive-mode .rtr-gallery-grid::-webkit-scrollbar { display: none; }

    .chat-popup.immersive-mode .gallery-card {
        flex: 0 0 55% !important;
        min-width: 55% !important;
        max-height: 160px !important;
        aspect-ratio: 4 / 3 !important;
    }
}

/* Immersive prompt pills: white text + lighter white glass + blur */
.chat-popup.immersive-mode .prompt-suggestion,
.chat-popup.immersive-mode .prompt-suggestion-locked {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.38) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
}

.chat-popup.immersive-mode .prompt-suggestion:hover,
.chat-popup.immersive-mode .prompt-suggestion-locked:hover {
    color: rgba(255, 255, 255, 0.98) !important;
    background: rgba(255, 255, 255, 0.24) !important;
    border-color: rgba(204, 219, 41, 0.55) !important;
}

/* Chrome: force blur back on for immersive prompt pills + category chips */
body.is-chrome .chat-popup.immersive-mode .prompt-suggestion,
body.is-chrome .chat-popup.immersive-mode .prompt-suggestion-locked {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
    background: rgba(255, 255, 255, 0.18) !important;
}

body.is-chrome .chat-popup.immersive-mode .context-back-btn {
    -webkit-backdrop-filter: blur(14px) saturate(135%) !important;
    backdrop-filter: blur(14px) saturate(135%) !important;
}

/* ---- Install quote card internal borders for dark bg ---- */
.chat-popup.immersive-mode .install-quote-card div[style*="border-bottom:1px solid rgba(0,0,0"] {
    border-bottom-color: rgba(255,255,255,0.12) !important;
}
.chat-popup.immersive-mode .install-quote-card div[style*="border-top:1px solid rgba(0,0,0"] {
    border-top-color: rgba(255,255,255,0.15) !important;
}

/* ---- Two-column quick answer tiles for dark bg ---- */
.chat-popup.immersive-mode .rtr-quick-answer-tile {
    background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08)) !important;
    border-color: rgba(255,255,255,0.30) !important;
    color: rgba(255,255,255,0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18), inset 0 1px 2px rgba(255,255,255,0.18) !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
}
.chat-popup.immersive-mode .rtr-quick-answer-tile span {
    color: rgba(255,255,255,0.95) !important;
}
.chat-popup.immersive-mode .rtr-quick-answer-tile:hover {
    border-color: rgba(204,219,41,0.6) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15), 0 0 16px rgba(204,219,41,0.25), inset 0 1px 2px rgba(255,255,255,0.35) !important;
}

body.is-chrome .chat-popup.immersive-mode .rtr-quick-answer-tile {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
    background: rgba(255,255,255,0.16) !important;
}

/* ---- Year grid glass buttons for immersive dark bg ---- */
.chat-popup.immersive-mode .passthrough-chat button[style*="GLASS_BTN"],
.chat-popup.immersive-mode .passthrough-chat [style*="rgba(255,255,255,0.22)"][style*="border-radius:20px"],
.chat-popup.immersive-mode .passthrough-chat [style*="rgba(255,255,255,0.22)"][style*="border-radius:24px"],
.chat-popup.immersive-mode .passthrough-chat .message-row.action-buttons .rtr-action-btn--secondary,
.chat-popup.immersive-mode .passthrough-chat .message-row.action-buttons .rtr-action-btn--secondary * {
    background: rgba(220, 220, 224, 0.55) !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
}
.chat-popup.immersive-mode .passthrough-chat .message-row.action-buttons .rtr-action-btn--primary,
.chat-popup.immersive-mode .passthrough-chat .message-row.action-buttons .rtr-action-btn--primary * {
    color: #1d1d1f !important;
    -webkit-text-fill-color: #1d1d1f !important;
}

/* ---- Savings / RTR green text preserved in immersive ---- */
.chat-popup.immersive-mode .passthrough-chat span[style*="color:#9FAF00"],
.chat-popup.immersive-mode .passthrough-chat span[style*="color: #9FAF00"],
.chat-popup.immersive-mode .passthrough-chat [style*="color:#CCDB29"],
.chat-popup.immersive-mode .passthrough-chat [style*="color: #CCDB29"] {
    color: #CCDB29 !important;
}

/* ---- Action buttons in immersive ---- */
.chat-popup.immersive-mode .action-button {
    color: rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.14) !important;
    border-color: rgba(255,255,255,0.30) !important;
}
.chat-popup.immersive-mode .action-button.primary {
    background: linear-gradient(135deg, #CCDB29, #9FAF00) !important;
    color: #1d1d1f !important;
    border-color: rgba(204,219,41,0.6) !important;
}

/* ============================================
   IMMERSIVE INTRO — Cinematic Apple-Style Welcome
   Staggered 3D reveal: logo → ring → title → sub.
   Uses transform + opacity only (no filter:blur).
   ============================================ */
.immersive-intro-curtain {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at 50% 42%, rgba(10,10,10,0.55) 0%, rgba(4,4,4,0.82) 55%, rgba(0,0,0,0.96) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    perspective: 1400px;
    opacity: 1;
    transition: opacity 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.immersive-intro-curtain.fade-out {
    opacity: 0;
    transition: opacity 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transform: perspective(1400px) translateZ(-400px) scale(0.6);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.intro-hero-text.revealed {
    transform: perspective(1400px) translateZ(0) scale(1);
    opacity: 1;
}
.intro-hero-text.shimmer-out {
    transform: perspective(1400px) translateZ(80px) scale(1.06);
    opacity: 0;
    transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.intro-hero-text.shimmer-out .intro-hello-line {
    animation: outroShimmerFlash 1.0s ease-out forwards;
}
.intro-hero-text.shimmer-out .intro-logo-wrap {
    opacity: 0;
    transform: scale(0.7) translateY(-10px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.intro-hero-text.shimmer-out .intro-sub-line {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes outroShimmerFlash {
    0%   { background-position: -100% 50%; opacity: 1; }
    50%  { background-position: 50% 50%; opacity: 0.7; }
    100% { background-position: 200% 50%; opacity: 0; }
}

/* Logo container with animated glow ring */
.intro-logo-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.4) translateY(20px);
    transition: opacity 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
    margin-bottom: 16px;
}
.intro-hero-text.revealed .intro-logo-wrap {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.intro-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(204,219,41,0.25);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.8s ease 0.4s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
    animation: none;
}
.intro-hero-text.revealed .intro-logo-ring {
    opacity: 1;
    transform: scale(1);
    animation: introRingPulse 3s ease-in-out infinite 1.2s;
}

.intro-logo-ring::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(204,219,41,0.08);
    opacity: 0;
    transition: opacity 1s ease 0.8s;
}
.intro-hero-text.revealed .intro-logo-ring::after {
    opacity: 1;
}

@keyframes introRingPulse {
    0%, 100% { border-color: rgba(204,219,41,0.2); box-shadow: 0 0 20px rgba(204,219,41,0.05); }
    50%      { border-color: rgba(204,219,41,0.5); box-shadow: 0 0 40px rgba(204,219,41,0.12), 0 0 80px rgba(204,219,41,0.04); }
}

.intro-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.intro-hello-line {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
    font-size: clamp(38px, 8vw, 64px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
    background: linear-gradient(
        105deg,
        rgba(255,255,255,0.45) 0%,
        #fff 20%,
        rgba(204,219,41,0.55) 48%,
        #fff 76%,
        rgba(255,255,255,0.45) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: introShimmer 3.5s ease-in-out infinite;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
                transform 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}
.intro-hero-text.revealed .intro-hello-line {
    opacity: 1;
    transform: translateY(0);
}

.intro-sub-line {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    color: rgba(255,255,255,0.12);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.65s,
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.65s,
                color 2s ease 1s;
}
.intro-hero-text.revealed .intro-sub-line {
    opacity: 1;
    transform: translateY(0);
    color: rgba(255,255,255,0.45);
}

@keyframes introShimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: -200% 50%; }
}

/* Hide input chin during intro — slides up after dissolve */
.chat-popup.immersive-mode.intro-playing .input-chin {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(24px) !important;
}
.chat-popup.immersive-mode .input-chin {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* Hide content during intro with graceful fade-in */
.chat-popup.immersive-mode.intro-playing .passthrough-container,
.chat-popup.immersive-mode.intro-playing .passthrough-title,
.chat-popup.immersive-mode.intro-playing .passthrough-chat {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
.chat-popup.immersive-mode .passthrough-container {
    transition: opacity 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
                visibility 0s linear 0s;
}

@media (max-width: 768px) {
    .intro-hello-line {
        font-size: clamp(30px, 10vw, 48px);
    }
    .intro-sub-line {
        font-size: clamp(13px, 3.5vw, 18px);
    }
    .intro-logo-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    .intro-logo-img {
        width: 42px;
        height: 42px;
    }
}

/* ============================================
   IMMERSIVE 3D BACKGROUND — Canvas + Vignette
   ============================================ */
#immersiveBg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.immersive-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: 0 0 28px 28px;
    background:
        linear-gradient(to right,
            rgba(10,10,10,0.50) 0%,
            rgba(10,10,10,0.15) 8%,
            transparent 18%,
            transparent 82%,
            rgba(10,10,10,0.15) 92%,
            rgba(10,10,10,0.50) 100%
        ),
        linear-gradient(to top,
            rgba(10,10,10,0.55) 0%,
            rgba(10,10,10,0.20) 12%,
            transparent 30%
        );
}

.chat-popup.immersive-mode .passthrough-container,
.chat-popup.immersive-mode .input-chin,
.chat-popup.immersive-mode .context-back-btn,
.chat-popup.immersive-mode .chat-controls {
    z-index: 10;
    position: relative;
}

.chat-popup.immersive-mode .immersive-intro-curtain {
    z-index: 9999;
}
