/* ============================================================ DEFENSIVE BASELINE (v3.2.15, plan-52fd4c) The widget renders in the host page DOM with no isolation layer, so host-theme CSS bleeds into it. This block is a scoped floor: (1) border-box everywhere inside the widget (themes that set *{box-sizing:content-box} otherwise break every fixed-size element); (2) a specificity-0 reset via :where() of exactly the properties themes commonly weaponize on form/button elements. :where() keeps specificity at zero, so every later widget rule AND any customer custom CSS still wins unchanged — the reset only fills gaps where we currently set nothing. Scoped: nothing here can leak onto the host page. Deliberately NOT Shadow DOM / @layer / !important. ============================================================ */ .mxchat-chatbot-wrapper, .mxchat-chatbot-wrapper *, .mxchat-chatbot-wrapper *::before, .mxchat-chatbot-wrapper *::after, .floating-chatbot, .floating-chatbot *, .floating-chatbot *::before, .floating-chatbot *::after { box-sizing: border-box; } .mxchat-chatbot-wrapper :where(button, input, select, textarea) { font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; text-transform: none; letter-spacing: normal; min-height: 0; max-width: none; background-image: none; text-shadow: none; float: none; } .mxchat-chatbot-wrapper :where(button) { width: auto; } /* ======================================== NOTIFICATION SYSTEM ======================================== */ .chat-notification-badge { animation: notification-pulse 2s infinite; box-shadow: 0 0 0 rgba(255, 68, 68, 0.4); transition: all 0.3s ease; } @keyframes notification-pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); } } /* ======================================== EMAIL COLLECTION SYSTEM ======================================== */ .email-blocker { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; padding: 30px 20px; max-width: 100%; margin: auto; text-align: center; animation: fadeIn 0.5s ease-in-out; } .email-blocker-header { margin-bottom: 20px; } .email-blocker-logo { max-width: 80px; margin-bottom: 10px; } .email-blocker h2 { font-size: 24px; font-weight: bold; color: #333333; margin-bottom: 10px; } .email-blocker p { font-size: 16px; color: #555555; margin-bottom: 20px; } .email-blocker input[type="email"], .email-blocker .mxchat-name-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; color: #333333; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); transition: border-color 0.3s, box-shadow 0.3s; } .email-blocker input[type="email"]:focus, .email-blocker .mxchat-name-input:focus { border-color: #0073aa; box-shadow: 0 0 8px rgba(0, 115, 170, 0.3); outline: none; } .email-blocker button { background-color: #0073aa; color: #ffffff; padding: 12px 20px; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; width: 100%; transition: background-color 0.3s, transform 0.2s; } .email-blocker button:hover { background-color: #005177; transform: translateY(-2px); } .email-blocker-footer { margin-top: 20px; font-size: 12px; color: #888888; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .mxchat-chatbot-wrapper { display: none; } /* ======================================== SEARCH RESULTS SYSTEM ======================================== */ .chatbot-title-icon { width: 24px; height: 24px; object-fit: contain; } .wp-admin .mxchat-search-results, .wp-content .mxchat-search-results, .site-content .mxchat-search-results, .mxchat-search-results { display: flex; flex-direction: column; gap: 20px; margin: 15px 0; font-size: 14px !important; } .mxchat-search-intro { font-size: 16px !important; margin: 0 0 15px 0 !important; line-height: 1.4 !important; font-weight: normal !important; } .mxchat-search-item { padding: 15px !important; border-radius: 8px !important; background: #ffffff !important; border: 1px solid rgba(0, 0, 0, 0.1) !important; } .mxchat-search-header { display: flex !important; align-items: center !important; gap: 8px !important; margin-bottom: 8px !important; } .mxchat-site-icon { width: 16px !important; height: 16px !important; flex-shrink: 0 !important; } .mxchat-site-url { font-size: 13px !important; color: #555 !important; line-height: 1 !important; } .mxchat-search-content { display: flex !important; flex-direction: column !important; gap: 10px !important; } .mxchat-search-title { font-size: 16px !important; line-height: 1.4 !important; margin: 0 !important; padding: 0 !important; font-weight: 600 !important; } .mxchat-search-title a { text-decoration: none !important; color: #000 !important; } .mxchat-search-title a:hover { text-decoration: underline !important; } .mxchat-search-thumbnail { max-width: 200px !important; margin: 10px 0 !important; } .mxchat-search-thumbnail img { max-width: 100% !important; height: auto !important; border-radius: 4px !important; } .mxchat-search-description { font-size: 14px !important; line-height: 1.6 !important; color: #333 !important; margin: 0 !important; padding: 0 !important; } /* ======================================== ENHANCED HEADINGS & TEXT STYLING ======================================== */ .bot-message .chat-heading { color: inherit; margin: 16px 0 12px 0 !important; font-weight: bold !important; line-height: 1.3 !important; } .bot-message h1.chat-heading, .chat-heading-1 { font-size: 1.5em !important; border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important; padding-bottom: 8px !important; } .bot-message h2.chat-heading, .chat-heading-2 { font-size: 1.25em !important; border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important; padding-bottom: 6px !important; } .bot-message h3.chat-heading, .chat-heading-3 { font-size: 1.125em !important; } .bot-message h4.chat-heading, .chat-heading-4 { font-size: 1em !important; } .bot-message h5.chat-heading, .chat-heading-5 { font-size: 0.875em !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; } .bot-message h6.chat-heading, .chat-heading-6 { font-size: 0.75em !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; } .bot-message strong { font-weight: bold !important; } .bot-message em { font-style: italic !important; } .bot-message del { text-decoration: line-through !important; opacity: 0.7; } /* ======================================== CODE BLOCKS & INLINE CODE ======================================== */ .mxchat-table-wrapper { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; } .mxchat-table { width: 100%; border-collapse: collapse; font-size: 0.9em; line-height: 1.4; } .mxchat-table th, .mxchat-table td { padding: 8px 12px; border: 1px solid rgba(128, 128, 128, 0.3); word-break: break-word; } .mxchat-table thead th { font-weight: 600; background: rgba(128, 128, 128, 0.15); } .mxchat-table tbody tr:nth-child(even) { background: rgba(128, 128, 128, 0.05); } .mxchat-code-block-container { margin: 16px 0; border-radius: 8px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); overflow: hidden; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace; } .mxchat-code-header { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.15); padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); font-size: 11px; min-height: 36px; } .mxchat-code-language { color: rgba(255, 255, 255, 0.8); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 10px; } .mxchat-copy-button { background: rgba(255, 255, 255, 0.2); color: white; border: 1px solid rgba(255, 255, 255, 0.3); padding: 4px 8px; border-radius: 4px; font-size: 10px; cursor: pointer; transition: all 0.2s ease; min-height: 24px; line-height: 1; } .mxchat-copy-button:hover { background: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.4); } .mxchat-copy-button:active { background: rgba(255, 255, 255, 0.4); } .mxchat-code-block { margin: 0; padding: 16px; background: rgba(0, 0, 0, 0.3); overflow-x: auto; font-size: 13px; line-height: 1.4; white-space: pre; border: none; } .mxchat-code-block code { font-family: inherit; font-size: inherit; background: none !important; padding: 0 !important; border: none !important; color: rgba(255, 255, 255, 0.95) !important; display: block; } .mxchat-inline-code { background: rgba(255, 255, 255, 0.2) !important; padding: 2px 6px !important; border-radius: 3px !important; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace !important; font-size: 0.85em !important; color: #81c784 !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; } /* ======================================== TOOLBAR SYSTEM ======================================== */ .active-pdf-container, .active-word-container { display: inline-flex; align-items: center; max-width: 200px; margin: 0; padding: 0; line-height: 13px; } .active-pdf-name, .active-word-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .remove-pdf-btn, .remove-word-btn, .toolbar-perplexity { background: none; border: none; padding: 2px; margin-left: 4px; cursor: pointer; transition: opacity 0.2s; line-height: 13px; } .remove-pdf-btn:hover, .remove-word-btn:hover, .toolbar-perplexity:hover { opacity: 1; background: none; } .mxchat-chatbot .chat-toolbar { display: flex; gap: 10px; padding: 8px; background: none; align-items: end; } .mxchat-chatbot .toolbar-btn { background: none; border: none; padding: 0; cursor: pointer; width: 16px; height: 16px; align-items: center; justify-content: center; opacity: 0.6; transition: opacity 0.2s; margin: 0; min-width: 0; box-shadow: none; } .mxchat-chatbot .toolbar-btn svg { width: 100%; height: 100%; } .mxchat-chatbot .toolbar-btn:hover { opacity: 1; background: none; border: none; box-shadow: none; } .mxchat-chatbot .toolbar-btn:disabled { opacity: 0.3; cursor: not-allowed; background: none; border: none; } .toolbar-btn.active { background-color: rgba(120, 115, 245, 0.2); box-shadow: 0 0 0 2px rgba(120, 115, 245, 0.4); } .active-perplexity-container { display: flex; align-items: center; margin-left: 8px; font-size: 12px; } .perplexity-search-btn { display: none; } .perplexity-search-btn.active { opacity: 1; } /* ======================================== POPULAR QUESTIONS SYSTEM ======================================== */ .mxchat-popular-questions { padding: 0 10px 10px; transition: all 0.3s ease; margin-bottom: 12px; position: relative; } .mxchat-popular-questions-title { font-size: 14px; line-height: 24px; font-weight: bold; color: #212121; margin-bottom: 10px; } .mxchat-popular-questions-container { position: relative; display: flex; flex-direction: column; max-height: 200px; overflow-y: auto; padding: 0 10px 10px; scrollbar-width: thin; scrollbar-color: #212121 #f1f1f1; transition: all 0.3s ease; gap: 8px; } .mxchat-popular-questions.collapsed { padding: 0; margin: 0; } .mxchat-popular-questions.collapsed .mxchat-popular-questions-container { flex-direction: row; justify-content: center; align-items: center; padding: 0; max-height: 40px; overflow: visible; } .mxchat-popular-questions.collapsed .mxchat-popular-question { display: none; } .mxchat-popular-questions.collapsed .questions-collapse-btn { display: none; } .mxchat-popular-questions .mxchat-popular-questions-container .questions-toggle-btn { background: none; border: none; padding: 0; margin: 0; cursor: pointer; transition: all 0.2s ease; color: #212121; display: none; /* Hidden by default when open */ align-items: center; justify-content: center; width: 32px; height: 32px; box-shadow: none; outline: none; } .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn { background: none; border: none; padding: 0; margin: 0px; /* Center and add bottom margin */ cursor: pointer; transition: all 0.2s ease; color: #212121; display: none; /* Hidden by default */ align-items: center; justify-content: center; width: 32px; height: 32px; box-shadow: none; outline: none; align-self: center; /* Center in flex container */ order: -1; /* Make sure it appears first */ flex-shrink: 0; /* same flex auto-minimum caveat as .mxchat-popular-question */ } .questions-toggle-btn:hover, .questions-collapse-btn:hover, .questions-toggle-btn:focus, .questions-collapse-btn:focus, .questions-toggle-btn:active, .questions-collapse-btn:active { background: none; border: none; box-shadow: none; outline: none; } .questions-toggle-btn svg, .questions-collapse-btn svg { transition: transform 0.2s ease; fill: none; stroke: #212121; width: 25px; height: 25px; } .questions-toggle-btn:hover svg, .questions-collapse-btn:hover svg { opacity: 0.7; } .mxchat-popular-questions.collapsed .questions-toggle-btn { display: flex; } .mxchat-popular-questions.has-been-collapsed .questions-collapse-btn { display: flex; align-self: center; order: -1; } .mxchat-popular-question { padding: 12px 20px; background-color: #f5f5f5; border: 1px solid #bbb; border-radius: 8px; color: #212121; font-size: 14px; line-height: 24px; cursor: pointer; text-align: initial; transition: all 0.3s ease; margin-bottom: 0; box-shadow: none; /* The defensive baseline's min-height:0 on :where(button) removes the flex automatic minimum size, so without this the column-flex scroll container compresses all questions to fit 200px and the scrollbox never appears (plan d51560). */ flex-shrink: 0; } .mxchat-popular-question:hover { background-color: #eaeaea; border-color: #999; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); transform: translateY(-1px); } .mxchat-popular-question:focus { outline: none; background-color: #e0e0e0; border-color: #777; box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.5); } .mxchat-popular-question:active { background-color: #d8d8d8; border-color: #666; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); transform: translateY(0); } .mxchat-popular-questions-container::-webkit-scrollbar { width: 8px; } .mxchat-popular-questions-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } .mxchat-popular-questions-container::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #fa73e6, #7873f5, #3ac9d1); border-radius: 4px; } .mxchat-popular-questions-container::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #d164ce, #6568d8, #2daeb8); } /* ======================================== CORE CHATBOT UI ======================================== */ .invisible { display: none; opacity: 0; pointer-events: none; } .mxchat-chatbot{ background: #fff; overflow: hidden; position: relative; display: flex; flex-direction: column; flex-grow: 1; min-height: 0; /* Allow flex shrinking */ box-sizing: border-box; } .chat-container { display: flex; flex-direction: column; flex-grow: 1; min-height: 0; /* Critical for flex overflow scrolling */ height: 100%; } .chat-box { flex-grow: 1; overflow-y: auto; padding: 10px; margin-bottom: 0; font-size: 1rem; min-height: 0; /* Critical for flex overflow scrolling */ } .chat-box::-webkit-scrollbar { width: 5px; } .chat-box::-webkit-scrollbar-thumb { background-color: #212121; border-radius: 20px; } .bot-message, .user-message { margin-bottom: 15px; padding: 10px; display: inline-block; max-width: 85%; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); font-size: 14px; line-height: 24px; } .user-message { background: #fff; color: #212121; text-align: left; float: right; clear: both; border-radius: 18px 0 18px 18px; word-wrap: break-word; border: 1px solid rgba(226, 232, 255, 0.2); } .user-message p { margin: 0; } .mxchat-chatbot .chat-container .chat-box .bot-message { float: left; clear: both; border: 1px solid rgba(226, 232, 255, 0.2); border-radius: 0 18px 18px; background: #212121; color: #fff; overflow-x: hidden; } .mxchat-chatbot .chat-container .chat-box .agent-message { text-align: left; float: left; clear: both; border: 1px solid rgba(226, 232, 255, 0.2); border-radius: 0 18px 18px; background: #212121; color: #fff; overflow-x: hidden; margin-bottom: 15px; padding: 10px; display: inline-block; max-width: 85%; font-size: 14px; line-height: 24px; box-shadow: -2px 2px rgba(250, 115, 230, 0.6), -4px 4px rgba(120, 115, 245, 0.6); } .bot-message p { margin: 0 0 1em 0; } .bot-message p:last-child { margin-bottom: 0; } .bot-message { white-space: pre-line; } .bot-message a { color: #ffffff; text-decoration: underline !important; } .bot-message a:hover { color: #e0e0e0; text-decoration: underline; } .bot-message a:visited { color: #ffffff; } .system-message { padding: 8px 12px; margin: 8px 0; background-color: rgba(120, 115, 245, 0.1); border-radius: 8px; color: #555; font-style: italic; font-size: 14px; text-align: center; } .mxchat-chatbot-wrapper { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 10px; display: flex; flex-direction: column; height: 100%; width: 100%; min-height: 0; /* Allow flex shrinking */ overflow: hidden; } /* ======================================== INPUT & CONTROLS ======================================== */ .mxchat-chatbot .chat-container .input-container { position: relative; display: flex; align-items: center; padding-right: 40px; border: 1px solid #ccc; border-radius: 10px; margin: 0 10px 10px; } .mxchat-chatbot .chat-container .input-container .chat-input { flex-grow: 1; color: #212121; line-height: 24px; background: transparent; margin-bottom: 0; width: 100%; min-height: 20px; max-height: 65px; resize: none; overflow-y: auto; font-size: 16px; border: none; border-radius: 5px; box-sizing: border-box; padding: 0.4em 0.5em; outline: none; border-radius: 10px; } .chat-input::-webkit-scrollbar { width: 8px; } .chat-input::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } .chat-input::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #fa73e6, #7873f5, #3ac9d1); border-radius: 4px; } .chat-input::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #d164ce, #6568d8, #2daeb8); } .chat-input { scrollbar-width: thin; scrollbar-color: linear-gradient(135deg, #fa73e6, #7873f5, #3ac9d1) #f1f1f1; } /* Chat input character counter + soft limit feedback (plan 7091a2). Language-neutral: numbers + color only. Hidden until ~80% of the cap, then fades in and ramps neutral -> amber -> red. The input border mirrors the same cue, and an over-limit keystroke/paste triggers a brief shake so the hard maxlength cap (plan a3fae2) is never a silent "input jumps back". */ .mxchat-chatbot .chat-container .input-container .mxchat-char-counter { position: absolute; bottom: 3px; right: 44px; /* clear the absolutely-positioned send button */ font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; color: #9aa0a6; background: rgba(255, 255, 255, 0.85); padding: 1px 5px; border-radius: 8px; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.18s ease, color 0.18s ease; z-index: 2; } .mxchat-chatbot .chat-container .input-container .mxchat-char-counter.is-visible { opacity: 1; visibility: visible; } .mxchat-chatbot .chat-container .input-container .mxchat-char-counter.is-warn { color: #d98300; /* amber: approaching the cap */ } .mxchat-chatbot .chat-container .input-container .mxchat-char-counter.is-full { color: #d93025; /* red: at the cap */ font-weight: 600; } /* RTL widgets: counter on the opposite side. */ .mxchat-chatbot[dir="rtl"] .chat-container .input-container .mxchat-char-counter, [dir="rtl"] .mxchat-chatbot .chat-container .input-container .mxchat-char-counter { right: auto; left: 44px; } /* Input border affordance mirrors the counter color. */ .mxchat-chatbot .chat-container .input-container.mxchat-input-near-limit { border-color: #f0b048; } .mxchat-chatbot .chat-container .input-container.mxchat-input-at-limit { border-color: #e5675c; } /* Soft "you hit the edge" bump when an over-limit keystroke/paste is rejected. */ .mxchat-chatbot .chat-container .input-container.mxchat-input-bump { animation: mxchat-input-bump 0.2s ease; } @keyframes mxchat-input-bump { 0% { transform: translateX(0); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } 100% { transform: translateX(0); } } /* Respect reduced-motion: drop the shake; the red border/counter still signals the cap. */ @media (prefers-reduced-motion: reduce) { .mxchat-chatbot .chat-container .input-container.mxchat-input-bump { animation: none; } } .mxchat-chatbot .chat-container .input-container .send-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: transparent !important; padding: 5px; margin: 0; transition: background-color 0.3s; color: #fff; font-size: 1rem; cursor: pointer; font-weight: 700; } .send-button svg { width: 25px; height: 25px; pointer-events: none; } .send-button:hover { opacity: 0.8; } /* Stop state while a response is streaming: the send button becomes a Stop control in place — same chrome and position, swapped glyph. Themeable hook; the glyph's size/color are mirrored from the send icon at runtime. */ .mxchat-chatbot .chat-container .input-container .send-button.mxchat-stop-mode { cursor: pointer; } .mxchat-chatbot .spinner { animation: rotate 2s linear infinite; width: 20px; height: 20px; } .mxchat-chatbot .spinner circle { stroke: #212121; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; } @keyframes rotate { 100% { transform: rotate(360deg); } } @keyframes dash { 0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; } } /* ======================================== FLOATING CHATBOT & CONTROLS ======================================== */ .chatbot-title-container { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1 1 auto; min-width: 0; } .chatbot-title-group { display: flex; align-items: center; gap: 8px; } .chat-mode-indicator { font-size: 12px; line-height: 1; margin-right: 0; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #ffffff; display: inline-flex; align-items: center; height: 22px; white-space: nowrap; flex: 0 0 auto; } .floating-chatbot { position: fixed; bottom: 25px; right: 25px; width: 375px; /* Use viewport-aware height with fallbacks */ height: min(625px, calc(100vh - 50px)); /* 50px = 25px top + 25px bottom margin */ height: min(625px, calc(100dvh - 50px)); /* Dynamic viewport height for mobile browsers */ max-height: calc(100vh - 50px); max-height: calc(100dvh - 50px); /* Fallback for browsers supporting dvh */ box-shadow: 0 0 10px rgba(0, 0, 0, 0.25); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; z-index: 100000; transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; transform: translateY(20%); opacity: 0; pointer-events: none; } .floating-chatbot.visible { transform: translateY(0); opacity: 1; pointer-events: auto; } /* ======================================== EMBEDDED CHATBOT (Shortcode) ======================================== */ /* Embedded chatbots are NOT inside .floating-chatbot wrapper */ /* Apply fixed height like floating widget so quick questions overlay properly */ .mxchat-chatbot-wrapper:not(.floating-chatbot .mxchat-chatbot-wrapper) { height: 500px; max-height: 500px; } /* Hide the minimize/exit button for embedded chatbots - it doesn't make sense */ .mxchat-chatbot-wrapper:not(.floating-chatbot .mxchat-chatbot-wrapper) .exit-chat { display: none !important; } .floating-chatbot-button.hidden, .exit-chat span { display: none !important; } .chatbot-top-bar button.exit-chat:hover { background: rgba(255, 255, 255, 0.12); } .visible { display: flex; } .floating-chatbot-button { transition: opacity 1s ease-in-out; font-size: 1.25rem; position: fixed; bottom: 30px; right: 25px; background-color: #212121; color: #fff; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; z-index: 100000; display: flex; } .floating-chatbot-button:focus-visible { outline: 3px solid #7873f5; outline-offset: 3px; } .floating-chatbot-button img { max-width: 100%; max-height: 100%; width: auto; height: auto; } .chatbot-top-bar { background: #212121; } .mxchat-chatbot-wrapper .chatbot-top-bar button.exit-chat { background: transparent; /* v3.2.15 (plan-52fd4c): explicit guards against host-theme button rules. Margin deliberately untouched — .exit-chat relies on margin-left:auto. */ background-image: none; border: none; opacity: 0.8; padding: 0; width: 32px; height: 32px; min-width: 32px; min-height: 32px; max-width: none; flex: 0 0 auto; border-radius: 6px; font-family: inherit; text-transform: none; text-shadow: none; appearance: none; -webkit-appearance: none; transition: opacity 0.15s ease, background 0.15s ease; } .mxchat-chatbot-wrapper .chatbot-top-bar { cursor: pointer; color: #fff; padding: 8px 12px; min-height: 48px; gap: 8px; border-top-left-radius: 10px; border-top-right-radius: 10px; display: flex; justify-content: space-between; align-items: center; } .mxchat-chatbot-wrapper .chatbot-top-bar .chatbot-title { font-size: 15px; line-height: 1.2; padding: 0; margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; } .exit-chat { border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-left: auto; opacity: 0.8; width: 32px; height: 32px; min-width: 32px; flex: 0 0 auto; } .exit-chat svg { width: 18px; height: 18px; fill: none; stroke: currentColor; } .mxchat-chatbot-wrapper .chatbot-footer { text-align: center; padding-bottom: 10px; font-size: 0.85em; } .mxchat-chatbot-wrapper .chatbot-footer .privacy-notice { font-size: 12px; margin: 0; color: #71717a; } .mxchat-chatbot-wrapper .chatbot-footer .privacy-notice a { color: #0073aa; text-decoration: underline; font-size: 12px; } .mxchat-chatbot-wrapper .chatbot-footer .powered-by { text-decoration: none; color: inherit; font-weight: 700; } .mxchat-chatbot-wrapper .chatbot-footer .powered-by span { text-decoration: underline; } /* ======================================== INIT LOADER (shown while chat initializes) ======================================== */ .mxchat-init-loader { display: flex; align-items: center; justify-content: center; flex-grow: 1; min-height: 0; animation: fadeIn 0.3s ease-in-out; } .mxchat-init-loader-dots { display: flex; gap: 8px; } .mxchat-init-loader-dots .dot { width: 8px; height: 8px; border-radius: 50%; background-color: #888; animation: mxchat-dot-bounce 1.4s ease-in-out infinite both; } .mxchat-init-loader-dots .dot:nth-child(1) { animation-delay: -0.32s; } .mxchat-init-loader-dots .dot:nth-child(2) { animation-delay: -0.16s; } /* ======================================== THINKING DOTS ANIMATION ======================================== */ .chat-box .bot-message.temporary-message .thinking-dots-container { display: flex; justify-content: center; align-items: center; overflow: hidden; height: 20px; position: relative; z-index: 1; flex-shrink: 0; } .chat-box .bot-message.temporary-message .thinking-dots { display: flex; justify-content: center; align-items: center; height: 90%; gap: 5px; flex-shrink: 0; } .chat-box .bot-message.temporary-message .thinking-dots .dot { height: 6px; width: 6px; margin: 0 3px; background-color: #fff; border-radius: 50%; display: inline-block; animation: mxchat-dot-bounce 1.4s ease-in-out infinite both; vertical-align: middle; } .chat-box .bot-message.temporary-message .thinking-dots .dot:first-child { animation-delay: -0.32s; } .chat-box .bot-message.temporary-message .thinking-dots .dot:nth-child(2) { animation-delay: -0.16s; } @keyframes mxchat-dot-bounce { 0%, 100%, 80% { transform: scale(1); } 40% { transform: scale(1.5); } } /* ======================================== PRE-CHAT MESSAGE ======================================== */ .pre-chat-message { position: fixed; bottom: 85px; right: 30px; background-color: #fff; color: #212121; padding: 10px; box-shadow: 0px 0px 10px rgba(150, 150, 150, 0.3); border-radius: 5px; z-index: 1000; cursor: pointer; max-width: 325px; font-size: 14px; display: none; margin-bottom: 10px; } .pre-chat-message .close-pre-chat-message { position: absolute; top: -6px; right: -6px; background-color: #ccc; border: none; color: #212121; font-size: 14px; cursor: pointer; border-radius: 50%; width: 20px; min-width: 20px; min-height: 20px; height: 20px; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; } /* ======================================== VIEWPORT HEIGHT CONSTRAINTS Handles bookmarks bar, browser zoom, and smaller screens ======================================== */ @media screen and (max-height: 700px) { .floating-chatbot { bottom: 15px; height: calc(100vh - 30px); height: calc(100dvh - 30px); max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); } .floating-chatbot-button { bottom: 20px; } .pre-chat-message { bottom: 75px; } } @media screen and (max-height: 550px) { .floating-chatbot { bottom: 10px; height: calc(100vh - 20px); height: calc(100dvh - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); } /* Reduce padding in tight spaces */ .mxchat-popular-questions { padding: 0 8px 5px; margin-bottom: 8px; } .mxchat-popular-question { padding: 8px 12px; font-size: 13px; line-height: 20px; } .mxchat-chatbot .chat-container .input-container { margin: 0 8px 8px; } .mxchat-chatbot-wrapper .chatbot-footer { padding-bottom: 5px; } } /* ======================================== MOBILE RESPONSIVE ======================================== */ @media screen and (max-width: 782px) { .mxchat-search-results { gap: 15px !important; } .mxchat-search-intro { font-size: 15px !important; } .mxchat-search-title { font-size: 15px !important; } .mxchat-search-description { font-size: 13px !important; } } @media (max-width: 550px) { .questions-toggle-btn, .questions-collapse-btn { width: 28px; height: 28px; } .questions-toggle-btn svg, .questions-collapse-btn svg { width: 22px; height: 22px; } .pre-chat-message { bottom: 70px; right: 15px; } .chat-input { width: calc(100% - 70px); } .bot-message, .user-message { padding: 10px; max-width: 95%; } .floating-chatbot-button { bottom: 15px; right: 10px; } .floating-chatbot { width: calc(100vw - 16px); /* Use multiple fallbacks for maximum browser compatibility */ height: calc(100vh - 16px); /* Fallback */ height: calc(var(--vh, 1vh) * 100 - 16px); /* JS-set custom property fallback */ height: calc(100dvh - 16px); /* Modern dynamic viewport height */ max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); margin: 0; padding: 0; position: fixed; bottom: 8px; top: auto; left: 8px; right: 8px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); } .floating-chatbot .mxchat-chatbot-wrapper { border-radius: 16px; overflow: hidden; } .mxchat-chatbot-wrapper .chatbot-top-bar { border-top-left-radius: 16px; border-top-right-radius: 16px; } } pre { background-color: #000; border: 1px solid #ddd; border-radius: 20px; border-left: 3px solid #9e7aff; color: #fff; page-break-inside: avoid; font-family: monospace; font-size: 15px; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1em 1.5em; display: block; word-wrap: break-word; } .copy-btn { padding: 10px 20px; border: none; border-radius: 4px; background-color: #9e7aff; transition: background-color 0.3s; color: #fff; font-size: 1rem; cursor: pointer; font-weight: 700; margin-bottom: 10px; } .copy-btn:hover { opacity: 0.8; } .mxchat-product-card { display: flex; flex-direction: column; align-items: center; margin: 10px 0; padding: 10px; border-radius: 5px; background-color: inherit; } .mxchat-product-card img.mxchat-product-image { max-width: 100%; height: auto; margin-bottom: 5px; border-radius: 4px; } .mxchat-product-card h3.mxchat-product-name { font-size: 16px; font-weight: bold; margin: 5px 0; text-align: center; color: inherit; } .mxchat-product-card .mxchat-product-price { color: inherit; font-weight: bold; margin-bottom: 5px; } .mxchat-product-card .mxchat-product-description { font-size: 14px; text-align: center; margin-bottom: 10px; color: inherit; } .mxchat-product-card .mxchat-add-to-cart-button { background-color: #212121; color: #fff; padding: 8px 12px; border: none; cursor: pointer; border-radius: 12px; transition: background-color 0.3s ease; } .mxchat-product-card .mxchat-add-to-cart-button:hover { background-color: #212121; } .mxchat-image-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } .mxchat-image-item { text-align: center; overflow: hidden; word-wrap: break-word; } .mxchat-image-title { display: block; font-size: 14px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .mxchat-image-link { text-decoration: none; } .mxchat-image-thumbnail { max-width: 100%; height: auto; border-radius: 5px; transition: transform 0.3s; } .mxchat-image-thumbnail:hover { transform: scale(1.05); } .mxchat-generated-image { max-width: 100%; height: auto; border-radius: 0 0 8px 8px; } /* Consent-safe YouTube embed (click-to-load facade → nocookie iframe). Caption colors INHERIT from the message bubble (same idiom as .mxchat-product-card) so the embed reads correctly on any widget theme — bot bubbles commonly force their own text color. */ .mxchat-youtube-embed { max-width: 340px; margin-top: 8px; } .mxchat-youtube-facade { position: relative; display: block; width: 100%; padding: 0; margin: 0; border: none; background: #000; cursor: pointer; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); } .mxchat-youtube-thumb { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; transition: opacity 0.2s; } .mxchat-youtube-facade:hover .mxchat-youtube-thumb { opacity: 1; } .mxchat-youtube-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, 0.72); color: #fff; transition: transform 0.2s, background 0.2s; } .mxchat-youtube-play svg { margin-left: 3px; } .mxchat-youtube-facade:hover .mxchat-youtube-play { transform: translate(-50%, -50%) scale(1.08); background: rgba(0, 0, 0, 0.85); } .mxchat-youtube-iframe { width: 100%; aspect-ratio: 16 / 9; border: none; display: block; border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); } .mxchat-youtube-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 2px 0; background: transparent; color: inherit; } .mxchat-youtube-title { font-size: 13px; font-weight: 600; color: inherit; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .mxchat-youtube-link { font-size: 12px; white-space: nowrap; color: inherit; opacity: 0.85; text-decoration: underline; } #widget_icon, #widget_icon_2, #widget_icon_3, #widget_icon_5, #widget_icon_4, #widget_icon_6, #widget_icon_7 { padding: 10px; } #widget_icon_10 { fill: #fff; } /* This selector with more context - showing the collapse button in certain states */ .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn { background: none; border: none; padding: 0; margin: 0px; cursor: pointer; transition: all 0.2s ease; color: #212121; display: none; /* Hidden by default */ align-items: center; justify-content: center; width: 32px; height: 32px; box-shadow: none; outline: none; align-self: center; /* THIS IS MISSING */ order: -1; /* THIS IS MISSING */ } /* ALL hover states - these are MISSING from your new CSS */ .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn:hover { background: none; border: none; box-shadow: none; } .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn:focus { outline: none; background: none; border: none; box-shadow: none; } .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn:active { background: none; border: none; box-shadow: none; } /* SVG styles - these are MISSING */ .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn svg { fill: none; stroke: #212121; transition: transform 0.2s ease; width: 25px; height: 25px; } .mxchat-popular-questions .mxchat-popular-questions-container .questions-collapse-btn:hover svg { opacity: 0.7; } /* THE CRITICAL DISPLAY RULE - this shows when it's been collapsed before */ .mxchat-popular-questions.has-been-collapsed .mxchat-popular-questions-container .questions-collapse-btn { display: flex; } /* Hide when actually collapsed */ .mxchat-popular-questions.collapsed .mxchat-popular-questions-container .questions-collapse-btn { display: none; } /* ============================================================ Header overflow menu — 3-dot kebab + dropdown (v3.2.9 / v3.2.10) Lives in .chatbot-top-bar to the LEFT of .exit-chat. Visual treatment mirrors .exit-chat: transparent, white-on-dark, 0.8 opacity, 5px pad. v3.2.10: explicit `order` rules pin the visual order title (0) | kebab (1) | down-arrow (2) so the down-arrow is always the rightmost icon regardless of source order or which sibling has margin-left:auto. ============================================================ */ .mxchat-chatbot-wrapper .chatbot-top-bar > .chatbot-title-container { order: 0; } .mxchat-chatbot-wrapper .chatbot-top-bar > .mxchat-header-menu-wrap { order: 1; } .mxchat-chatbot-wrapper .chatbot-top-bar > .exit-chat { order: 2; } .mxchat-header-menu-wrap { position: relative; display: inline-flex; align-items: center; margin-left: auto; /* push kebab + arrow group to the right edge */ } .mxchat-chatbot-wrapper .chatbot-top-bar .mxchat-header-menu-wrap ~ .exit-chat, .mxchat-chatbot-wrapper .chatbot-top-bar .mxchat-header-menu-wrap + .exit-chat { margin-left: 4px; /* even, snug gap between kebab and close */ } .mxchat-chatbot-wrapper .chatbot-top-bar > .exit-chat:focus { background: rgba(255, 255, 255, 0.12); opacity: 1; outline: none; } /* v3.2.15 (plan-52fd4c): kebab rules scoped under the wrapper + explicit guards on every property a theme's button/link rules commonly set (font-family, margin, appearance, text-transform, background-image), after a customer site's theme visibly mangled the dropdown. */ .mxchat-chatbot-wrapper .mxchat-header-btn { border: none; background: transparent; background-image: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; opacity: 0.8; color: #fff; font-family: inherit; text-transform: none; text-shadow: none; appearance: none; -webkit-appearance: none; transition: opacity 0.15s ease, background 0.15s ease; border-radius: 6px; line-height: 0; width: 32px; height: 32px; min-width: 32px; min-height: 32px; max-width: none; flex: 0 0 auto; } .mxchat-chatbot-wrapper .mxchat-header-btn:hover, .mxchat-chatbot-wrapper .mxchat-header-btn:focus { opacity: 1; background: rgba(255, 255, 255, 0.12); outline: none; } .mxchat-chatbot-wrapper .mxchat-header-btn[aria-expanded="true"] { opacity: 1; background: rgba(255, 255, 255, 0.12); } .mxchat-chatbot-wrapper .mxchat-menu-trigger svg { width: 18px; height: 18px; } .mxchat-chatbot-wrapper .mxchat-header-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; margin: 0; background: var(--mxchat-menu-bg, #ffffff); color: var(--mxchat-menu-fg, #1a1a1a); border: 1px solid rgba(127, 127, 127, 0.20); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.10); padding: 4px; font-family: inherit; z-index: 99; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.12s ease, transform 0.12s ease; } .mxchat-chatbot-wrapper .mxchat-header-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; } .mxchat-chatbot-wrapper .mxchat-header-menu[hidden] { display: none; } .mxchat-chatbot-wrapper .mxchat-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; margin: 0; min-height: 40px; border: none; background: transparent; background-image: none; color: inherit; font-family: inherit; font-size: 14px; line-height: 1.3; letter-spacing: normal; text-align: left; text-transform: none; text-shadow: none; white-space: nowrap; appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 6px; transition: background 0.12s ease; text-decoration: none; box-sizing: border-box; } .mxchat-chatbot-wrapper .mxchat-menu-item:hover, .mxchat-chatbot-wrapper .mxchat-menu-item:focus { background: rgba(127, 127, 127, 0.18); outline: none; } .mxchat-menu-item-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: inherit; opacity: 0.85; flex-shrink: 0; } .mxchat-menu-item-icon svg { width: 16px; height: 16px; display: block; } .mxchat-menu-item-label { flex: 1; color: inherit; } /* RTL — flip the dropdown anchor edge */ [dir="rtl"] .mxchat-header-menu, .mxchat-chatbot-wrapper[dir="rtl"] .mxchat-header-menu { right: auto; left: 0; } /* ============================================================================ Satisfaction rating (v3.2.6 — polished per plan-141a12) Theme-adaptive via currentColor + inherit. Clean slate — old rules removed. ========================================================================= */ .mxchat-chatbot .chat-container .chat-box .mxchat-rating-prompt, .mxchat-chatbot .chat-container .chat-box .mxchat-rating-feedback, .mxchat-chatbot .chat-container .chat-box .mxchat-rating-saved { clear: both; float: left; max-width: 92%; box-sizing: border-box; } /* Theme-adaptive wrapper — .bot-message carries the user's custom bg/color via inline style; the inner rating component supplies its own padding + layout. */ .mxchat-rating-bot-bubble { padding: 0; overflow: visible; } .mxchat-rating-prompt { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 14px; margin: 10px 0; font-size: 14px; color: inherit; } .mxchat-rating-question { color: inherit; opacity: 0.85; font-weight: 500; } .mxchat-rating-actions { display: flex; align-items: center; gap: 8px; } .mxchat-rating-buttons { display: inline-flex; gap: 6px; } .mxchat-rating-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: transparent; border: none; color: inherit; opacity: 0.6; cursor: pointer; transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, color 0.18s ease; padding: 0; } .mxchat-rating-btn:hover { opacity: 1; transform: scale(1.12); background: rgba(255, 255, 255, 0.08); } .mxchat-rating-btn:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: 2px; } .mxchat-rating-btn svg { pointer-events: none; } .mxchat-rating-dismiss { width: 24px; height: 24px; border-radius: 6px; background: transparent; border: none; color: inherit; opacity: 0.45; cursor: pointer; font-size: 18px; line-height: 1; transition: opacity 0.18s ease, background-color 0.18s ease; } .mxchat-rating-dismiss:hover { opacity: 0.9; background: rgba(255, 255, 255, 0.08); } /* Feedback panel that replaces the prompt after a rating is clicked */ .mxchat-rating-feedback { padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; color: inherit; animation: mxchat-rating-fade-in 0.22s ease; } .mxchat-rating-feedback-label { font-size: 13px; opacity: 0.85; font-weight: 500; } .mxchat-rating-feedback-input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; background: rgba(255, 255, 255, 0.08); color: inherit; } .mxchat-rating-feedback-input:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.15); } .mxchat-rating-feedback-actions { display: flex; justify-content: flex-end; gap: 8px; } .mxchat-rating-skip, .mxchat-rating-submit { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease; } .mxchat-rating-skip { background: transparent; color: inherit; opacity: 0.6; } .mxchat-rating-skip:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); } .mxchat-rating-submit { /* Filled "primary" pill: fill = the bot font color, label = the bubble bg. syncRatingBubbleColors() in chat-script.js paints the real bot colors straight onto this button (inline) from the bubble's COMPUTED style, so it adapts to both the inline color pickers AND the mxchat-theme AI customizer. These var()/literal values are the no-JS safety net — the literal fallbacks (#212121 fill / #ffffff label) stay legible on their own (no white-on-white). Longhand background-color (not the `background` shorthand) because Chromium resolves inherited custom properties unreliably inside the shorthand. Do NOT use currentColor here — setting `color` would re-poison the background to the same value. */ background-color: var(--mxchat-bot-fg, #212121); color: var(--mxchat-bot-bg, #ffffff); } .mxchat-rating-submit:hover { transform: translateY(-1px); opacity: 0.9; } .mxchat-rating-saved { padding: 10px 14px; margin: 10px 0; font-size: 13px; font-weight: 500; text-align: center; color: inherit; animation: mxchat-rating-fade-in 0.22s ease; } @keyframes mxchat-rating-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }