/* ================== Chatbox ================== */
#chatbot-box {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 350px;
    height: 450px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
}

/* Chat Body - Only messages, scrollable */
#chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto; /* Only messages scroll */
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    /* Ensure messages start from top */
    justify-content: flex-start;
}

/* Chat Input - Fixed at bottom of chatbox */
.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
    background: white;
    /* Input area doesn't scroll */
    flex-shrink: 0; /* Prevent shrinking */
}

.chat-input input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    font-size: 14px;
    /* Prevent textarea-like scrolling */
    resize: none;
    overflow: hidden;
    min-height: 20px;
    max-height: 100px; /* Limits height if you use textarea */
}

.chat-input button {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
}

/* Make sure messages fill available space */
#chat-body > * {
    margin-top: auto; /* Pushes new messages to bottom */
}

/* Optional: If you want textarea instead of input */
.chat-input textarea {
    flex: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    resize: none; /* Disable manual resizing */
    overflow-y: hidden; /* Hide scrollbar */
    min-height: 20px;
    max-height: 100px; /* Maximum 4-5 lines */
    line-height: 1.4;
}