/* brand-chatbot.css */
.brand-chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 16px;
    font-weight: bold;
    background-color: #0058A3;
    transition: background-color 0.3s;
    z-index: 999999;
}

.brand-chatbot-button:hover {
    background-color: #004080;
}

.export-button {
    bottom: 70px; /* Default for PDF */
}

#export-xlsx-btn {
    bottom: 120px; /* Position XLSX above PDF */
}

.brand-chatbot-window {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
    z-index: 999998;
}

@media (max-width: 400px) {
    .brand-chatbot-window {
        width: 90vw;
    }
}

.brand-chatbot-header {
    padding: 10px 15px;
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    align-items: center;
    background-color: #0058A3;
    position: relative;
}

.brand-chatbot-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.brand-chatbot-header .brand-chatbot-name {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 600;
}

.brand-chatbot-header .brand-chatbot-mute {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s;
}

.brand-chatbot-header .brand-chatbot-mute:hover {
    color: #FFD700;
}

.brand-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s;
}

.brand-chatbot-close:hover {
    color: #FF4500;
}

.brand-chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-wrapper {
    display: flex;
    align-items: flex-start;
}

.message-wrapper.user {
    justify-content: flex-end;
}

.message-wrapper.bot {
    justify-content: flex-start;
}

.message-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin: 0 5px;
    object-fit: cover;
}

.user-message, .bot-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 20px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-message {
    background: #0084FF;
    color: white;
    text-align: left;
}

.bot-message {
    background: #E9ECEF;
    color: #333;
    text-align: left;
}

.brand-chatbot-suggestions-area {
    display: none;
    padding: 10px 15px;
    background: #F8F9FA;
    border-top: 1px solid #ddd;
    max-height: 60px;
    overflow-x: auto;
    align-items: center;
}

.brand-chatbot-suggestions-area .suggestions {
    display: flex;
    white-space: nowrap;
    gap: 6px;
    padding-bottom: 5px;
}

.brand-chatbot-suggestions-area .suggestions::-webkit-scrollbar {
    height: 4px;
}

.brand-chatbot-suggestions-area .suggestions::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.brand-chatbot-suggestions-area .suggestions button {
    background: #E9ECEF;
    color: #333;
    border: none;
    padding: 8px 16px; /* Increased padding for better spacing */
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px; /* Slightly larger font for readability */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Add ellipsis for long text */
    max-width: 200px; /* Limit button width to prevent overflow */
    transition: background-color 0.3s;
}

.brand-chatbot-suggestions-area .suggestions button:hover,
.brand-chatbot-suggestions-area .suggestions button:focus {
    background: #D3D8DE;
}

.brand-chatbot-input-area {
    position: sticky;
    bottom: 0;
    display: flex;
    padding: 12px 15px;
    border-top: 1px solid #ddd;
    background: #F8F9FA;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    align-items: center;
    z-index: 1;
    box-shadow: none;
}

.brand-chatbot-input {
    flex-grow: 1;
    padding: 0;
    border: 1px solid #ced4da;
    border-radius: 20px;
    margin-right: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    resize: none;
    min-height: 40px;
    display: flex;
    align-items: center;
    background: white;
    box-shadow: none;
}

.brand-chatbot-input:focus-within {
    border-color: #007BFF;
}

.brand-chatbot-input input {
    flex-grow: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 14px;
}

.brand-chatbot-input .mic-icon {
    margin: 0 10px;
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
    color: #007BFF;
    transition: color 0.3s;
    display: inline-block;
}

.brand-chatbot-input .mic-icon:hover,
.brand-chatbot-input .mic-icon:focus {
    color: #0056B3;
}

.brand-chatbot-send {
    background: #007BFF;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.brand-chatbot-send:hover,
.brand-chatbot-send:focus {
    background: #0056B3;
}
