book / src /components /Chatbot /ChatbotInterface.css
Ammar Ahmed Khan
Add Physical AI Humanoid Book Platform
e2eff86
.chatbot-container {
position: fixed;
bottom: 80px;
right: 20px;
width: 350px;
height: 500px;
background: var(--ai-secondary-dark);
border: 1px solid var(--ai-border);
border-radius: 10px;
box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
z-index: 999;
overflow: hidden;
}
.chatbot-header {
background: linear-gradient(135deg, var(--ai-primary-dark) 0%, var(--ai-secondary-dark) 100%);
padding: 15px;
border-bottom: 1px solid var(--ai-border);
display: flex;
justify-content: space-between;
align-items: center;
}
.chatbot-title {
color: var(--ai-text-primary);
font-weight: bold;
margin: 0;
font-size: 1.1rem;
}
.chatbot-close {
background: none;
border: none;
color: var(--ai-text-secondary);
cursor: pointer;
font-size: 1.5rem;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
}
.chatbot-close:hover {
background-color: var(--ai-tertiary-dark);
}
.chatbot-messages {
flex: 1;
padding: 15px;
overflow-y: auto;
background: var(--ai-tertiary-dark);
display: flex;
flex-direction: column;
gap: 10px;
}
.message {
max-width: 80%;
padding: 10px 15px;
border-radius: 18px;
position: relative;
animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.user-message {
background: linear-gradient(135deg, var(--ai-accent-blue), var(--ai-accent-cyan));
color: white;
align-self: flex-end;
border-bottom-right-radius: 5px;
}
.bot-message {
background: var(--ai-primary-dark);
color: var(--ai-text-primary);
align-self: flex-start;
border-bottom-left-radius: 5px;
}
.typing-indicator {
display: flex;
align-items: center;
gap: 5px;
}
.typing-indicator span {
width: 8px;
height: 8px;
background-color: var(--ai-accent-cyan);
border-radius: 50%;
display: inline-block;
animation: typing 1.4s infinite both;
}
.typing-indicator span:nth-child(1) {
animation-delay: 0s;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%, 60%, 100% {
transform: translateY(0);
}
30% {
transform: translateY(-5px);
}
}
.chatbot-input {
display: flex;
padding: 15px;
background: var(--ai-primary-dark);
border-top: 1px solid var(--ai-border);
}
.chatbot-input input {
flex: 1;
padding: 10px 15px;
border: 1px solid var(--ai-border);
border-radius: 25px;
background: var(--ai-tertiary-dark);
color: var(--ai-text-primary);
font-size: 1rem;
}
.chatbot-input input:focus {
outline: none;
border-color: var(--ai-accent-blue);
}
.chatbot-input button {
margin-left: 10px;
padding: 10px 20px;
background: linear-gradient(135deg, var(--ai-accent-blue), var(--ai-accent-purple));
border: none;
border-radius: 25px;
color: white;
cursor: pointer;
font-weight: bold;
transition: transform 0.2s, box-shadow 0.2s;
}
.chatbot-input button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 168, 255, 0.4);
}
.chatbot-input button:disabled {
opacity: 0.6;
cursor: not-allowed;
}