﻿.chat-float-button {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
}

.chat-float-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chat-popup {
    position: fixed;
    bottom: 90px;
    left: 25px;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
    overflow: hidden;
}

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.chat-header .mud-typography {
    color: white !important;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    opacity: 0.5;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    word-break: break-word;
    animation: message-appear 0.3s ease;
    font-size: 0.9rem;
}

.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.user-message .mud-typography {
    color: white !important;
}

.ai-message {
    background: white;
    color: #2d3748;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

@keyframes slide-up {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes message-appear {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .chat-popup {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        height: 400px;
    }
    
    .chat-float-button {
        left: 20px;
        bottom: 20px;
    }
}
