.ai-chat-widget {
position: fixed;
z-index: 9999;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
width: 360px;
max-width: 90vw;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} .ai-chat-widget.bottom-right {
bottom: 20px;
right: 20px;
}
.ai-chat-widget.bottom-left {
bottom: 20px;
left: 20px;
}
.ai-chat-widget.top-right {
top: 20px;
right: 20px;
}
.ai-chat-widget.top-left {
top: 20px;
left: 20px;
} .ai-chat-widget.minimized {
width: auto;
height: auto;
background: transparent;
box-shadow: none;
}
.ai-chat-widget.minimized .ai-chat-container {
display: none;
}
.ai-chat-widget.minimized .ai-chat-icon {
display: flex;
}
.ai-chat-container {
position: absolute;
bottom: 80px;
background: white;
width: 350px;
height: 500px;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0,0,0,0.15);
display: flex;
flex-direction: column;
overflow: hidden;
}
.bottom-right .ai-chat-container {
right: 0;
}
.bottom-left .ai-chat-container {
left: 0;
}
.ai-chat-widget.minimized .ai-chat-container {
display: none;
}
.ai-chat-widget:not(.minimized) .ai-chat-container {
display: flex;
}
.ai-chat-icon {
display: none;
align-items: center;
gap: 8px;
padding: 12px 24px;
background-color: #0078b3;
color: white;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ai-chat-icon:hover {
transform: scale(1.05);
background: #005c8a;
}
.ai-chat-icon .dashicons {
font-size: 20px;
width: 20px;
height: 20px;
line-height: 20px;
}
.ai-chat-icon .icon-text {
font-size: 14px;
line-height: 1;
font-weight: 500;
white-space: nowrap;
}
.ai-chat-header {
background: #2563eb;
color: white;
padding: 12px 15px;
display: flex;
justify-content: space-between;
align-items: center;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
cursor: pointer;
user-select: none;
}
.ai-chat-header h3 {
margin: 0;
font-size: 16px;
font-weight: 500;
color: white;
}
.ai-chat-toggle {
background: none;
border: none;
color: white;
font-size: 24px;
cursor: pointer;
padding: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.8;
transition: opacity 0.2s ease;
}
.ai-chat-toggle:hover {
opacity: 1;
}
.ai-chat-toggle:focus {
outline: none;
opacity: 1;
}
.ai-chat-messages {
flex: 1;
padding: 15px;
overflow-y: auto;
background: #f8fafc;
}
.message {
max-width: 85%;
padding: 10px 15px;
border-radius: 15px;
margin-bottom: 10px;
font-size: 14px;
line-height: 1.4;
} .message h2 {
font-size: 18px;
font-weight: 600;
margin: 15px 0 10px;
color: inherit;
}
.message h3 {
font-size: 16px;
font-weight: 600;
margin: 12px 0 8px;
color: inherit;
}
.message strong {
font-weight: 600;
}
.message em {
font-style: italic;
}
.message ul {
margin: 8px 0;
padding-left: 20px;
}
.message li {
margin: 4px 0;
list-style-type: disc;
}
.message code {
background: rgba(0, 0, 0, 0.1);
padding: 2px 4px;
border-radius: 4px;
font-family: monospace;
font-size: 13px;
}
.message br {
margin-bottom: 8px;
}
.message a {
color: #2563eb;
text-decoration: none;
transition: color 0.2s ease;
}
.message a:hover {
color: #1d4ed8;
text-decoration: underline;
}
.user-message {
background: #2563eb;
color: white;
margin-left: auto;
border-bottom-right-radius: 5px;
}
.user-message code {
background: rgba(255, 255, 255, 0.2);
}
.user-message a {
color: #ffffff;
text-decoration: underline;
opacity: 0.9;
}
.user-message a:hover {
opacity: 1;
}
.ai-message {
background: white;
color: #1f2937;
margin-right: auto;
border-bottom-left-radius: 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ai-chat-input {
padding: 15px;
border-top: 1px solid #e5e7eb;
background: white;
display: flex;
gap: 10px;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}
.ai-chat-input input {
flex: 1;
padding: 8px 12px;
border: 1px solid #e5e7eb;
border-radius: 8px;
font-size: 14px;
outline: none;
transition: border-color 0.2s ease;
}
.ai-chat-input input:focus {
border-color: #2563eb;
}
.ai-chat-send {
background: #2563eb;
color: white;
border: none;
padding: 8px 16px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background-color 0.2s ease;
}
.ai-chat-send:hover {
background: #1d4ed8;
} .typing-indicator {
background-color: #f8f8f8 !important;
padding: 15px !important;
display: flex !important;
justify-content: flex-start !important;
align-items: center !important;
gap: 5px !important;
margin-bottom: 10px !important;
}
.typing-indicator span {
display: block;
width: 8px;
height: 8px;
background-color: #90959c;
border-radius: 50%;
animation: typing 1s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.3s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}