bettercx-widget
Version:
Professional AI-powered chat widget for BetterCX platform. Seamlessly integrate intelligent customer support into any website.
800 lines (775 loc) • 23 kB
CSS
/**
* BetterCX Widget Styles
*/
:host {
--bcx-widget-size: 60px;
--bcx-widget-chat-width: 400px;
--bcx-widget-chat-height: 640px;
--bcx-widget-border-radius: 20px;
--bcx-widget-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 8px 25px rgba(0, 0, 0, 0.04);
--bcx-widget-shadow-hover: 0 25px 80px rgba(0, 0, 0, 0.12), 0 12px 35px rgba(0, 0, 0, 0.06);
--bcx-widget-shadow-active: 0 15px 40px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.05);
--bcx-primary: #007bff;
--bcx-background: #ffffff;
--bcx-text: #212529;
--bcx-primary-50: color-mix(in srgb, var(--bcx-primary) 5%, var(--bcx-background));
--bcx-primary-100: color-mix(in srgb, var(--bcx-primary) 10%, var(--bcx-background));
--bcx-primary-200: color-mix(in srgb, var(--bcx-primary) 20%, var(--bcx-background));
--bcx-primary-300: color-mix(in srgb, var(--bcx-primary) 30%, var(--bcx-background));
--bcx-primary-400: color-mix(in srgb, var(--bcx-primary) 40%, var(--bcx-background));
--bcx-primary-500: var(--bcx-primary);
--bcx-primary-600: color-mix(in srgb, var(--bcx-primary) 80%, #000000);
--bcx-primary-700: color-mix(in srgb, var(--bcx-primary) 70%, #000000);
--bcx-primary-800: color-mix(in srgb, var(--bcx-primary) 60%, #000000);
--bcx-primary-900: color-mix(in srgb, var(--bcx-primary) 50%, #000000);
--bcx-text-primary: var(--bcx-text);
--bcx-text-secondary: color-mix(in srgb, var(--bcx-text) 70%, var(--bcx-background));
--bcx-text-tertiary: color-mix(in srgb, var(--bcx-text) 50%, var(--bcx-background));
--bcx-text-quaternary: color-mix(in srgb, var(--bcx-text) 30%, var(--bcx-background));
--bcx-bg-primary: var(--bcx-background);
--bcx-bg-secondary: color-mix(in srgb, var(--bcx-text) 2%, var(--bcx-background));
--bcx-bg-tertiary: color-mix(in srgb, var(--bcx-text) 4%, var(--bcx-background));
--bcx-bg-elevated: color-mix(in srgb, var(--bcx-background) 95%, #ffffff);
--bcx-border-subtle: color-mix(in srgb, var(--bcx-text) 8%, var(--bcx-background));
--bcx-border-soft: color-mix(in srgb, var(--bcx-text) 12%, var(--bcx-background));
--bcx-border-medium: color-mix(in srgb, var(--bcx-text) 16%, var(--bcx-background));
--bcx-space-1: 4px;
--bcx-space-2: 8px;
--bcx-space-3: 12px;
--bcx-space-4: 16px;
--bcx-space-5: 20px;
--bcx-space-6: 24px;
--bcx-space-8: 32px;
--bcx-space-10: 40px;
--bcx-space-12: 48px;
--bcx-space-16: 64px;
--bcx-text-xs: 11px;
--bcx-text-sm: 12px;
--bcx-text-base: 14px;
--bcx-text-lg: 16px;
--bcx-text-xl: 18px;
--bcx-text-2xl: 20px;
--bcx-radius-sm: 6px;
--bcx-radius-md: 8px;
--bcx-radius-lg: 12px;
--bcx-radius-xl: 16px;
--bcx-radius-2xl: 20px;
--bcx-radius-full: 9999px;
--bcx-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
--bcx-transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
--bcx-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
position: fixed;
bottom: var(--bcx-space-6);
right: var(--bcx-space-6);
z-index: 9999;
}
:host--left {
right: auto ;
left: var(--bcx-space-6) ;
}
:host {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
font-size: var(--bcx-text-base);
line-height: 1.5;
color: var(--bcx-text-primary);
font-weight: 400;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
:host(.bcx-widget--left) {
right: auto ;
left: var(--bcx-space-6) ;
}
:host(.bcx-widget--left) .bcx-widget__toggle {
position: relative;
z-index: 10;
}
:host(.bcx-widget--left) .bcx-widget__chat {
left: 0;
right: auto;
}
.bcx-widget--loading .bcx-widget__toggle, .bcx-widget--error .bcx-widget__toggle {
display: none;
}
.bcx-widget--open .bcx-widget__toggle {
transform: rotate(180deg);
}
.bcx-widget__toggle {
width: var(--bcx-widget-size);
height: var(--bcx-widget-size);
border: 2px solid var(--bcx-bg-elevated);
border-radius: var(--bcx-radius-full);
background: var(--bcx-primary-500);
color: var(--bcx-bg-primary);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: 500;
box-shadow: var(--bcx-widget-shadow);
transition: all var(--bcx-transition-normal);
position: relative;
z-index: 1;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
}
.bcx-widget__toggle::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, color-mix(in srgb, var(--bcx-primary-500) 20%, transparent) 0%, transparent 50%, color-mix(in srgb, var(--bcx-primary-500) 10%, transparent) 100%);
opacity: 0;
transition: opacity var(--bcx-transition-fast);
}
.bcx-widget__toggle:hover {
transform: translateY(-2px) scale(1.04);
box-shadow: var(--bcx-widget-shadow-hover);
background: var(--bcx-primary-600);
border-color: var(--bcx-bg-elevated);
}
.bcx-widget__toggle:hover::before {
opacity: 1;
}
.bcx-widget__toggle:focus {
outline: none;
box-shadow: var(--bcx-widget-shadow-hover);
}
.bcx-widget__toggle:active {
transform: translateY(-1px) scale(1.02);
box-shadow: var(--bcx-widget-shadow-active);
background: var(--bcx-primary-700);
}
.bcx-widget__toggle:active::after {
content: "";
position: absolute;
inset: -8px;
border-radius: inherit;
background: var(--bcx-primary-200);
opacity: 0.3;
animation: bcx-ripple 300ms ease-out;
}
.bcx-widget__toggle-icon {
transition: transform var(--bcx-transition-normal);
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
display: flex;
align-items: center;
justify-content: center;
}
.bcx-widget__toggle-icon svg {
width: 20px;
height: 20px;
stroke-width: 2;
transition: all var(--bcx-transition-fast);
display: block;
flex-shrink: 0;
}
.bcx-widget__toggle:hover .bcx-widget__toggle-icon {
transform: scale(1.1);
}
.bcx-widget__toggle:hover .bcx-widget__toggle-icon svg {
stroke-width: 2.2;
}
.bcx-widget__toggle:active .bcx-widget__toggle-icon {
transform: scale(0.96);
}
.bcx-widget__toggle:active .bcx-widget__toggle-icon svg {
stroke-width: 1.8;
}
.bcx-widget__chat {
position: absolute;
bottom: calc(var(--bcx-widget-size) + var(--bcx-space-3));
right: 0;
width: var(--bcx-widget-chat-width);
height: var(--bcx-widget-chat-height);
background: var(--bcx-bg-elevated);
border: 1px solid var(--bcx-border-subtle);
border-radius: var(--bcx-widget-border-radius);
box-shadow: var(--bcx-widget-shadow);
display: flex;
flex-direction: column;
overflow: hidden;
animation: bcx-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
}
.bcx-widget--left .bcx-widget__chat {
right: auto ;
left: 0 ;
}
.bcx-widget__chat::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, color-mix(in srgb, var(--bcx-bg-primary) 50%, transparent) 0%, transparent 50%, color-mix(in srgb, var(--bcx-bg-primary) 30%, transparent) 100%);
pointer-events: none;
}
.bcx-widget__header {
background: var(--bcx-primary-500);
color: var(--bcx-bg-primary);
padding: var(--bcx-space-4);
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
border-radius: var(--bcx-widget-border-radius) var(--bcx-widget-border-radius) 0 0;
position: relative;
z-index: 1;
}
.bcx-widget__header::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, color-mix(in srgb, var(--bcx-primary-500) 80%, transparent) 0%, transparent 50%, color-mix(in srgb, var(--bcx-primary-500) 90%, transparent) 100%);
border-radius: inherit;
pointer-events: none;
}
.bcx-widget__header h3 {
margin: 0;
font-size: var(--bcx-text-lg);
font-weight: 600;
letter-spacing: -0.02em;
position: relative;
z-index: 1;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.bcx-widget__close {
background: none;
border: none;
color: color-mix(in srgb, var(--bcx-bg-primary) 80%, transparent);
cursor: pointer;
font-size: 18px;
padding: var(--bcx-space-2);
border-radius: var(--bcx-radius-md);
transition: all var(--bcx-transition-fast);
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
position: relative;
z-index: 1;
}
.bcx-widget__close svg {
width: 18px;
height: 18px;
stroke-width: 2;
transition: all var(--bcx-transition-fast);
display: block;
flex-shrink: 0;
}
.bcx-widget__close:hover {
background: color-mix(in srgb, var(--bcx-bg-primary) 15%, transparent);
color: var(--bcx-bg-primary);
transform: scale(1.1);
}
.bcx-widget__close:hover svg {
stroke-width: 2.2;
}
.bcx-widget__close:focus {
outline: none;
background: color-mix(in srgb, var(--bcx-bg-primary) 20%, transparent);
color: var(--bcx-bg-primary);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--bcx-bg-primary) 30%, transparent);
}
.bcx-widget__close:focus svg {
stroke-width: 2.2;
}
.bcx-widget__close:active {
transform: scale(0.95);
}
.bcx-widget__close:active svg {
stroke-width: 1.8;
}
.bcx-widget__messages {
flex: 1;
overflow-y: auto;
padding: var(--bcx-space-4);
display: flex;
flex-direction: column;
gap: var(--bcx-space-4);
background: var(--bcx-bg-primary);
color: var(--bcx-text-primary);
scroll-behavior: smooth;
scrollbar-width: thin;
scrollbar-color: var(--bcx-border-soft) transparent;
position: relative;
}
.bcx-widget__messages::-webkit-scrollbar {
width: 4px;
}
.bcx-widget__messages::-webkit-scrollbar-track {
background: transparent;
}
.bcx-widget__messages::-webkit-scrollbar-thumb {
background: var(--bcx-border-soft);
border-radius: var(--bcx-radius-sm);
transition: background var(--bcx-transition-fast);
}
.bcx-widget__messages::-webkit-scrollbar-thumb:hover {
background: var(--bcx-border-medium);
}
.bcx-widget__messages::before, .bcx-widget__messages::after {
content: "";
position: sticky;
left: 0;
right: 0;
height: var(--bcx-space-4);
background: linear-gradient(to bottom, var(--bcx-bg-primary), transparent);
pointer-events: none;
z-index: 1;
}
.bcx-widget__messages::before {
top: 0;
margin-bottom: calc(-1 * var(--bcx-space-4));
}
.bcx-widget__messages::after {
bottom: 0;
background: linear-gradient(to top, var(--bcx-bg-primary), transparent);
margin-top: calc(-1 * var(--bcx-space-4));
}
.bcx-widget__message {
display: flex;
flex-direction: column;
max-width: 85%;
animation: bcx-message-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bcx-widget__message--user {
align-self: flex-end;
}
.bcx-widget__message--user .bcx-widget__message-content {
background: var(--bcx-primary-500);
color: var(--bcx-bg-primary);
border-radius: var(--bcx-radius-2xl) var(--bcx-radius-2xl) var(--bcx-radius-sm) var(--bcx-radius-2xl);
box-shadow: 0 4px 12px color-mix(in srgb, var(--bcx-primary-500) 25%, transparent), 0 1px 3px color-mix(in srgb, var(--bcx-primary-500) 15%, transparent);
text-align: start;
position: relative;
}
.bcx-widget__message--user .bcx-widget__message-content::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, color-mix(in srgb, var(--bcx-primary-500) 20%, transparent) 0%, transparent 50%, color-mix(in srgb, var(--bcx-primary-500) 10%, transparent) 100%);
pointer-events: none;
}
.bcx-widget__message--user .bcx-widget__message-time {
text-align: right;
color: var(--bcx-text-tertiary);
}
.bcx-widget__message--assistant {
align-self: flex-start;
}
.bcx-widget__message--assistant .bcx-widget__message-content {
background: var(--bcx-bg-elevated);
color: var(--bcx-text-primary);
border-radius: var(--bcx-radius-2xl) var(--bcx-radius-2xl) var(--bcx-radius-2xl) var(--bcx-radius-sm);
box-shadow: 0 2px 8px color-mix(in srgb, var(--bcx-text-primary) 8%, transparent), 0 1px 3px color-mix(in srgb, var(--bcx-text-primary) 4%, transparent);
border: 1px solid var(--bcx-border-subtle);
text-align: left;
position: relative;
}
.bcx-widget__message--assistant .bcx-widget__message-time {
text-align: left;
color: var(--bcx-text-tertiary);
}
.bcx-widget__message-content {
padding: var(--bcx-space-3) var(--bcx-space-4);
word-wrap: break-word;
white-space: pre-wrap;
font-size: var(--bcx-text-base);
line-height: 1.5;
font-weight: 400;
position: relative;
z-index: 1;
}
.bcx-widget__message--user .bcx-widget__message-content {
color: var(--bcx-bg-primary);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.bcx-widget__message--assistant .bcx-widget__message-content {
color: var(--bcx-text-primary);
}
.bcx-widget__message-time {
font-size: var(--bcx-text-xs);
margin-top: var(--bcx-space-1);
font-weight: 500;
letter-spacing: 0.025em;
}
.bcx-widget__example-questions {
padding: var(--bcx-space-4) 0;
display: flex;
flex-direction: column;
gap: var(--bcx-space-2);
margin-top: var(--bcx-space-2);
border-top: 1px solid var(--bcx-border-subtle);
position: relative;
}
.bcx-widget__example-questions::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent 0%, var(--bcx-border-soft) 20%, var(--bcx-border-soft) 80%, transparent 100%);
}
.bcx-widget__example-questions-title {
font-size: var(--bcx-text-xs);
color: var(--bcx-text-tertiary);
font-weight: 600;
margin-bottom: var(--bcx-space-3);
text-transform: uppercase;
letter-spacing: 0.05em;
text-align: center;
position: relative;
}
.bcx-widget__example-questions-title::after {
content: "";
position: absolute;
bottom: -6px;
left: 50%;
transform: translateX(-50%);
width: 24px;
height: 1px;
background: var(--bcx-primary-300);
}
.bcx-widget__example-question {
background: var(--bcx-bg-secondary);
border: 1px solid var(--bcx-border-subtle);
border-radius: var(--bcx-radius-lg);
padding: var(--bcx-space-3) var(--bcx-space-4);
text-align: left;
font-size: var(--bcx-text-sm);
color: var(--bcx-text-secondary);
cursor: pointer;
transition: all var(--bcx-transition-normal);
box-shadow: 0 1px 3px color-mix(in srgb, var(--bcx-text-primary) 4%, transparent);
word-wrap: break-word;
white-space: pre-wrap;
position: relative;
font-weight: 500;
line-height: 1.4;
}
.bcx-widget__example-question::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, color-mix(in srgb, var(--bcx-primary-500) 5%, transparent) 0%, transparent 50%, color-mix(in srgb, var(--bcx-primary-500) 3%, transparent) 100%);
opacity: 0;
transition: opacity var(--bcx-transition-fast);
pointer-events: none;
}
.bcx-widget__example-question:hover {
background: var(--bcx-bg-tertiary);
border-color: var(--bcx-primary-200);
transform: translateY(-2px);
box-shadow: 0 4px 12px color-mix(in srgb, var(--bcx-text-primary) 8%, transparent), 0 1px 3px color-mix(in srgb, var(--bcx-text-primary) 4%, transparent);
color: var(--bcx-text-primary);
}
.bcx-widget__example-question:hover::before {
opacity: 1;
}
.bcx-widget__example-question:active {
transform: translateY(-1px);
background: var(--bcx-bg-tertiary);
box-shadow: 0 2px 6px color-mix(in srgb, var(--bcx-text-primary) 6%, transparent);
}
.bcx-widget__example-question:focus {
outline: none;
border-color: var(--bcx-primary-300);
box-shadow: 0 0 0 3px var(--bcx-primary-100);
color: var(--bcx-text-primary);
}
.bcx-widget__typing {
display: flex;
align-items: center;
padding: var(--bcx-space-2) 0;
animation: bcx-typing-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bcx-widget__typing-indicator {
display: flex;
gap: var(--bcx-space-1);
padding: var(--bcx-space-3) var(--bcx-space-4);
background: var(--bcx-bg-elevated);
border-radius: var(--bcx-radius-2xl) var(--bcx-radius-2xl) var(--bcx-radius-2xl) var(--bcx-radius-sm);
align-self: flex-start;
box-shadow: 0 2px 8px color-mix(in srgb, var(--bcx-text-primary) 8%, transparent), 0 1px 3px color-mix(in srgb, var(--bcx-text-primary) 4%, transparent);
border: 1px solid var(--bcx-border-subtle);
position: relative;
}
.bcx-widget__typing-indicator span {
width: 8px;
height: 8px;
border-radius: var(--bcx-radius-full);
background: var(--bcx-primary-400);
animation: bcx-pulse 1.6s ease-in-out infinite both;
box-shadow: 0 1px 2px color-mix(in srgb, var(--bcx-primary-500) 20%, transparent);
}
.bcx-widget__typing-indicator span:nth-child(1) {
animation-delay: -0.4s;
}
.bcx-widget__typing-indicator span:nth-child(2) {
animation-delay: -0.2s;
}
.bcx-widget__typing-indicator span:nth-child(3) {
animation-delay: 0s;
}
.bcx-widget__composer {
border-top: 1px solid var(--bcx-border-subtle);
padding: var(--bcx-space-4);
flex-shrink: 0;
background: var(--bcx-bg-elevated);
width: 100%;
box-sizing: border-box;
position: relative;
}
.bcx-widget__composer::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent 0%, var(--bcx-border-soft) 20%, var(--bcx-border-soft) 80%, transparent 100%);
}
.bcx-widget__composer bcx-message-composer {
display: block;
width: 100%;
}
.bcx-widget__loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--bcx-spacing-xl);
color: var(--bcx-text);
}
.bcx-widget__spinner {
width: 32px;
height: 32px;
border: 3px solid var(--bcx-border);
border-top: 3px solid var(--bcx-primary);
border-radius: 50%;
animation: bcx-spin 1s linear infinite;
margin-bottom: var(--bcx-spacing-md);
}
.bcx-widget__error {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--bcx-spacing-xl);
text-align: center;
color: var(--bcx-text);
background: var(--bcx-background);
border: 1px solid var(--bcx-border);
border-radius: var(--bcx-widget-border-radius);
box-shadow: var(--bcx-widget-shadow);
width: var(--bcx-widget-chat-width);
height: var(--bcx-widget-chat-height);
}
.bcx-widget__error-icon {
font-size: 48px;
margin-bottom: var(--bcx-spacing-md);
}
.bcx-widget__retry-btn {
background: var(--bcx-primary);
color: white;
border: none;
padding: var(--bcx-spacing-sm) var(--bcx-spacing-md);
border-radius: var(--bcx-radius-md);
cursor: pointer;
font-size: var(--bcx-font-size-sm);
margin-top: var(--bcx-spacing-md);
transition: background-color var(--bcx-transition-fast);
}
.bcx-widget__retry-btn:hover {
background: color-mix(in srgb, var(--bcx-primary) 85%, black);
}
.bcx-widget__retry-btn:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(var(--bcx-primary), 0.3);
}
@keyframes bcx-slide-up {
from {
opacity: 0;
transform: translateY(24px) scale(0.96);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes bcx-message-appear {
from {
opacity: 0;
transform: translateY(12px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes bcx-typing-appear {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes bcx-pulse {
0%, 80%, 100% {
transform: scale(0.8);
opacity: 0.4;
}
40% {
transform: scale(1.1);
opacity: 1;
}
}
@keyframes bcx-ripple {
0% {
transform: scale(0.8);
opacity: 0.3;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
@keyframes bcx-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@media (max-width: 768px) {
:host {
--bcx-widget-chat-width: calc(100vw - 32px);
--bcx-widget-chat-height: calc(100vh - 120px);
bottom: var(--bcx-space-4);
right: var(--bcx-space-4);
left: var(--bcx-space-4);
}
.bcx-widget__chat {
width: var(--bcx-widget-chat-width) ;
height: var(--bcx-widget-chat-height) ;
left: 0 ;
right: 0 ;
bottom: calc(var(--bcx-widget-size) + var(--bcx-space-3)) ;
top: auto ;
position: absolute ;
border-radius: var(--bcx-widget-border-radius) ;
margin: 0 ;
box-shadow: var(--bcx-widget-shadow) ;
}
.bcx-widget__toggle {
position: absolute ;
bottom: 0 ;
z-index: 10 ;
}
:host(.bcx-widget--left) {
right: auto ;
left: var(--bcx-space-4) ;
}
:host(.bcx-widget--left) .bcx-widget__toggle {
right: auto ;
left: 0 ;
}
:host(.bcx-widget--left) .bcx-widget__chat {
right: auto ;
left: 0 ;
}
:host(.bcx-widget--right) {
right: var(--bcx-space-4) ;
left: auto ;
}
:host(.bcx-widget--right) .bcx-widget__toggle {
right: 0 ;
left: auto ;
}
:host(.bcx-widget--right) .bcx-widget__chat {
right: 0 ;
left: auto ;
}
}
@media (max-width: 480px) {
:host {
--bcx-widget-chat-width: calc(100vw - 24px);
--bcx-widget-chat-height: calc(100vh - 100px);
bottom: var(--bcx-space-3);
right: var(--bcx-space-3);
left: var(--bcx-space-3);
}
.bcx-widget__chat {
width: var(--bcx-widget-chat-width) ;
height: var(--bcx-widget-chat-height) ;
left: 0 ;
right: 0 ;
bottom: calc(var(--bcx-widget-size) + var(--bcx-space-2)) ;
top: auto ;
position: absolute ;
border-radius: var(--bcx-widget-border-radius) ;
margin: 0 ;
box-shadow: var(--bcx-widget-shadow) ;
}
.bcx-widget__toggle {
position: absolute ;
bottom: 0 ;
z-index: 10 ;
}
:host(.bcx-widget--left) {
right: auto ;
left: var(--bcx-space-3) ;
}
:host(.bcx-widget--left) .bcx-widget__toggle {
right: auto ;
left: 0 ;
}
:host(.bcx-widget--left) .bcx-widget__chat {
right: auto ;
left: 0 ;
}
:host(.bcx-widget--right) {
right: var(--bcx-space-3) ;
left: auto ;
}
:host(.bcx-widget--right) .bcx-widget__toggle {
right: 0 ;
left: auto ;
}
:host(.bcx-widget--right) .bcx-widget__chat {
right: 0 ;
left: auto ;
}
}
@media (prefers-contrast: high) {
:host {
--bcx-border: #000000;
--bcx-shadow: rgba(0, 0, 0, 0.5);
}
}
@media (prefers-reduced-motion: reduce) {
.bcx-widget__toggle,
.bcx-widget__toggle-icon,
.bcx-widget__close,
.bcx-widget__retry-btn {
transition: none;
}
.bcx-widget__chat {
animation: none;
}
.bcx-widget__spinner,
.bcx-widget__typing-indicator span {
animation: none;
}
}