/* BChat AI Frontend CSS */

#bchat-ai-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

#bchat-ai-open-btn {
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

#bchat-ai-open-btn:hover {
    transform: scale(1.1);
}

#bchat-ai-container {
    width: 370px;
    max-width: 90vw;
    height: 70vh;
    max-height: 600px;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
    opacity: 0;
}

#bchat-ai-container.bchat-is-open {
    transform: translateY(0);
    opacity: 1;
}

.bchat-hidden {
    display: none !important;
}

#bchat-ai-header {
    background-color: #007cba;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#bchat-ai-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

#bchat-ai-messages {
    height: 100%;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bchat-ai-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.bchat-ai-message.user {
    background-color: #007cba;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bchat-ai-message.bot {
    background-color: #e5e5ea;
    color: #000;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#bchat-ai-form {
    display: flex;
    border-top: 1px solid #e0e0e0;
}

#bchat-ai-input {
    flex: 1;
    border: none;
    padding: 15px;
    font-size: 16px;
}

#bchat-ai-input:focus {
    outline: none;
}

#bchat-ai-form button {
    background-color: #007cba;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
}

#bchat-ai-form button:hover {
    background-color: #005a87;
}