/* Floating AI Agent Button */
.ai-agent-fab {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 1100;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: box-shadow 0.2s;
}

.ai-agent-fab:hover {
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.25);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Improved Modal Styles */
.ai-agent-modal {
    position: fixed;
    right: 40px;
    bottom: 90px;
    z-index: 1200;
    background: transparent;
    width: 350px;
    max-width: 95vw;
}

.ai-agent-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 350px;
    max-height: 70vh;
}

.ai-agent-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-agent-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-agent-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.ai-agent-close-btn:hover {
    color: #ffd700;
}

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f7f9fa;
    font-size: 0.98rem;
    border-bottom: 1px solid #eee;
}

.ai-chat-user {
    text-align: right;
    color: #333;
    margin-bottom: 8px;
    background: #e3f2fd;
    padding: 7px 12px;
    border-radius: 12px 12px 0 12px;
    display: inline-block;
    max-width: 80%;
}

.ai-chat-ai {
    text-align: left;
    color: #764ba2;
    margin-bottom: 8px;
    background: #e0f7fa;
    padding: 7px 12px;
    border-radius: 12px 12px 12px 0;
    display: inline-block;
    max-width: 80%;
}

.ai-agent-input-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f7f9fa;
    border-top: 1px solid #eee;
}

.ai-chat-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-right: 8px;
}

.ai-chat-send-btn {
    background: #764ba2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.ai-chat-send-btn:hover {
    background: #667eea;
}

/* Responsive for mobile */
@media (max-width: 600px) {
    .ai-agent-modal {
        right: 10px;
        bottom: 70px;
        width: 98vw;
    }

    .ai-agent-modal-content {
        min-height: 220px;
        max-height: 60vh;
    }

    .ai-agent-fab {
        right: 12px;
        bottom: 12px;
        padding: 10px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .ai-agent-modal {
        right: 2vw;
        bottom: 60px;
        width: 96vw;
    }

    .ai-agent-modal-content {
        min-height: 120px;
        max-height: 50vh;
        padding: 0;
    }

    .ai-agent-fab {
        right: 4px;
        bottom: 4px;
        padding: 8px 10px;
        font-size: 0.95rem;
    }

    .ai-chat-input {
        font-size: 0.95rem;
        padding: 6px 8px;
    }
}