#chatbot-body {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.chat-widget-launcher {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.chat-widget-launcher:hover {
    transform: scale(1.05);
    background-color: #0056b3;
}
/* 2. The Chat Window Box Hidden by Default */
.chat-widget-box {
    display: none; /* Controlled via JavaScript class toggling */
    flex-direction: column;
    width: 370px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 75px;
    right: 0;
    overflow: hidden;
    animation: slideUpFade 0.25s ease-out;
}
/* Show class helper triggered on click */
.chat-widget-box.is-active {
    display: flex;
}
/* Chat Header Area */
.chat-widget-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
}
/* Scrollable message container body */
.chat-widget-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
}
/* Bottom Input Row area */
.chat-widget-footer {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e9ecef;
    background-color: #ffffff;
}
.chat-widget-footer input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 8px 16px;
    outline: none;
    font-size: 14px;
}
.chat-widget-footer button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-msg {
    color: white; 
    padding: 8px 14px; 
    display: inline-block; 
    max-width: 80%; 
    font-size: 14px; 
    word-wrap: break-word; 
    white-space: pre-wrap; 
    margin-bottom: 10px;
}
.chatbot-msg {
    float: left; 
    background-color: #bbb;
    border-radius: 14px 14px 14px 0px; 
}
/* Animation for smooth popup visualization */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f1f0f0;
    border-radius: 15px;
    width: fit-content;
    margin: 8px 0;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: bounce 1.3s infinite both;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
