/* AI Chat Popup Styles */
#ai-chat-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#ai-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#ai-chat-toggle.chat-open {
    background: #dc3545;
    transform: rotate(45deg);
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.chat-header-bottom {
    width: 100%;
    margin-top: 5px;
}

#suggested-questions {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#suggested-questions:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

#suggested-questions option {
    background: #fff;
    color: #333;
    padding: 8px 12px;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    opacity: 0.9;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chat-minimize {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    position: relative;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.ai-message .message-time {
    text-align: left;
}

.typing-indicator {
    display: none;
    padding: 10px 15px;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.typing-dots {
    display: inline-block;
    animation: typingDots 1.5s infinite;
}

@keyframes typingDots {
    0%, 60%, 100% { opacity: 0; }
    30% { opacity: 1; }
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    border: 1px solid #e9ecef;
}

#chat-input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
    resize: none;
    max-height: 80px;
}

#chat-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#chat-send:hover {
    transform: scale(1.1);
}

#chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quick-questions {
    padding: 10px 15px;
    background: white;
}

.quick-questions h6 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

/* Suggested Questions Dropdown - styles now moved to header section above */

.welcome-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.welcome-message .ai-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.chat-actions {
    display: flex;
    gap: 10px;
    padding: 0 15px 10px;
}

.chat-action-btn {
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #ai-chat-popup {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 400px;
    }
    
    #ai-chat-toggle {
        bottom: 10px;
        right: 10px;
    }
}

/* Smooth scrolling for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
