#chatbot-bubble {
    position: fixed !important;
    bottom: 20px !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 60px;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000 !important;
    transition: transform 0.2s ease-in-out;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
}

#chatbot-bubble:hover {
    transform: scale(1.1);
}

#chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    text-align: center;
}

#chatbot-window {
    position: fixed !important;
    bottom: 90px !important;
    width: 320px;
    height: 450px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 10000 !important;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: visible !important;
}

#chatbot-window[style*="display: block"] {
    opacity: 1;
}

#chatbot-header {
    padding: 12px 16px;
    color: white;
    font-weight: bold;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.online-status {
    font-size: 12px;
    color: #00ff00;
    margin-left: 5px;
}

.agent-avatars {
    display: flex;
}

.agent-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: -10px;
    border: 2px solid white;
}

#chatbot-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.bot-message-wrapper, .user-message-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.bot-message-wrapper {
    align-items: flex-start;
}

.user-message-wrapper {
    align-items: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.user-message-wrapper .message-avatar {
    order: 2;
    margin-left: 10px;
}

.bot-message, .user-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 20px;
    word-wrap: break-word;
    font-size: 14px;
}

.user-message {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: white;
    color: #007bff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.timestamp {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

#chatbot-input-wrapper {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #eee;
}

#chatbot-input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 14px;
}

.emoji-icon {
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
}

#powered-by {
    text-align: center;
    font-size: 11px;
    color: #999;
    padding: 5px;
}

.form-container {
    max-width: 100%;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

#typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

#typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 4px;
    animation: bounce 1.2s infinite;
}

#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); }
}