#chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102,126,234,0.4);
    z-index: 9999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102,126,234,0.6);
}
#chatbot-toggle .close-icon {
    display: none;
}
#chatbot-toggle.active .chat-icon {
    display: none;
}
#chatbot-toggle.active .close-icon {
    display: inline;
}

#chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 370px;
    max-height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.2);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
#chatbot-container.open {
    display: flex;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}
#chatbot-header-status {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    min-height: 300px;
    max-height: 350px;
}
#chatbot-messages::-webkit-scrollbar {
    width: 5px;
}
#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.chatbot-msg {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.chatbot-msg.bot {
    align-items: flex-start;
}
.chatbot-msg.user {
    align-items: flex-end;
}
.chatbot-msg .bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}
.chatbot-msg.bot .bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.chatbot-msg.user .bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}
.chatbot-msg .time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 5px;
}

#chatbot-input-area {
    display: flex;
    padding: 12px 15px;
    gap: 10px;
    border-top: 1px solid #eee;
    background: white;
}
#chatbot-input {
    flex: 1;
    border: 2px solid #eee;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}
#chatbot-input:focus {
    border-color: #667eea;
}
#chatbot-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#chatbot-send:hover {
    transform: scale(1.05);
}
#chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 15px;
    background: #f8f9fa;
}
.chatbot-quick-reply {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.chatbot-quick-reply:hover {
    background: #667eea;
    color: white;
}

@media (max-width: 480px) {
    #chatbot-container {
        width: calc(100% - 30px);
        right: 15px;
        bottom: 90px;
        max-height: 500px;
    }
    #chatbot-toggle {
        right: 15px;
        bottom: 20px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}
