/* Chatbot Floating Action Button (FAB) */
.chatbot-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-fab:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 420px;
    height: 650px;
    min-width: 320px;
    max-width: 900px;
    min-height: 450px;
    max-height: 900px;
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    display: none; 
    flex-direction: column;
    overflow: hidden; 
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

/* Custom resize handle in top-left corner */
.chatbot-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    cursor: nw-resize;
    z-index: 1100;
    background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 15l-3-3 3-3'/%3E%3Cpath d='M12 18l-3-3 3-3'/%3E%3Cpath d='M15 21l-3-3 3-3'/%3E%3C/svg%3E\");
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 16px 0 0 0;
    transition: background-color 0.2s, opacity 0.2s;
}

.chatbot-resize-handle:hover {
    background-color: rgba(203, 213, 225, 0.3);
    opacity: 0.9;
}

.chatbot-window.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Chat Header */
.chatbot-header {
    background-color: #0d6efd;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close-btn {
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

/* Chat Messages Area */
.chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-user {
    align-self: flex-end;
    background-color: #0d6efd;
    color: white;
    border-bottom-right-radius: 2px;
}

.message-ai {
    align-self: flex-start;
    background-color: #e9ecef;
    color: #212529;
    border-bottom-left-radius: 2px;
}

/* Chat Input Area */
.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    background-color: white;
}

.chatbot-input {
    flex-grow: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 5px 15px;
    outline: none;
}

.chatbot-send-btn {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chatbot-send-btn:hover {
    background-color: #0a58ca;
}
