:root {
--user-msg-color: #f0f0f0;
--bot-msg-color: #000000;
}
#grok-chat-widget {
position: fixed;
bottom: 140px;
left: 28px;
z-index: 9999;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#grok-chat-toggle {
width: 60px;
height: 60px;
background: linear-gradient(to right, #000, #000);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
cursor: pointer;
display: none;
}
#grok-chat-toggle.initial-load {
animation: slideUp 0.5s ease-out forwards;
}
#grok-chat-toggle.show {
display: flex;
}
#grok-chatbox {
width: 375px;
height: 401px;
background: white;
border-radius: 12px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
display: none;
flex-direction: column;
overflow: hidden;
animation: scaleIn 0.3s ease-out;
transition: all 0.3s ease-out;
position: fixed;
bottom: 140px;
left: 28px;
}
#grok-chatbox.maximized {
width: 30vw;
height: 80vh;
max-width: none;
z-index: 10000;
}
@media (max-width: 1200px) {
#grok-chatbox.maximized {
width: 40vw;
}
}
@media (max-width: 768px) {
.grok-chat-bubble {
display: none !important;
}
#grok-chat-widget {
bottom: 0;
left: 0;
right: 0;
width: 100%;
}
#grok-chat-toggle {
bottom: 100px;
left: 10px;
position: fixed;
}
#grok-chatbox {
width: 100%; position: fixed;
top: 0;
left: 0;
margin: 0;
border-radius: 0; inset: 0;
}
#grok-chat-input {
min-height: 40px !important;
height: 40px !important;
}
#grok-chatbox {
height: 100dvh !important;
max-height: 100dvh !important;
}
#grok-chat-messages {
height: calc(100vh - 130px); }
#grok-maximize-btn {
display: none;
}
#grok-chat-header {
border-radius: 0;
}
.message-user-container,
.message-bot-container {
max-width: 85%;
}
#grok-chatbox.maximized {
width: 100%;
height: 100vh;
}
#grok-chat-input-area {
position: sticky;
bottom: 0;
background: #fff;
}
}
#grok-chat-header {
background: linear-gradient(to bottom, #000, #fff);
color: white;
padding: 20px 15px;
position: relative;
border-radius: 12px 12px 0 0;
}
.header-content {
display: flex;
align-items: center;
margin-bottom: 8px;
}
#grok-chat-header img {
height: 40px;
width: 40px;
border-radius: 50%;
margin-right: 12px;
}
.header-text {
flex-grow: 1;
}
.chatbot-name {
font-size: 17px;
font-weight: 600;
margin-bottom: 4px;
}
.chatbot-subtitle {
font-size: 15px;
opacity: 0.9;
}
.header-actions {
display: flex;
gap: 8px;
}
.header-button {
background: none;
border: none;
color: white;
cursor: pointer;
padding: 4px 8px;
font-size: 18px;
border-radius: 4px;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
}
.header-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.header-button:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
#grok-maximize-btn {
font-size: 16px;
}
#grok-chat-messages {
flex-grow: 1;
padding: 30px 10px 10px;
overflow-y: auto;
background: white;
}
.message {
margin-bottom: 12px;
max-width: 100%;
clear: both;
display: flex;
flex-direction: column;
}
.message-bot {
float: left;
background: linear-gradient(to bottom, var(--bot-msg-color), var(--bot-msg-color));
color: white !important;
padding: 12px 15px;
border-radius: 18px 18px 18px 4px;
font-size: 16px;
margin-bottom: 10px;
max-width: 100%;
position: relative;
align-self: flex-start;
line-height: 1.5;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.message-bot:before {
display: none;
}
.message-bot * {
font-family: inherit !important;
color: inherit !important;
}
.message-bot h1,
.message-bot h2,
.message-bot h3,
.message-bot h4,
.message-bot h5,
.message-bot h6 {
color: inherit !important;
font-family: inherit !important;
line-height: 1.2 !important;
margin: 1em 0 0.5em !important;
font-weight: 600 !important;
}
.message-bot h1 {
font-size: 1.4em !important;
}
.message-bot h2 {
font-size: 1.3em !important;
}
.message-bot h3 {
font-size: 1.2em !important;
}
.message-bot h4 {
font-size: 1.1em !important;
}
.message-bot h5,
.message-bot h6 {
font-size: 1em !important;
}
.message-bot p {
margin: 0 0 1em !important;
font-size: inherit !important;
line-height: inherit !important;
}
.message-bot p:last-child {
margin-bottom: 0 !important;
}
.message-bot code {
background: rgba(255, 255, 255, 0.1) !important;
padding: 2px 4px !important;
border-radius: 3px !important;
font-family: Consolas, Monaco, 'Courier New', monospace !important;
font-size: 0.9em !important;
}
.message-bot pre {
background: rgba(255, 255, 255, 0.1) !important;
padding: 1em !important;
border-radius: 4px !important;
overflow-x: auto !important;
margin: 1em 0 !important;
}
.message-bot pre code {
background: none !important;
padding: 0 !important;
font-size: 0.9em !important;
}
.message-bot ul,
.message-bot ol {
margin: 0 0 1em !important;
padding-left: 2em !important;
}
.message-bot ul li,
.message-bot ol li {
margin-bottom: 0.5em !important;
line-height: inherit !important;
}
.message-bot blockquote {
border-left: 3px solid rgba(255, 255, 255, 0.3) !important;
margin: 0 0 1em !important;
padding-left: 1em !important;
color: rgba(255, 255, 255, 0.9) !important;
font-style: italic !important;
}
.message-user {
float: right;
background: var(--user-msg-color);
color: #333;
padding: 12px 15px;
border-radius: 18px 18px 4px 18px;
font-size: 16px;
margin-bottom: 10px;
max-width: 100%;
position: relative;
align-self: flex-end;
}
.message-user:before {
display: none;
}
.message-error {
float: left;
background: #fee2e2;
color: #991b1b;
padding: 12px 15px;
border-radius: 18px 18px 18px 4px;
font-size: 15px;
margin-bottom: 10px;
max-width: 90%;
position: relative;
align-self: flex-start;
}
.message-loading {
float: left;
background: linear-gradient(to bottom, var(--bot-msg-color), var(--bot-msg-color));
color: white;
padding: 12px 15px;
border-radius: 18px 18px 18px 4px;
font-size: 15px;
margin-bottom: 10px;
display: flex;
align-items: center;
min-width: 60px;
position: relative;
align-self: flex-start;
}
.message-loading:before {
display: none;
} .message-sender {
display: none;
font-size: 12px;
margin-bottom: 4px;
color: #666;
padding-left: 15px;
}
.message-user-container {
align-self: flex-end;
max-width: 90%;
}
.message-bot-container {
align-self: flex-start;
max-width: 90%;
}
.typing-animation {
display: flex;
align-items: center;
column-gap: 6px;
}
.typing-dot {
width: 6px;
height: 6px;
background: white;
border-radius: 50%;
animation: typing 1.4s infinite;
opacity: 0.7;
}
.typing-dot:nth-child(2) {
animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-6px);
}
}
#grok-chat-input-area {
display: flex;
align-items: flex-start;
padding: 15px 15px 15px 5px;
border-top: 1px solid #eee;
background: white;
position: relative;
min-height: 50px;
max-height: 110px;
}
#grok-chat-input {
flex-grow: 1;
border: none;
outline: none;
font-size: 14px;
margin: 0 10px;
resize: none;
min-height: 20px;
max-height: 80px;
padding: 0;
overflow-y: auto;
line-height: 20px;
}
.input-icon {
color: #999;
font-size: 18px;
cursor: pointer;
}
#grok-send-btn {
background: none;
border: none;
padding: 0;
cursor: pointer;
color: #0066ff;
align-self: flex-end;
margin-bottom: 2px;
}
#grok-send-btn svg {
width: 24px;
height: 24px;
}
#grok-send-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.powered-by {
text-align: right;
padding: 5px 15px;
font-size: 12px;
color: #999;
background: white;
}
.powered-by a {
color: inherit;
text-decoration: none;
}
@keyframes slideUp {
0% {
transform: translateY(100px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
@keyframes scaleIn {
0% {
transform: scale(0.8);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.char-counter {
position: absolute;
right: 50px;
bottom: 8px;
font-size: 12px;
color: #999;
pointer-events: none;
background: white;
padding: 2px 5px;
}
.char-counter-warning {
color: #e53e3e;
}
#grok-chat-input:disabled {
background: #f5f5f5;
cursor: not-allowed;
}
.grok-chat-bubble {
position: absolute;
left: 80px;
bottom: 10px;
background: white;
padding: 12px 20px;
border-radius: 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
font-size: 17px;
white-space: nowrap;
display: none;
opacity: 0;
cursor: pointer;
transition: transform 0.2s ease;
user-select: none;
}
.grok-chat-bubble.show {
display: block;
animation: fadeIn 0.3s ease-out forwards;
}
.grok-chat-bubble.hide {
animation: fadeOut 0.3s ease-out forwards;
}
.grok-chat-bubble:before {
content: '';
position: absolute;
left: -8px;
bottom: 15px;
width: 0;
height: 0;
border-top: 8px solid transparent;
border-right: 10px solid white;
border-bottom: 8px solid transparent;
}
.grok-chat-bubble:hover, .grok-chat-bubble:focus {
transform: translateY(-2px);
}
.grok-chat-bubble:focus {
outline: 2px solid #007bff;
outline-offset: 2px;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateX(-10px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeOut {
from {
opacity: 1;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(-10px);
}
}