/* Updated chatbot.css with mobile fixes */
:root {
    --jk-green: #2E8B57; /* Sea Green - Approximation from logo */
    --pastel-sage-green: #B2D3A8; 
    --chatbot-text-light: var(--jk-green);
    --chatbot-bg-light: var(--pastel-sage-green);
    --chatbot-border-light: var(--jk-green);
    --user-msg-bg-light: #e7f1ff; 
    --bot-msg-bg-light: rgba(255, 255, 255, 0.2); /* Semi-transparent white bubble */
    --header-bg-light: rgba(255, 255, 255, 0.1);
    --input-bg-light: rgba(255, 255, 255, 0.5);
    --input-container-bg-light: rgba(255, 255, 255, 0.1);

    /* Dark Mode Colors */
    --chatbot-text-dark: #E0E0E0; /* Light grey text */
    --chatbot-bg-dark: #2c3e50; /* Dark blue-grey */
    --chatbot-border-dark: #3498db; /* Brighter blue border */
    --user-msg-bg-dark: #34495e; /* Slightly lighter dark blue */
    --bot-msg-bg-dark: rgba(0, 0, 0, 0.3); /* Darker semi-transparent bubble */
    --header-bg-dark: rgba(0, 0, 0, 0.2);
    --input-bg-dark: rgba(0, 0, 0, 0.2);
    --input-container-bg-dark: rgba(0, 0, 0, 0.2);
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

/* Chatbot Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--jk-green);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.chatbot-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-button:hover, .chatbot-button.active {
    transform: scale(1.1);
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: white;
    border: 2px solid var(--jk-green);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1049;
}

.chatbot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chatbot Header */
.chatbot-header {
    background-color: var(--jk-green);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.message.user {
    margin-left: auto;
    text-align: right;
}

.message.bot {
    margin-right: auto;
}

.message-content {
    padding: 10px 15px;
    border-radius: 18px;
    display: inline-block;
}

.user .message-content {
    background-color: var(--jk-green);
    color: white;
}

.bot .message-content {
    background-color: #e9ecef;
    color: #212529;
}

/* Chatbot Input */
.chatbot-input {
    display: flex;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

#chatbot-input-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    margin-right: 10px;
}

#chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--jk-green);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .chatbot-window {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 80px;
    }
    
    .chatbot-button {
        width: 50px;
        height: 50px;
    }
    
    .message {
        max-width: 90%;
    }
}
