/* AI Assistant Chat Styles */

.ai-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
    border: none;
    animation: pulse 2s infinite;
}

.ai-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.6);
}

.ai-chat-button i {
    color: white;
    font-size: 28px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(76, 175, 80, 0.8);
    }
}

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.ai-chat-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-chat-title p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.ai-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.ai-chat-close:hover {
    opacity: 0.8;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.ai-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-message.user .ai-message-avatar {
    background: #2196F3;
}

.ai-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.5;
    font-size: 14px;
}

.ai-message.user .ai-message-content {
    background: #2196F3;
    color: white;
}

.ai-product-suggestion {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.ai-product-suggestion:hover {
    background: #e9ecef;
}

.ai-product-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.ai-product-info {
    flex: 1;
}

.ai-product-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.ai-product-price {
    color: #4CAF50;
    font-weight: 600;
    font-size: 14px;
}

.ai-chat-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.ai-chat-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: #4CAF50;
}

.ai-chat-send {
    width: 45px;
    height: 45px;
    background: #4CAF50;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-chat-send:hover {
    background: #45a049;
    transform: scale(1.05);
}

.ai-chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}

.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ai-typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-chat-window {
        right: 10px;
        bottom: 80px;
        width: calc(100% - 20px);
        max-width: 380px;
        height: 500px;
    }

    .ai-chat-button {
        right: 20px;
        bottom: 20px;
    }
}

/* Quick Suggestions */
.ai-quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ai-suggestion-chip {
    padding: 8px 12px;
    background: white;
    border: 1px solid #4CAF50;
    color: #4CAF50;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-suggestion-chip:hover {
    background: #4CAF50;
    color: white;
}
