.ai-assistant-widget {
--ai-primary-color: #0073aa;
--ai-primary-hover: #005a87;
--ai-chat-width: 380px;
--ai-chat-height: 500px;
--ai-border-radius: 16px;
--ai-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
--ai-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-family: var(--ai-font-family);
font-size: 14px;
line-height: 1.5;
box-sizing: border-box;
}
.ai-assistant-widget *,
.ai-assistant-widget *::before,
.ai-assistant-widget *::after {
box-sizing: border-box;
} .ai-assistant-floating {
position: fixed;
z-index: 999999;
}
.ai-assistant-bottom-right {
bottom: 20px;
right: 20px;
}
.ai-assistant-bottom-left {
bottom: 20px;
left: 20px;
}
.ai-assistant-top-right {
top: 20px;
right: 20px;
}
.ai-assistant-top-left {
top: 20px;
left: 20px;
} .ai-assistant-embedded {
width: 100%;
max-width: var(--ai-chat-width);
}
.ai-assistant-embedded .ai-assistant-chat {
position: relative;
border-radius: var(--ai-border-radius);
box-shadow: var(--ai-shadow);
} .ai-assistant-toggle {
width: 60px;
height: 60px;
border-radius: 50%;
background: var(--ai-primary-color);
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--ai-shadow);
transition: transform 0.3s ease, background 0.3s ease;
padding: 0;
}
.ai-assistant-toggle:hover {
background: var(--ai-primary-hover);
transform: scale(1.05);
}
.ai-assistant-toggle svg {
width: 28px;
height: 28px;
color: #fff;
transition: opacity 0.3s ease, transform 0.3s ease;
}
.ai-assistant-toggle .icon-close {
position: absolute;
opacity: 0;
transform: rotate(-90deg);
}
.ai-assistant-widget.is-open .ai-assistant-toggle .icon-chat {
opacity: 0;
transform: rotate(90deg);
}
.ai-assistant-widget.is-open .ai-assistant-toggle .icon-close {
opacity: 1;
transform: rotate(0);
} .ai-assistant-chat {
position: absolute;
width: var(--ai-chat-width);
height: var(--ai-chat-height);
background: #fff;
border-radius: var(--ai-border-radius);
box-shadow: var(--ai-shadow);
display: flex;
flex-direction: column;
overflow: hidden;
transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.ai-assistant-floating .ai-assistant-chat {
bottom: 80px;
}
.ai-assistant-bottom-right .ai-assistant-chat {
right: 0;
}
.ai-assistant-bottom-left .ai-assistant-chat {
left: 0;
}
.ai-assistant-top-right .ai-assistant-chat {
top: 80px;
right: 0;
bottom: auto;
}
.ai-assistant-top-left .ai-assistant-chat {
top: 80px;
left: 0;
bottom: auto;
}
.ai-assistant-hidden {
opacity: 0;
visibility: hidden;
transform: translateY(20px) scale(0.95);
pointer-events: none;
}
.ai-assistant-widget.is-open .ai-assistant-hidden {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
pointer-events: auto;
} .ai-assistant-header {
background: var(--ai-primary-color);
color: #fff;
padding: 16px 20px;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.ai-assistant-header-info {
display: flex;
align-items: center;
gap: 12px;
}
.ai-assistant-avatar {
width: 40px;
height: 40px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.ai-assistant-avatar svg {
width: 24px;
height: 24px;
}
.ai-assistant-header-text {
display: flex;
flex-direction: column;
}
.ai-assistant-title {
font-weight: 600;
font-size: 16px;
}
.ai-assistant-status {
font-size: 12px;
opacity: 0.8;
}
.ai-assistant-close {
width: 32px;
height: 32px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s ease;
padding: 0;
}
.ai-assistant-close:hover {
background: rgba(255, 255, 255, 0.2);
}
.ai-assistant-close svg {
width: 18px;
height: 18px;
color: #fff;
} .ai-assistant-messages {
flex: 1;
overflow-y: auto;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
background: #f8f9fa;
} .ai-assistant-message {
max-width: 85%;
animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.ai-assistant-message.user {
align-self: flex-end;
}
.ai-assistant-message.assistant {
align-self: flex-start;
}
.ai-assistant-message-content {
padding: 12px 16px;
border-radius: 18px;
word-break: break-word;
white-space: pre-wrap;
}
.ai-assistant-message.user .ai-assistant-message-content {
background: var(--ai-primary-color);
color: #fff;
border-bottom-right-radius: 4px;
}
.ai-assistant-message.assistant .ai-assistant-message-content {
background: #fff;
color: #333;
border-bottom-left-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.ai-assistant-message-time {
font-size: 11px;
color: #999;
margin-top: 4px;
padding: 0 4px;
}
.ai-assistant-message.user .ai-assistant-message-time {
text-align: right;
} .ai-assistant-typing {
padding: 0 16px 12px;
display: flex;
align-items: center;
gap: 8px;
background: #f8f9fa;
}
.typing-indicator {
display: flex;
gap: 4px;
padding: 8px 12px;
background: #fff;
border-radius: 18px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.typing-indicator span {
width: 8px;
height: 8px;
background: #ccc;
border-radius: 50%;
animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) {
animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
animation-delay: -0.16s;
}
@keyframes typingBounce {
0%, 80%, 100% {
transform: scale(0.8);
opacity: 0.5;
}
40% {
transform: scale(1);
opacity: 1;
}
}
.typing-text {
font-size: 12px;
color: #999;
} .ai-assistant-input-container {
padding: 12px 16px 8px;
background: #fff;
border-top: 1px solid #eee;
flex-shrink: 0;
}
.ai-assistant-form {
display: flex;
gap: 8px;
align-items: center;
}
.ai-assistant-input {
flex: 1;
padding: 12px 16px;
border: 1px solid #e0e0e0;
border-radius: 24px;
font-size: 14px;
font-family: inherit;
outline: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-assistant-input:focus {
border-color: var(--ai-primary-color);
box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}
.ai-assistant-input::placeholder {
color: #999;
}
.ai-assistant-send {
width: 44px;
height: 44px;
background: var(--ai-primary-color);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s ease, transform 0.2s ease;
padding: 0;
flex-shrink: 0;
}
.ai-assistant-send:hover {
background: var(--ai-primary-hover);
transform: scale(1.05);
}
.ai-assistant-send:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.ai-assistant-send svg {
width: 20px;
height: 20px;
color: #fff;
}
.ai-assistant-powered {
font-size: 10px;
color: #bbb;
} .ai-assistant-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid #f0f0f0;
}
.ai-assistant-clear {
display: flex;
align-items: center;
gap: 4px;
background: none;
border: none;
color: #999;
font-size: 11px;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.2s ease;
}
.ai-assistant-clear:hover {
background: #f5f5f5;
color: #666;
}
.ai-assistant-clear svg {
flex-shrink: 0;
} .ai-assistant-privacy-notice {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 30px 20px;
height: 100%;
background: #fff;
}
.ai-assistant-privacy-notice .privacy-icon {
width: 60px;
height: 60px;
background: var(--ai-primary-color);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}
.ai-assistant-privacy-notice .privacy-icon svg {
color: #fff;
}
.ai-assistant-privacy-notice .privacy-text {
font-size: 13px;
line-height: 1.6;
color: #555;
margin-bottom: 25px;
max-width: 300px;
}
.ai-assistant-privacy-notice .privacy-text a {
color: var(--ai-primary-color);
text-decoration: underline;
}
.ai-assistant-privacy-notice .privacy-text a:hover {
text-decoration: none;
}
.ai-assistant-privacy-accept {
background: var(--ai-primary-color);
color: #fff;
border: none;
padding: 12px 30px;
border-radius: 25px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.ai-assistant-privacy-accept:hover {
filter: brightness(1.1);
transform: translateY(-1px);
} .ai-assistant-message.error .ai-assistant-message-content {
background: #fee;
color: #c00;
border: 1px solid #fcc;
} @media (max-width: 480px) {
.ai-assistant-floating .ai-assistant-chat {
width: calc(100vw - 40px);
height: calc(100vh - 140px);
max-height: 600px;
}
.ai-assistant-bottom-right,
.ai-assistant-bottom-left {
right: 10px;
left: 10px;
bottom: 10px;
}
.ai-assistant-bottom-right .ai-assistant-chat,
.ai-assistant-bottom-left .ai-assistant-chat {
right: 0;
left: 0;
}
.ai-assistant-toggle {
width: 56px;
height: 56px;
}
} .ai-assistant-messages::-webkit-scrollbar {
width: 6px;
}
.ai-assistant-messages::-webkit-scrollbar-track {
background: transparent;
}
.ai-assistant-messages::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 3px;
}
.ai-assistant-messages::-webkit-scrollbar-thumb:hover {
background: #ccc;
} .ai-assistant-message-content a {
color: inherit;
text-decoration: underline;
}
.ai-assistant-message.user .ai-assistant-message-content a {
color: #fff;
}