
/* Modern AI Chat Interface */
#ahf-chatbot-container {
    max-width: 800px;
    margin: 0 auto;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.ahf-chat-header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ahf-chat-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.ahf-ai-avatar {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6e8efb;
}

.ahf-chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: #f9f9f9;
}

.ahf-message {
    margin-bottom: 1.25rem;
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ahf-message-user {
    justify-content: flex-end;
}

.ahf-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    background: #6e8efb;
    color: white;
}

.ahf-message-user .ahf-message-avatar {
    background: #4CAF50;
}

.ahf-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 15px;
}

.ahf-message-ai .ahf-message-content {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-bottom-left-radius: 4px;
    color: #333;
}

.ahf-message-user .ahf-message-content {
    background: #6e8efb;
    color: white;
    border-bottom-right-radius: 4px;
}

.ahf-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ahf-typing-indicator.active {
    opacity: 1;
}

.ahf-typing-dots {
    display: flex;
    gap: 4px;
}

.ahf-typing-dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ahf-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ahf-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.ahf-chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
}

.ahf-chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

#ahf-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    min-height: 24px;
    max-height: 120px;
    resize: none;
    line-height: 1.5;
}

#ahf-chat-input:focus {
    border-color: #6e8efb;
    box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.2);
}

#ahf-send-button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #6e8efb;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ahf-send-button:hover {
    background: #5a7df4;
    transform: scale(1.05);
}

#ahf-send-button:disabled {
    background: #ddd;
    cursor: not-allowed;
    transform: none;
}

.ahf-results-container {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ahf-result-item {
    padding: 16px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.ahf-result-item:hover {
    background: #f8f9fa;
}

.ahf-result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.ahf-result-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.ahf-result-description {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
}

.ahf-result-actions {
    display: flex;
    gap: 8px;
}

.ahf-result-button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.ahf-result-button-primary {
    background: #6e8efb;
    color: white;
    border: none;
}

.ahf-result-button-primary:hover {
    background: #5a7df4;
}

.ahf-result-button-secondary {
    background: white;
    color: #6e8efb;
    border: 1px solid #ddd;
}

.ahf-result-button-secondary:hover {
    background: #f8f9fa;
}

.ahf-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ahf-suggestion {
    background: white;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ahf-suggestion:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.ahf-powered-by {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 16px;
}

@media (max-width: 768px) {
    #ahf-chatbot-container {
        height: 80vh;
        border-radius: 0;
    }
    
    .ahf-message-content {
        max-width: 90%;
    }
}
