/**
 * @author      Ghulam Dastgir <ghulam.dastgir@knfilters.com>
 * @copyright   © K&N Engineering, Inc. All rights reserved.
 * @see         KN_LICENSE.txt for license details.
 *
 * SPDX-License-Identifier: NONE
 */

.kn-chatbot-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px;
    height: 60px;
    background: #ff6e00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    color: #1d1d1d;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.kn-chatbot-button:hover {
    background: #f32835;
    transform: scale(1.1);
}

.kn-chatbot-popup {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 9998 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dedede;
}

.kn-chatbot-header {
    background: #1d1d1d;
    color: #ff6e00;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kn-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    font-family: 'Montserrat', sans-serif;
}

.kn-chatbot-close {
    background: none;
    border: none;
    color: #ff6e00;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kn-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
}

.kn-chatbot-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
}

.kn-chatbot-message-user {
    background: #f32835;
    color: #f9f9f9;
    align-self: flex-end;
    margin-left: auto;
}

.kn-chatbot-message-bot {
    background: #f9f9f9;
    color: #1d1d1d;
    align-self: flex-start;
}

.kn-chatbot-message-error {
    background: #d70000;
    color: #f9f9f9;
    align-self: flex-start;
}

.kn-chatbot-input {
    padding: 15px 20px;
    border-top: 1px solid #dedede;
    display: flex;
    gap: 10px;
    background: white;
}

.kn-chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #dedede;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    background: white;
    color: #1d1d1d;
    font-family: 'Montserrat', sans-serif;
}

.kn-chatbot-input input:focus {
    border-color: #f32835;
}

.kn-chatbot-input button {
    background: #ff6e00;
    color: #1d1d1d;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

.kn-chatbot-input button:hover {
    background: #f32835;
}

.kn-chatbot-input button:disabled {
    background: #636363;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .kn-chatbot-popup {
        width: calc(100vw - 40px);
        height: 400px;
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
}