/* MCP Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-legend {
    position: absolute;
    right: 85px;
    bottom: 15px;
    background: #FF6D00;
    color: #1B5E20;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: bounceIn 0.5s ease;
}

.chatbot-legend::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid #FF6D00;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateX(20px);
    }

    70% {
        transform: scale(1.1) translateX(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.chatbot-launcher {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    border: 3px solid #FF6D00;
}

.chatbot-launcher:hover {
    transform: scale(1.1);
}

.chatbot-launcher img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #1565C0 0%, #2E7D32 100%);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.chat-message {
    margin-bottom: 15px;
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-bot {
    background: #E8F5E9;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message-user {
    background: #1565C0;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #fff;
}

.chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-option {
    background: #fff;
    border: 1px solid #1565C0;
    color: #1565C0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-option:hover {
    background: #1565C0;
    color: white;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WhatsApp Button in Chat */
.btn-whatsapp-chat {
    background: #25D366;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-whatsapp-chat:hover {
    background: #128C7E;
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}


/* Hide chatbot when any modal is open to prevent overlapping footer buttons */
body.modal-open .chatbot-container {
    display: none !important;
}