/* assets/css/ai_chat.css */
#ai-chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,123,255,0.4);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ai-chat-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(0,123,255,0.5);
}

#ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 400px;
    height: 550px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    background: #f8f9fa;
    transition: all 0.4s ease;
}

#ai-chat-window.active {
    animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#ai-chat-header {
    background: linear-gradient(135deg, #2c3e50, #000);
    color: white;
    padding: 18px 20px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-avatar-header {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

#ai-chat-messages {
    scroll-behavior: smooth;
    max-height: 400px;
    min-height: 0;
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Scrollbar styling */
#ai-chat-messages::-webkit-scrollbar { width: 6px; }
#ai-chat-messages::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
#ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2) !important; border-radius: 10px; }
#ai-chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3) !important; }

.user-msg {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.user-msg-content {
    background: #007bff;
    color: white;
    padding: 12px 18px;
    border-radius: 18px;
    border-top-right-radius: 2px;
    max-width: 80%;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,123,255,0.2);
}

.ai-msg-content {
    background: white;
    color: #333;
    padding: 12px 18px;
    border-radius: 18px;
    border-top-left-radius: 2px;
    max-width: 85%;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ai-loading {
    display: inline-block;
    padding: 10px 15px;
    background: #eee;
    border-radius: 15px;
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

#ai-chat-input-area {
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.chat-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-quick-btn {
    background: #f0f4f8;
    border: 1px solid #d1d9e6;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-quick-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

#chat-input-wrapper {
    display: flex;
    background: #f1f3f4;
    border-radius: 25px;
    padding: 5px 15px;
    align-items: center;
}

#chat-input-wrapper input {
    border: none;
    background: transparent;
    flex-grow: 1;
    padding: 8px 10px;
    font-size: 14px;
}

#chat-input-wrapper input:focus { outline: none; }

#chat-input-wrapper button {
    border: none;
    background: transparent;
    color: #007bff;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
}

@media (max-width: 576px) {
    #ai-chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
        height: 70vh;
    }
}
