OneCompiler

chatbot css

136

/* Container when chatbot is open */
.chatbot-container {
position: fixed;
bottom: 20px;
right: 20px;
width: 360px;
height: 500px;
background: #ffffff;
border-radius: 20px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
overflow: hidden;
z-index: 1000;
font-family: 'Segoe UI', sans-serif;
}

/* Header with BSNL gradient + logo */
.chatbot-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
background: linear-gradient(135deg, #0078D7, #FF8C00);
color: white;
font-weight: bold;
font-size: 18px;
position: relative;
}

.chatbot-header img {
height: 30px;
margin-right: 10px;
}

.chatbot-header h3 {
flex-grow: 1;
margin: 0;
font-size: 17px;
}

.close-chat-btn {
background: none;
border: none;
color: white;
font-size: 22px;
cursor: pointer;
margin-left: 10px;
}

/* Chat messages */
.chatbot-messages {
flex: 1;
padding: 15px;
overflow-y: auto;
background: #f9f9f9;
display: flex;
flex-direction: column;
gap: 10px;
}

.chat-message {
max-width: 75%;
padding: 10px 14px;
border-radius: 16px;
font-size: 15px;
line-height: 1.4;
word-wrap: break-word;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-message.user {
background: #d0eaff;
align-self: flex-end;
color: #000;
}

.chat-message.bot {
background: #edf2f7;
align-self: flex-start;
color: #333;
}

/* Input area */
.chatbot-input {
display: flex;
padding: 12px;
border-top: 1px solid #eee;
background: white;
}

.chatbot-input input {
flex: 1;
padding: 10px 14px;
border-radius: 20px;
border: 1px solid #ccc;
outline: none;
font-size: 14px;
}

.chatbot-input button {
background: #ff8c00;
border: none;
color: white;
padding: 10px 18px;
border-radius: 20px;
margin-left: 10px;
cursor: pointer;
font-weight: bold;
}

/* Toggle button when minimized */
.chat-toggle-btn {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #0078D7;
color: white;
padding: 10px 18px;
border: none;
border-radius: 30px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
font-weight: bold;
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
z-index: 999;
}

.chat-toggle-btn img {
height: 20px;
}