/*!
 * CbeezAI Assistant CSS
 */

/* Chat icon button */
#cbeezai-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #003D80;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
}

#cbeezai-chat-button:hover {
    background-color: #043160;
    transform: scale(1.1);
}

#cbeezai-chat-button i {
    font-size: 24px;
}

/* Chat container */
#cbeezai-chat-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
}

#cbeezai-chat-container.active {
    display: flex;
}

/* Chat header */
#cbeezai-chat-header {
    background-color: #003D80;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cbeezai-chat-header h3 {
    margin: 0;
    font-size: 18px;
}

#cbeezai-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Chat messages */
#cbeezai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbeezai-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.cbeezai-user-message {
    align-self: flex-end;
    background-color: #003D80;
    color: white;
    border-bottom-right-radius: 5px;
}

.cbeezai-ai-message {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 5px;
}

/* Chat input */
#cbeezai-chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: white;
}

#cbeezai-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#cbeezai-chat-send {
    background-color: #003D80;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#cbeezai-chat-send:hover {
    background-color: #092d54;
}

#cbeezai-chat-send:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Typing indicator */
.cbeezai-typing-indicator {
    display: flex;
    align-self: flex-start;
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
}

.cbeezai-typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.3s linear infinite;
}

.cbeezai-typing-indicator span:nth-child(2) {
    animation-delay: 0.15s;
}

.cbeezai-typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    #cbeezai-chat-container {
        width: calc(100% - 40px);
        height: 70%;
        bottom: 90px;
        right: 20px;
    }
}