/* Chat container */
.chat-container {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
}

.chat-container.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Chat messages */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #4f46e5 #f1f1f1;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #4f46e5;
    border-radius: 10px;
}

/* Message bubbles */
.message-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 18px;
    margin-bottom: 8px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

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

/* User message */
.user-message {
    background-color: #4f46e5;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* Bot message */
.bot-message {
    background-color: #f3f4f6;
    color: #1f2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f3f4f6;
    border-radius: 18px;
    margin-bottom: 8px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Chat toggle button */
#chat-toggle {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Input field */
.chat-input {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Send button */
.send-button {
    transition: all 0.2s ease;
}

.send-button:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .chat-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .message-bubble {
        max-width: 90%;
    }
}
